HDMI audio not working with HD files

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Terminum Offline
Junior Member
Posts: 5
Joined: Apr 2012
Reputation: 0
Post: #1
I have XBMCbuntu Eden 11.0 installed on a Zotac ZBox ID31 with Next-Generation NVidia ION GPU, and have it successfully streaming video files from my Windows home server. Both audio and video work fine through HDMI when I'm playing low res video files, but only the video is coming through for HD files. For these files, I get a "failed to initialize audio device" error.

I've tried numerous configurations in the audio setup but can't seem to get it working. I've come across quite a few threads where people needed to create a asound.conf file but not sure if this is necessary for me (those threads seem to imply the audio was not working at all over HDMI).

Also, I have zero linux experience and don't really know what I'm doing, so if you can help please don't gloss over the basics Big Grin



Thanks in advance
(This post was last modified: 2012-04-30 04:38 by Terminum.)
find quote
elpirata Offline
Member
Posts: 81
Joined: Nov 2009
Reputation: 0
Post: #2
Well, for one thing I'm not an advanced linux user myself (not a new guy either, just small-to-medium experience). I dont use XBMCbuntu but from the lil' I know its basically Ubuntu. I've had problems with some HD files myself, specifically Dolby DTS and Dolby Digital and mostly these problems were restricted to MKVs.

My system has 2 audio cards, one analog with typical 5.1 setup (3 stereo plugs = 6 channels) and then the HDMI audio from the Geforce GT210 (which to enable I had to read many times the wiki here in xbmc.org). Since you say you have audio over HDMI I guess you dont have to bother with that.

But, 2 things I've noted that might be helpful to consider (if you haven't done so)...

1- Set the speakers to 5.1. At first I had them set as 2.0 because it says its HDMI stereo, so I thought... but switching to 5.1 then allowed me to listen to most of the HD movies I had (AAC audio, AVI's and MP4's) but it gave me troubles with DTS and Dolby Digital HD movies I had.

2- For some reason I didnt noticed that whenever I had HDMI audio I had both Dolby Digital and DTS capable receiver options checked. When Im using the analog option these dont even show up (and they both work flawlessly) but since I'm using the HDMI then like I didnt bother to try them off. But today I did, I checked both off and to my surprise I have audio on both of these formats working.

I hope this helps you. Sorry if its of not much help...

ELP

HP Compaq DC7100CMT: Intel Pentium 4 2.8Ghz, EVGA Geforce210 512MB DDR3, 640MB DDR (ewww), Ubuntu 10.10, Eden, Aeon skin. Audio: Analog 5.1 and HDMI (Thru Onkyo TX-SR501 analog 5.1 or DTS via coaxial).
find quote
Cykle Offline
Junior Member
Posts: 36
Joined: Nov 2011
Reputation: 0
Post: #3
Just installed XBMCBuntu first time yestoday (been playing with openelec first but never seemed to get the audio working correct) i had to enable HDMI - 2.0 - no AC3 - no DTS - hdmi (alsa) - hdmi (alsa)
if i enable 5.1 / 5.0 my center doesnt work

