Audio settings keep changing requiring reconfigure
#1
I am running ubuntu 10.10, the latest version of xbmc on a zotac hd-11. I've compiled the alsa drivers and very often things work as expected.

However, on occasion, I will find that when I play a video or audio track the "failed to initialize audio ..." message pops up. When I go to the system/audio settings, I find that they have changed from what I had previously setup. I have an image of the clean working system so I was able to compare the image with the current settings and found the following. These are the relevant differences in the guisettings.xml. The lines with the "-" in front are the working lines and the "+" is the changed lines that now cause it to fail. I do not know how or why they get changed. The only things I did are suspend/wake and try to watch a video. A reboot does not fix it. Reloading the working image does fix the problem. Is there some option I need to change to force it to the hdmi line? Or is this happening b/c the device is misbehaving after a suspend/wake.

Code:
@@ -1094,7 +1094,7 @@
     </audiocds>
     <audiooutput>
         <ac3passthrough>true</ac3passthrough>
-        <audiodevice>alsa:hdmi:CARD=NVidia</audiodevice>
+        <audiodevice>alsa:Defaults:CARD=NVidia</audiodevice>
         <channellayout>7</channellayout>
         <customdevice></customdevice>
         <custompassthrough></custompassthrough>
@@ -1102,7 +1102,7 @@
         <dtspassthrough>true</dtspassthrough>
         <mode>2</mode>
         <passthroughaac>false</passthroughaac>
-        <passthroughdevice>alsa:hdmi:CARD=NVidia</passthroughdevice>
+        <passthroughdevice>alsa:hdmi</passthroughdevice>
         <passthroughmp1>false</passthroughmp1>
         <passthroughmp2>false</passthroughmp2>
         <passthroughmp3>false</passthroughmp3>


Relevant part of the error log ... I see the problem it is complaining about, but not sure how to remedy it.

