Failure to initialize audio device
#16
http://www.mbmania.com/bin/xbmc.log

Area of interest:

<snip>
10:06:07 T:3048630160 M:1839398912 DEBUG:
10:06:07 T:2806270864 M:1839501312 ERROR: PulseAudio: Passthrough not possible
10:06:07 T:3048630160 M:1839149056 NOTICE: GL: NPOT texture support detected
10:06:07 T:3048630160 M:1839149056 DEBUG: GL: Creating Y NPOT texture of size 720 x 480
10:06:07 T:3048630160 M:1839149056 DEBUG: GL: Creating U NPOT texture of size 360 x 240
10:06:07 T:3048630160 M:1839149056 DEBUG: GL: Creating V NPOT texture of size 360 x 240
10:06:07 T:3048630160 M:1839149056 DEBUG: GL: Creating Y NPOT texture of size 720 x 480
10:06:07 T:3048630160 M:1839149056 DEBUG: GL: Creating U NPOT texture of size 360 x 120
10:06:07 T:3048630160 M:1839149056 DEBUG: GL: Creating V NPOT texture of size 360 x 120
10:06:07 T:3048630160 M:1839149056 DEBUG: GL: Creating Y NPOT texture of size 720 x 480
10:06:07 T:3048630160 M:1839149056 DEBUG: GL: Creating U NPOT texture of size 360 x 120
10:06:07 T:3048630160 M:1839149056 DEBUG: GL: Creating V NPOT texture of size 360 x 120
10:06:07 T:3048630160 M:1839149056 DEBUG: GL: Creating Y NPOT texture of size 720 x 480
10:06:07 T:3048630160 M:1839149056 DEBUG: GL: Creating U NPOT texture of size 360 x 240
10:06:07 T:3048630160 M:1839009792 DEBUG: GL: Creating V NPOT texture of size 360 x 240
10:06:07 T:3048630160 M:1839009792 DEBUG: GL: Creating Y NPOT texture of size 720 x 480
10:06:07 T:3048630160 M:1839009792 DEBUG: GL: Creating U NPOT texture of size 360 x 120
10:06:07 T:3048630160 M:1839009792 DEBUG: GL: Creating V NPOT texture of size 360 x 120
10:06:07 T:3048630160 M:1839009792 DEBUG: GL: Creating Y NPOT texture of size 720 x 480
10:06:07 T:3048630160 M:1839009792 DEBUG: GL: Creating U NPOT texture of size 360 x 120
10:06:07 T:3048630160 M:1839009792 DEBUG: GL: Creating V NPOT texture of size 360 x 120
10:06:07 T:3048630160 M:1838243840 INFO: GL: ARB Imaging extension supported
10:06:07 T:2806270864 M:1836257280 DEBUG: CALSADirectSound::CALSADirectSound - Channels: 2 - SampleRate: 48000 - SampleBit: 16 - Resample false - Codec AC3 - IsMusic false - IsPassthrough true - audioDevice: default
10:06:07 T:2806270864 M:1836290048 DEBUG: Initialize - using alsa device iec958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2
10:06:07 T:2806270864 M:1836290048 ERROR: Initialize - device iec958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2 busy retrying...
10:06:07 T:2806270864 M:1836417024 ERROR: Initialize - failed to open custom device iec958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2, retry with default iec958
10:06:07 T:2806270864 M:1836417024 ERROR: Initialize - pcm_open_lconf, alsa error: -16 - Device or resource busy
10:06:07 T:2806270864 M:1836634112 ERROR: Creating a Null Audio Renderer, Check your audio settings as this should not happen
10:06:07 T:2806270864 M:1836761088 DEBUG: CDVDPlayerAudio:: Discontinuty - was:971730.286000, should be:16.180565, error:-971714.105435
10:06:07 T:2806270864 M:1836761088 WARNING: CDVDMessageQueue(audio)::Get - retrieved last data packet of queue
10:06:07 T:3048630160 M:1836761088 DEBUG: ------------------- GUI_MSG_WINDOW_INIT
10:06:07 T:3048630160 M:1836761088 DEBUG:
</snip>
Reply
#17
Appologies for uploading the log file 'binary'. Just uploaded it 'ascii' so it should appear fine now! Blush
Reply
#18
From what I understand about PulseAudio is that it is configured to use Alsa, and it sits in between applications and alsa. Alsa can be configured to use the PulseAudio device, and any alsa supported applications can use the PulseAudio, like a backwards compatibility thing. Also applications which support PulseAudio can use the pulseaudio device which uses the alsa device ultimately.

XBMC seems to be configured to use PulseAudio, and when it tries to do a passthrough, it's not able and falls back to the alsa device you've defined, however, for some reason it's busy. This may be because PulseAudio actually has authority over the alsa audio device.

The easiest fix would be to remove PulseAudio, it doesn't have much application in regards to an HTPC. Typically only one thing is going on at any given time anyway, and the purposes of PulseAudio hold little significance in that senario.

Another thing you might try is to use asoundconf and define which card to use as the default card, as it looks to me that Alsa might be configured somehow on the backend to use PulseAudio as the default device.
Code:
asoundconf set-default-card CMI8738
After you do either, you can run the following to test to see if the device works.
Code:
speaker-test -Dplug:iec958 -c 6
Make sure that XBMC, or any other application which might want to use audio is not currently running, otherwise an error will be displayed.
Reply
#19
No change in XBMC - still the same 'failure to initialize audio device' error.
Running the speaker-test I'm only getting pink noise from the left and right channels, when the test tone passes to the C,RS,LS,LFE I get nothing.

Was I supposed to remove the pulse audio driver also?
Reply
#20
Theoretically you shouldn't have to but it seems it's not the case in practice. You can do
Code:
apt-get remove pulseaudio
In order to remove the PulseAudio layer.
Reply
#21
still no luck. Any other ideas?

Thanks a bunch for the help anyways!
Reply
#22
A correction to my above post...
Removing Pulseaudio did work! I accidentally re-booted into a different install of ubuntu when I was testing it.

I found now two things that work but do not know which is the better to follow:

1. create asound.conf (/etc/asound.conf) with the following content:
Code:
pcm.!default {
  type plug
  slave {
    pcm "spdif"
    rate 48000
    format S16_LE
  }
}

-or-

2. sudo apt-get remove pulseaudio

Which do you think is the better choice?

Note: neither one of these provide a solution to another issue of not being able to play 44khz DTS wav files - do you know of a solution?

Thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
Failure to initialize audio device0