Kodi Community Forum

Full Version: HDMI Audio
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi all im new to ubuntu and to xbmc and i'm having problem setting up my system.

I have a dell optiplex 760 with a radeon HD 5400 graphics card (with HDMI port) running ubuntu 12.04.
When I play SD videos with mp3 sound all works fine, but if i play a HD video failed to initialize audio device.

I have tried to change the audio settings on the system but no luck.

I really hope that someone can help or I will have to go back to windows on this system and I've just got rid of all my windows machine's.

Thanks.
You are outputting the sound through HDMI right? Try this:

from shell:

Code:
$aplay -l

this is what my output looks like:

Code:
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC662 rev1 Digital [ALC662 rev1 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

You see how one of those is the HDMI sound out? In my case it's card 0, device 3.

now, from a shell type sudo nano /etc/asound.conf and put in that file the following:


pcm.force48 {
type rate
slave {
pcm "hw:0,3"
rate 48000
}
}

And replace "hw:0,3" with whatever the card, device number were from the output of aplay -l for the HDMI device in your system. Then reboot the system.

Finally, in XBMC, go to system->system->audio output and put the following settings:

under audio output: HDMI
under audio output device: custom and type in force48
under passthrough audio device: custom and type in force48
Does the live cd use pulse or alsa? If pulse, no need to muck with those file, just use pavucontrol.
(2012-05-06, 15:48)blm14 Wrote: [ -> ]You are outputting the sound through HDMI right? Try this:

from shell:

Code:
$aplay -l

this is what my output looks like:

Code:
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC662 rev1 Digital [ALC662 rev1 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

You see how one of those is the HDMI sound out? In my case it's card 0, device 3.

now, from a shell type sudo nano /etc/asound.conf and put in that file the following:


pcm.force48 {
type rate
slave {
pcm "hw:0,3"
rate 48000
}
}

And replace "hw:0,3" with whatever the card, device number were from the output of aplay -l for the HDMI device in your system. Then reboot the system.

Finally, in XBMC, go to system->system->audio output and put the following settings:

under audio output: HDMI
under audio output device: custom and type in force48
under passthrough audio device: custom and type in force48

ok thanks for this.
Ive done all of the above and Im alittle better mp3 audio still works but with dolby 2.0 and above i get a clicking noise, with dts audio I get really bad static like you used to get when you have not tuned an old tv in properly.

Is the audio going into a television? if so, you don't want dts on.
yes the audio is going to a tv the file I am tring to play is a Blueray file I havent changed anything, like I said Im a n00b to all this Smile
So am I, no worries.

If you're going into a TV, you want the top option on, and the bottom two off (if that makes sense?)
it did and everything is working now thanks to everyone for the quick help Smile
I have the same problem - no audio over hdmi with ati hd5400 pci-e. Running xbmcuntu eden. HDMI to Integra 9.8 to TV. Opened a terminal and did $ aplay -l and got this output:

card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: AD198x Digital [AD198x Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0

then i did sudo /etc/asound.conf and entered the following:

pcm.force48 {
type rate
slave {
pcm "hw:1,3"
rate 48000
}
}

Saved and in XBMC set:

audio output: HDMI
audio output device: custom and force48
passthrough audio device: custom and force48

rebooted. Video comes up. Receiver displays 'no signal' for the audio. Go to music and play an mp3 and no sound.

Test
Select each audio setting one at a time and reboot
All but the custom setting return a 'failure to initialize audio device' error

I'm stumped. Suggestions most appreciated!
When i installed xbmc i used a pc monitor and analog audio for testing before moving it to the media room.

Just noticed the bios is a03 so will download and install most current (A15)...