Linux XBMC - Failed to initialize Audio device
#1


Hiya,

I have been using XBMCLive /win7 dual boot for over 3 years then one day it all messed up so Ive decided to take the plunge and go for all Linux on my media PC.....

Acer Revo R3610, 2GB RAM, 320GB
installed ubuntu 12.04 64bit
latest version of xbmc v11.0
latest nvidia drivers v304.37
hdmi into sony 40" lcd

spdif optical into sony dts amp

When playing some 720p mkv files

smplayer
video juddery but audio OK

settings - alsa (0.0 hda nvidia)
ac3/dts pass thorugh spdif ticked
channels by default 6 (5.1 surround)

XBMC

Video fine but no audio at all I get what after searching google seems to be the dreaded "Failed to initialize Audio device. check your audiosettings"

I get the same error if i try to play an mp3 file as well.

In XBMC system audio setup there is a long list of audio output devices and I'm sure I've tried them all with no luck.

Audio device - Optical/coax

audio output - Ive tried all combos of iec958

audio passthru output - Ive tried all combos of iec958

In System Settings -> Sound I have
HDMI /DisplayPort - I do a test and no sound comes out my TV
Digital Output SPDIF - I do the Test and it is OK

Had a look in XBMC and CPU1 was at 70%, CPU2,3,4 were at about 30% and all that was running XBMC and Deluge Seems noiser than before when I had XBMCLive/Win 7 dual boot

I need XBMC to work as I can’t get the screen to fit right on the normal Linux desktop, need to resize the picture like I can in XBMC

Any ideas?

Thanks,

Steve

Reply
#2
Steve / SlippyJim,

Check out this post I added to a while back for Linux support for audio.
http://forum.xbmc.org/showthread.php?tid=127428

For me I have an Acer Revo as well, and I found that the audio was muted, and that for some reason the default settings would not work for me regardless of which settings I chose from the list. In the end I used a custom string for plughw:1,3 or PLUGHW:1,3.

Read that post and see what you can get going. You may find that you get 2.0 MP3 sound working right away, but you may have to tinker with your settings to get the 5.1 AC3 sound working properly. My bet is that you will have this working if you follow my steps.

Good Luck!
Reply
#3
oooohhhh this looks a bit linuxy techy haha Will let you know how I get on
Reply
#4
Thanks for your help, but I'm still stuck.......
I forgot to say before that when I am in XBMC and I use my keyboard to navigate around I get noises out of my surround sound system - connected via SPDIF

I have tried a custom device of PLUGHW:0,0 and PLUGHW:0,1

On the alsa mixer I couldnt increase the volume on S/PDIF or S/PDIF D or unmute S/PDIF 1, but I was unsure how to unmute anyway

I think its best to explain my system with some screenshots
Image
Image
Image

Surely if I get sound from key presses it should work with mp3s and videos.....Huh
Reply
#5
I've just set Audio Output to Analogue and it is working.

On my previous XBMCLive I know I had it set to Digital which exactly same amp and TV, so something still isnt quite right but at least I've got something to play around with now
Reply
#6
Hopefully this will make more sense to you than me......

Ive just set it back to Optical/Coax and can get AAC audio to work but no digital sound at all
AAC will work with audio output device
defaults (pulseaudio)
Built in digital stereo iec958

But AAC will not work with (get same "failed to initialize..." error)
iec958 (alsa)
HDA nvidia default 0
HDA nvidia iec958 0
HDA nvidia default 1
HDA nvidia iec958 1
HDA nvidia default 3
HDA nvidia iec958 3
Custom - PLUGHW:0,1

For passthrough output I tried every iec958 device and get same "failed to initialize..." error

Now in alsamixer Ive got rid of the MM for S/PDIF 1and it now says 00, but I cant adjust the volume for any of the S/PDIF in alsamixer like I can for Master or PCM
In alsamixer all the levels have a chip of Nvidia MCP79/7A HDMI is this correct for the S/PDIF?

Thanks
Reply
#7
(2012-08-27, 23:21)slippyjim Wrote: Thanks for your help, but I'm still stuck.......
I forgot to say before that when I am in XBMC and I use my keyboard to navigate around I get noises out of my surround sound system - connected via SPDIF

I have tried a custom device of PLUGHW:0,0 and PLUGHW:0,1

On the alsa mixer I couldnt increase the volume on S/PDIF or S/PDIF D or unmute S/PDIF 1, but I was unsure how to unmute anyway

I think its best to explain my system with some screenshots
Image
Image
Image

Surely if I get sound from key presses it should work with mp3s and videos.....Huh

To unmute in alsamixer use the 'm' key... it toggles between 'mute' and 'unmute'.

Also Linux is very case sensitive. Instead of using PLUGHW:0,1 try plughw:0,1. In other words make it lower case.

Hope it helps.

Jerry
Reply
#8
Thanks for the suggestions, I've got it unmuted now and tried using lowercase but I still get the same error with both AAC and digitial sound.

It seems digital sound is being right painful!!!!
Reply
#9
SlippyJim,

When you say digital sound, you mean 5.1 audio for MKV files or something of the sort? Also, you are having no issues with MP3 2.0 channel sound?
I had to edit my asound.conf for 2.0 and 5.1 sound files.

Check this thread out:
http://forum.xbmc.org/showthread.php?tid...ght=asound

Just so you know:
~/.asoundrc will only be applied to the user's session
/etc/asound.conf will be applied to all sessions
Reply
#10
(2012-08-27, 23:54)slippyjim Wrote: I've just set Audio Output to Analogue and it is working.

On my previous XBMCLive I know I had it set to Digital which exactly same amp and TV, so something still isnt quite right but at least I've got something to play around with now

but that did not solve your problem with digital output.

Unmute device in alsa mixer.

Check yoru asound.conf.

Code:
defaults.ctl.card 0
defaults.pcm.card 0
defaults.pcm.device 1

Use plughw:0,1 not PLUGHW:0,1

that should fix it...

Reply
#11
In the end I gave up as 720p videos were quite juddery, so I installed Lubuntu 11.10 and everything is going fine, pretty much workign out the box apart from after installing the nvidia drivers the text went tiny, but I can live with that as i have everything I need set up now.

Thanks for the help
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC - Failed to initialize Audio device0