Code:
22:40:07 T:3054864256 M:1994010624   ERROR: GLX: Same window as before, refreshing context
22:40:08 T:3054864256 M:1990823936  NOTICE: HAL: Generating global device list
22:40:08 T:3054864256 M:1990823936  NOTICE: HAL: Trying to mount Volume (vfat)
22:40:08 T:3054864256 M:1990823936  NOTICE: HAL: Mounting /org/freedesktop/Hal/devices/volume_uuid_A88D_4870 (UUID A88D-4870 | FileSys
tem vfat | HotPlugged YES | Type 0 |Approved YES ) at removable disk with umask=18
22:40:09 T:3054864256 M:1990447104  NOTICE: start dvd mediatype detection
22:40:09 T:3054864256 M:1990447104  NOTICE: initializing playlistplayer
22:40:09 T:3054864256 M:1990447104  NOTICE: DONE initializing playlistplayer
22:40:09 T:3054864256 M:1985875968   ERROR: Unable to open audio mixer
22:40:09 T:3054864256 M:1985875968  NOTICE: initialize done
22:40:09 T:3054864256 M:1985875968  NOTICE: Running the application...
22:40:09 T:3054864256 M:1985875968  NOTICE: ES: Starting event server
22:40:09 T:3054864256 M:1985875968  NOTICE: DS: Starting dbus server
22:40:09 T:3033197424 M:1985875968  NOTICE: ES: Starting UDP Event server on 127.0.0.1:9777
22:40:09 T:3033197424 M:1985748992  NOTICE: UDP: Listening on port 9777
22:40:09 T:3054864256 M:1985748992   ERROR:  DS: Failed to connect to the D-Bus session daemon: Empty address ''
22:40:09 T:3054864256 M:1985748992  NOTICE: starting zeroconf publishing
22:40:59 T:3054864256 M:1975046144   ERROR: PulseAudio: Waited for the Context but it failed
22:40:59 T:3054864256 M:1975046144   ERROR: PulseAudio: Failed to create context
22:40:59 T:3054864256 M:1974919168   ERROR: PulseAudio: Waited for the Context but it failed
22:40:59 T:3054864256 M:1974919168   ERROR: PulseAudio: Failed to create context
22:41:04 T:3054864256 M:1974833152   ERROR: PulseAudio: Waited for the Context but it failed
22:41:05 T:3054864256 M:1974833152   ERROR: PulseAudio: Failed to create context
22:41:05 T:3054864256 M:1974833152   ERROR: PulseAudio: Waited for the Context but it failed
22:41:05 T:3054864256 M:1974833152   ERROR: PulseAudio: Failed to create context
22:41:07 T:3054864256 M:1974833152   ERROR: PulseAudio: Waited for the Context but it failed
22:41:07 T:3054864256 M:1974833152   ERROR: PulseAudio: Failed to create context
22:41:07 T:3054864256 M:1974833152   ERROR: PulseAudio: Waited for the Context but it failed
22:41:07 T:3054864256 M:1974833152   ERROR: PulseAudio: Failed to create context
22:42:03 T:3054864256 M:1967992832  NOTICE: DVDPlayer: Opening: smb://CRUST/shared_media/tv_shows/kitchen.nightmares.us.s04e03.ws.pdtv.xvid-shotv.avi
22:42:03 T:3054864256 M:1967992832 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
22:42:03 T:2987830128 M:1967992832  NOTICE: Creating InputStream
22:42:03 T:2987830128 M:1967992832  NOTICE: Creating Demuxer
22:42:09 T:2987830128 M:1958481920  NOTICE: Opening video stream: 0 source: 256
22:42:09 T:2987830128 M:1958481920  NOTICE: Creating video codec with codec id: 13
22:42:10 T:2987830128 M:1958096896  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: MPEG-4 part 2
22:42:10 T:2987830128 M:1958096896  NOTICE: Creating video thread
22:42:10 T:2987830128 M:1958096896  NOTICE: Opening audio stream: 1 source: 256
22:42:10 T:2987830128 M:1958096896  NOTICE: Finding audio codec for: 86017
22:42:10 T:2987830128 M:1958096896  NOTICE: Creating audio thread
22:42:10 T:2447629168 M:1958096896  NOTICE: running thread: CDVDPlayerAudio::Process()
22:42:10 T:2456021872 M:1958096896  NOTICE: running thread: video_thread
22:42:10 T:2447629168 M:1957335040  NOTICE: Creating audio device with codec id: 86017, channels: 2, sample rate: 48000, no pass-through
22:42:10 T:2447629168 M:1957335040   ERROR: Initialize - pcm_open_lconf, alsa error: -2 - No such file or directory
22:42:10 T:2447629168 M:1957208064   ERROR: Unable to open audio mixer
22:42:10 T:2447629168 M:1957081088   ERROR: Creating a Null Audio Renderer, Check your audio settings as this should not happen
22:42:10 T:2456021872 M:1956192256  NOTICE:  fps: 23.976000, pwidth: 624, pheight: 352, dwidth: 624, dheight: 352
22:42:10 T:2456021872 M:1956192256  NOTICE: Display resolution DESKTOP : 1366x768 @ 50.00 - Full Screen (12)
22:42:10 T:3054864256 M:1951682560  NOTICE: Using GL_TEXTURE_2D
Reply
#2
You should use the custom audio device setting instead.
If the "alsa:hdmi:CARD=NVidia" is a default from XBMC, it's possible that you have multiple audio devices and that they're in a random order at boot.
Reply
#3
Well, I've tried a couple of things but so far I have not gotten the sound to work. using aplay -l I see my nvidia audio at card 1, device 3

From reading it seems I might need to setup /etc/asound.conf further, but I am not sure what to put in it. This is the contents of the file I've been using (this one has worked for HDMI audio). I've also edited /etc/pulse/default.pa to give me menu sounds and they also work(ed).

Code:
pcm.!default hdmi:NVidia
pcm:iec958 hdmi:NVidia
Reply
#4
Ok, another update .... I've figured out the custom audio device and using plughw:0,3 makes everything work consistently. The problem I have now is that the channels don't map correctly. I have a 7.1 receiver with 5.1 speakers. I would have thought that the mapping wouldn't matter since the digital tracks (for movies and so on) are passed straight through to the receiver. However, I tried playing an AC3 audio track and the entire right side did not work. I had the center, left front, and right front come out of the left rear, center, and left front.

Any tips?
Thanks
Reply

Logout Mark Read Team Forum Stats Members Help
Audio settings keep changing requiring reconfigure0