Guess im going back to windows if i dont find a solution in near time :o(
find quote
boosted Offline
Member
Posts: 61
Joined: Oct 2011
Reputation: 0
Location: New Zealand
Post: #4
This is how I got HDMI audio and DTS / AC3 passthrough to work. I have an NVidia GTX460 connected to my receiver. I have onboard audio disabled in the BIOS.

Run aplay -l in a terminal window

Code:
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Through trial and error I found that 'device 7' works for me by changing the following. You can see it's card 0 and device 7 on mine
Allways backup files first.

Add / modify /etc/asound.conf
Code:
pcm.!default {
    type hw
    card 0
    device 7
}

ctl.!default {
    type hw          
    card 0
    device 7
}

If you are running pulseaudio add the following to /etc/pulse/default.pa
Code:
load-module module-alsa-sink device=hw:0,7

in xbmc audio options set
Code:
Audio output                       HDMI
Speaker Configuration              5.1
Enable AC3 and DTS
Audio output                       custom
                                   hw:0,7
Passthrough output                 custom
                                   hw:0,7
(This post was last modified: 2012-04-30 08:27 by boosted.)
find quote
Terminum Offline
Junior Member
Posts: 5
Joined: Apr 2012
Reputation: 0
Post: #5
Thank you for the responses so far.

Yes, you are right elpirata, it seems to only occur for mkv files. I have tried speaker configuration 2, 3, 5, and 5.1 but did not have any luck there (I only have a left, right, and a sub if that matters). I tried changing the other radio button settings as well which did not seem to do anything for this issue.

Just now I tried changing XBMC to use the Analog setting and plugged a cable into the headphone jack of box running XBMC live... Interestingly I get the same results - audio does not work for mkv files, but works fine for other file types.

Thanks for the details from the last poster as well, but based on the new information that it seems only related to mkv files does your advice still apply? I don't really know what 'DTS / AC3 passthrough' means and I wanted to only mess with the asound.conf as a last resort Big Grin

By the way, I would prefer to use hdmi instead of analog, as I usually use that cable to play music from an iPod and would rather not have to switch them out all the time. I just wanted to do some more trouble shooting and hopefully provide some more information.



Edit: Also, I could not find the option to disable onboard audio in my BIOS. I could not find anything like an Integrated Peripherals section at all actually. The top tabs are: Main, Advanced, Boot, Chipset, Perform Settings, Exit. Under Advanced I have: PC Health Monitor, USB Configuration, CPU Configuration, IDE Configuration, ACPI, PCIPnP, and Security.
(This post was last modified: 2012-04-30 21:05 by Terminum.)
find quote
boosted Offline
Member
Posts: 61
Joined: Oct 2011
Reputation: 0
Location: New Zealand
Post: #6
(2012-04-30 17:58)Terminum Wrote:  Thank you for the responses so far.

Yes, you are right elpirata, it seems to only occur for mkv files. I have tried speaker configuration 2, 3, 5, and 5.1 but did not have any luck there (I only have a left, right, and a sub if that matters). I tried changing the other radio button settings as well which did not seem to do anything for this issue.

Just now I tried changing XBMC to use the Analog setting and plugged a cable into the headphone jack of box running XBMC live... Interestingly I get the same results - audio does not work for mkv files, but works fine for other file types.

Thanks for the details from the last poster as well, but based on the new information that it seems only related to mkv files does your advice still apply? I don't really know what 'DTS / AC3 passthrough' means and I wanted to only mess with the asound.conf as a last resort Big Grin

By the way, I would prefer to use hdmi instead of analog, as I usually use that cable to play music from an iPod and would rather not have to switch them out all the time. I just wanted to do some more trouble shooting and hopefully provide some more information.



Edit: Also, I could not find the option to disable onboard audio in my BIOS. I could not find anything like an Integrated Peripherals section at all actually. The top tabs are: Main, Advanced, Boot, Chipset, Perform Settings, Exit. Under Advanced I have: PC Health Monitor, USB Configuration, CPU Configuration, IDE Configuration, ACPI, PCIPnP, and Security.

In xbmc under audio settings if you disable 'DTS / AC3 passthrough' your mkv audio should work.
If your mkv movies are DTS / AC3 and 'passthrough is enabled, xbmc will give you that error if you don't have the correct 'Passthrough' audio device selected. Passthrough means that xbmc will let the connected device eg receiver or TV decode the audio.
The changes I suggested should allow 'passthrough' to work.
Disabling onboard audio is useful if you only want audio via HDMI, less options to pick from.
find quote
Jan-Erik Offline
Junior Member
Posts: 40
Joined: Jan 2012
Reputation: 0
Post: #7
I had problem with sound going to the right speaker too.
Have tried to find the perfect setup, but want to find setup that support remap channels, navigating sound and Crossover music

Leave "/etc/asound.conf" empty and have this in "~/.asoundrc"
Code:
pcm.!default {
  type plug
  slave.pcm "dmix:0,3"
}

pcm.hdmi-remap {
  type route
  slave.pcm hdmi
  ttable.0.0 1
  ttable.1.1 1
  ttable.2.4 1
  ttable.3.5 1
  ttable.4.2 1
  ttable.5.3 1
  ttable.6.6 1
  ttable.7.7 1
}

Audio output:
Audio output device: Custom
Custom audio device: hdmi-remap
Passthrough output device: hdmi (ALSA)

Make sure you use the right card & device. use "aplay -l" and change "dmix:0,3" with your dmix:card,device number

Hope this helps?

/Jan-Erik

XBMCbuntu Eden
Acer Aspire 3600, NVidia ION
Linux 3.0.0-24-generic (Now running stable without any freeze)
find quote
Terminum Offline
Junior Member
Posts: 5
Joined: Apr 2012
Reputation: 0
Post: #8
I've been busy this week, but still have put in a good chunk of time trying to figure this out. I still have no clue why everyone puts completely different stuff in their asound.conf file or how I know exactly what to put there Big Grin

After trying boosted's suggestion, I now have sound on the hdmi setting - but I only get static for all file types (both mkv files and files labeled as SD). For some files it is choppy static, for other files it is just constant white noise static. So I'm not sure if this is one step forward or two steps back, but here's what I did:

Code:
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC888 Analog [ALC888 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC888 Digital [ALC888 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Performed speaker test with various numbers and finally got:
Code:
hello@media-player:~$ speaker-test -D plughw:1,3

speaker-test 1.0.24.2

Playback device is plughw:1,3
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 1048576
Period size range from 32 to 524288
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
0 - Front Left
Time per period = 11.039811
0 - Front Left
Time per period = 11.039934
0 - Front Left


Created a /etc/asound.conf with vi:
Code:
pcm.!default {
type hw
card 1
device 3
}

ctl.!default {
type hw          
card 1
device 3
}
(This post was last modified: 2012-05-06 23:47 by Terminum.)
find quote
Plaguester Offline
Senior Member
Posts: 262
Joined: May 2010
Reputation: 7
Post: #9
Avoid messing with /etc/asound.conf or ~/.asoundrc until after you get passthrough working (rename the file to something else or remove it entirely). Your NVidia HDMI audio device shows up as card 1. Try disabling the onboard sound in the BIOS and then run "aplay -l" again to see if you get different output.

Secondly, be sure that the connected device (TV, receiver, whatever) actually supports decoding DTS and AC3 audio.

HTPC 1 - Zotac ZBOX ID80U | 4GB RAM | 64GB SSD | Openelec | Confluence
HTPC 2 - Zotac ZBOX ID41U | 4GB RAM | 60GB SSD | Openelec | Confluence
Server - unRAID Server | 3 x 2TB WD Green HDD, 1TB WD Black HDD (Cache) | Sabnzbd | CouchPotato | Sickbeard
(This post was last modified: 2012-05-07 01:09 by Plaguester.)
find quote
Terminum Offline
Junior Member
Posts: 5
Joined: Apr 2012
Reputation: 0
Post: #10
(2012-05-07 01:07)Plaguester Wrote:  Avoid messing with /etc/asound.conf or ~/.asoundrc until after you get passthrough working (rename the file to something else or remove it entirely). Your NVidia HDMI audio device shows up as card 1. Try disabling the onboard sound in the BIOS and then run "aplay -l" again to see if you get different output.

Secondly, be sure that the connected device (TV, receiver, whatever) actually supports decoding DTS and AC3 audio.

Thanks Plaguester,

I did try to disable the onboard audio, but I mentioned earlier that I could not find the option to disable it in my BIOS. I could not find anything like an Integrated Peripherals section at all actually. The top tabs are: Main, Advanced, Boot, Chipset, Perform Settings, Exit. Under Advanced I have: PC Health Monitor, USB Configuration, CPU Configuration, IDE Configuration, ACPI, PCIPnP, and Security.

Also, my receiver does say DTS surround sound and Dolby Digital Pro Logic II. The HDMI cable goes to my Panasonic G25 Plasma TV, and I'm using the same input that I previously used for my PS3 which had audio just fine through HDMI. I'm not sure, but I was assuming that's pretty much the same thing.
find quote
Plaguester Offline
Senior Member
Posts: 262
Joined: May 2010
Reputation: 7
Post: #11
(2012-05-07 01:39)Terminum Wrote:  Also, my receiver does say DTS surround sound and Dolby Digital Pro Logic II. The HDMI cable goes to my Panasonic G25 Plasma TV, and I'm using the same input that I previously used for my PS3 which had audio just fine through HDMI. I'm not sure, but I was assuming that's pretty much the same thing.

Wait, you have the HTPC hooked up to both the receiver and the TV? The typical connection is HTPC > Receiver > TV unless your receiver does not do video. With that setup (PC > receiver > TV), you will not get audio out of the TV (why would you want to) because most receivers do not pass audio over HDMI.

HTPC 1 - Zotac ZBOX ID80U | 4GB RAM | 64GB SSD | Openelec | Confluence
HTPC 2 - Zotac ZBOX ID41U | 4GB RAM | 60GB SSD | Openelec | Confluence
Server - unRAID Server | 3 x 2TB WD Green HDD, 1TB WD Black HDD (Cache) | Sabnzbd | CouchPotato | Sickbeard
(This post was last modified: 2012-05-07 04:58 by Plaguester.)
find quote
blm14 Offline
Senior Member
Posts: 165
Joined: Nov 2009
Reputation: 0
Post: #12
^ have you updated your BIOS to the newest revision for your motherboard?
find quote
Terminum Offline
Junior Member
Posts: 5
Joined: Apr 2012
Reputation: 0
Post: #13
My setup goes from PC > TV > Receiver. The connection from the TV to my receiver is an optical audio cable because the receiver does not do video unfortunately. With this setup I'm pretty sure my TV converts it to 2-channel audio, but I'm fine with that since I only have two speakers and a sub. I'm not sure if that can simplify anything with my XBMC settings or not.

blm14, I'm pretty sure that you are right about my BIOS needing an update. However, it seems the manufacturer only offers a BIOS update utility for Windows. I've been waiting to hear back from their support about this which is one reason I haven't posted in a while. I've also been reading about BIOS flashing and it's a bit intimidating. With my combination of inexperience and luck I'll probably destroy my motherboard if I do it via the terminal.
find quote
boosted Offline
Member
Posts: 61
Joined: Oct 2011
Reputation: 0
Location: New Zealand
Post: #14
(2012-05-15 04:40)Terminum Wrote:  My setup goes from PC > TV > Receiver. The connection from the TV to my receiver is an optical audio cable because the receiver does not do video unfortunately. With this setup I'm pretty sure my TV converts it to 2-channel audio, but I'm fine with that since I only have two speakers and a sub. I'm not sure if that can simplify anything with my XBMC settings or not.

blm14, I'm pretty sure that you are right about my BIOS needing an update. However, it seems the manufacturer only offers a BIOS update utility for Windows. I've been waiting to hear back from their support about this which is one reason I haven't posted in a while. I've also been reading about BIOS flashing and it's a bit intimidating. With my combination of inexperience and luck I'll probably destroy my motherboard if I do it via the terminal.

Could you try the optical cable between your PC and Receiver and test the sound.
If you need a quick Windows environment to update your BIOS, try the new Windows 8 preview on USB flash drive. There are guides on Microsofts site.
(This post was last modified: 2012-05-15 08:35 by boosted.)
find quote
tarnishednite Offline
Junior Member
Posts: 2
Joined: Sep 2012
Reputation: 0
Post: #15
I have been having the same problem but made some progress

In XBMC audio settings

Turned off AC3 and DTS passtrhough
Set Passthrough to HDMI 0

This gets me audio for the first part of the HD (mkv) file - but I loose audio after that.

I have not made any changes to asound or anywhere else. My particular machine does not allow me to turn off onboard audio through BIOS.
find quote
Post Reply