Kodi Community Forum
[LINUX] HOW-TO get multi-channel HD sound output working over NVIDIA HDMI - Printable Version

+- Kodi Community Forum (http://forum.kodi.tv)
+-- Forum: Announcements, Info, and General Discussion (/forumdisplay.php?fid=85)
+--- Forum: Tips, tricks, and step by step guides (/forumdisplay.php?fid=110)
+--- Thread: [LINUX] HOW-TO get multi-channel HD sound output working over NVIDIA HDMI (/showthread.php?tid=59877)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30


- Ooblivion - 2009-11-06 06:50

Thanks again, alan, for the help!

Quote:Sure you have these custom files ?

~/.pulse/default.pa ~/.pulse/daemon.conf /etc/asound.conf

It turns out I didn't have the /etc/asound.conf custom file. I must have accidentally skipped that line in the tutorial. I added it. Good call!

But...it didn't seem to do anything, as after a reboot I still don't have any sound. Frown

Quote:In PA manager could you please check the sink device pulseaudio uses ?
The PA manager showed:

Default Sink: alsa_output.hw_0_3
or "HOA NVidia - NVIDIA HDMI"


I retried xbmc and also other things in gnome and still no sound.

I'm using XBMCLive, it turns out. Not a full Ubuntu install. (although I hope that doesn't make a difference).


I just want to have gui sounds along with the sound from xbmc and other programs (like hulu desktop).
Can I get this if I use the ALSA method? Maybe I should abandon the PulseAudio attempt. Oo


Thanks again for the help and feedback!


- alanwww1 - 2009-11-06 09:35

Ooblivion Wrote:I'm using XBMCLive, it turns out. Not a full Ubuntu install. (although I hope that doesn't make a difference).I just want to have gui sounds along with the sound from xbmc and other programs (like hulu desktop).
Can I get this if I use the ALSA method? Maybe I should abandon the PulseAudio attempt. Oo

In Pulseaudio everything seems to be ok. (just one thing came into my mind. Check

Code:
speakertest -Dhw:0,3 -r44100 -c2

If not working than Alsa can not use the 44100khz sampling rate. This case you have not done the Alsa upgrade steps correctly.)

Why are you using XBMC_Live if you want to use also Gnome desktop ?
XBMC_live missing a lot of packages and settings, focusing only the necessary things for running xbmc. I am not really sure what else is missing now, which make things not working.

Tha Alsa way is perfectly good for xbmc_live, but in this case you can not have two apps using the soundcard at the same time. If i were you, i'd rather install a full Ubuntu Desktop version and install xbmc over it, with Pulseaudio way. But before that you could try the Alsa way. Just remember to change the gnome sound setup to Alsa.


- Ooblivion - 2009-11-06 16:36

The 44100khz sampling rate test didn't work. So there is something wrong with that. I think it was 48k sample rate that did work.

I had a question. Since my TV is only 2 channel (left and right), do I need to update the daemon.conf file and the default.pa file to only use 2 channel, instead of the 6 channel that was set in your tutorial?

How do I set the system to use 44100khz sample rate correctly?


Who knew that audio would be such an issue for me!

Thanks again for all your help and support!


- alanwww1 - 2009-11-06 17:31

Ooblivion Wrote:The 44100khz sampling rate test didn't work. So there is something wrong with that. I think it was 48k sample rate that did work.

Now i see your problem. I think that your problem is that your TV does not support 44100hz. As pulseaudio's default sampling rate is 44100 that's why you can not hear anything on your tv. Speaker test without the -r option defaults to 48khz, this is why it worked for you previously.

What we can do is modify pulseaudio configuration to use 48khz frequency, with 2 channels.

Sorry but my guide was for multichannel audio, with the capable av receiver.

Now change in default.pa:

Code:
load-module module-alsa-sink device=hw:0,3 channels=2 channel_map=front-left,front-right

And in daemon.conf

Code:
default-sample-format = s16le
default-sample-rate = 48000
default-sample-channels = 2

This way it should work.


- Ooblivion - 2009-11-06 19:45

Wooo Hooo! Big Grin Success! Nod

It all works now! Great catch, alan. And I thank you so much for all the help!


Now I just need to setup my system again so xbmc starts on bootup. It got messed up when I installed gnome. .... but that's for another forum topic.


Thanks again!


- Ooblivion - 2009-11-06 22:35

I did some messing around and got xbmc to start at bootup.

But I think my kludge isn't too good - since my audio is gone when xbmc is up. I guess I need to run pulseaudio somewhere in the xbmc startup scripts?

Man....so close.....



I was thinking about installing the new xbmc-live 9.11 alpha..... but my guess is that this will screw up the pulseaudio setup....


- alanwww1 - 2009-11-06 22:53

Ooblivion Wrote:I was thinking about installing the new xbmc-live 9.11 alpha..... but my guess is that this will screw up the pulseaudio setup....

I'd rather suggest installing Ubuntu Desktop Karmic than install xbmc over it. Because you don't need multichannel sound nor 44100hz support you can skip the alsa upgrade part.

You will have a perfectly set up gnome system WITH pulseaudio. This case you just need to modify these two files as i wrote in my last post and you are all set up. Sure and easy thing.

Karmic is really great. Give it a try !


- durandal2401 - 2009-11-07 16:49

Hi

I tried your method over a clean install of XBMC Live 9.11 on a ASRock ION 330 with the alsa way, but when trying speaker-test I only get audio from the front left and right speakers. I also tried some other things I found in this forum, but I can't seem to get multichannel audio working.

Any help would be appreciated.


- alanwww1 - 2009-11-07 17:06

durandal2401 Wrote:Hi

I tried your method over a clean install of XBMC Live 9.11 on a ASRock ION 330 with the alsa way, but when trying speaker-test I only get audio from the front left and right speakers. I also tried some other things I found in this forum, but I can't seem to get multichannel audio working.

Any help would be appreciated.

Not too much information about your system, setup, alsa output etc.
I can't help this way.

Anyway i will try to add a new part to the guide focusing the new XBMC_Live 9.11 as a lot of people will use this. So stay tuned till i prepare this guide.


- durandal2401 - 2009-11-07 18:57

Of course.

I started from scratch now, this time with a ubuntu minimal install, but same problem again.

I did the following steps

Installed ubuntu minimal 9.10
Installed nvidia driver 190
Setup alsa with your method
installed xbmc 9.11

cat /proc/asound/version:
Code:
Advanced Linux Sound Architecture Driver Version 1.0.21.
Compiled on Nov  7 2009 for kernel 2.6.31-14-generic (SMP).

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

aplay -L:
Code:
default:CARD=NVidia
    HDA NVidia, VT1708S Analog
    Default Audio Device
front:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Analog
    Front speakers
surround40:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=NVidia,DEV=0
    HDA NVidia, VT1708S Digital
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, NVIDIA HDMI
    HDMI Audio Output
null
    Discard all samples (playback) or generate zero samples (capture)

alsamixer shows 1.0.21 and master, front, line, mic, S/PDIF, S/PDIF Default PCM, S/PDIF 1

when doing this step:
Code:
/usr/bin/amixer -q -c 0 sset 'Master',0 unmute && /usr/bin/amixer -q -c 0 sset 'Master',0 100
I got:
sudo alsactl storeamixer: Unable to find simple control 'Master',0

when trying speaker-test -Dhdmi -c6 -r192000 -FS32_LE
I only get sound from the front left and right speakers

Is this enough info?


- alanwww1 - 2009-11-07 22:44

durandal2401 Wrote:when doing this step:
Code:
/usr/bin/amixer -q -c 0 sset 'Master',0 unmute && /usr/bin/amixer -q -c 0 sset 'Master',0 100
I got:
sudo alsactl storeamixer: Unable to find simple control 'Master',0

when trying speaker-test -Dhdmi -c6 -r192000 -FS32_LE
I only get sound from the front left and right speakers

Is this enough info?
You mean ALL channels sound from left or right or when speaker test tries to play sound from eg. rear left you don't hear any sound ?

Are you sure your AV receiver can do multichannel lpcm. What type of receiver do you have ?

From your info it seems to be everything ok. Something should be with your receiver.


- durandal2401 - 2009-11-08 00:20

Receiver is a pioneer vsx919, I got multichannel working before in windows.

On front left and right I hear something, on the other channels nothing.

Meanwhile I tried another setup, XBMC Live 9.04.1 with nvidia drivers 185 and then your script, now all channels work...

Anything different with XBMC 9.11 or ubuntu 9.10 that prevents this from working?


- michal - 2009-11-08 00:23

By this time next week my Pioneer VSX-919AH will arrive and I may encounter the same problem.

I hope that by that time I can use my G210 with HDMI audio but I'm not holding my breath. I've gone back to a 8600GS connected to the motherboard S/PDIF connector.

EDIT: Oh, and the receiver can DEFINITELY handle LPCM on all 7.1 channels as per this entry in the manual.


- alanwww1 - 2009-11-08 00:34

durandal2401 Wrote:Receiver is a pioneer vsx919, I got multichannel working before in windows.

On front left and right I hear something, on the other channels nothing.

Meanwhile I tried another setup, XBMC Live 9.04.1 with nvidia drivers 185 and then your script, now all channels work...

Anything different with XBMC 9.11 or ubuntu 9.10 that prevents this from working?

My guide was based on Ubuntu Jaunty. I have to investigate, what's the difference why it is not working for you.


- lloydsmart - 2009-11-08 13:07

Hi, I'm on Karmic 9.10 and I tried to follow this guide, but it didn't work for me.

I'm using an ASUS M3N78-PRO motherboard, which features the Nvidia 8300 chipset for onboard HDMI supporting AC3 and DTS passthrough, and up to 7.1 LPCM (but not bitstreaming the new Dolby THD or DTS HD-MA). My computer is connected to my Onkyo 705 receiver/amp via HDMI. This amp supports all the formats you could throw at it. It even does the HD bitstreaming, but the motherboard doesn't, so that's beside the point.

What I'd like to achieve is a situation where I can just launch XBMC and have everything play properly. My library is a mixture of stereo soundtracks (AAC, MP3, etc.) and 5.1 soundtracks (AC3 and DTS). At the moment, I seem to have broken sound on my setup alltogether, but before I started this the following was working:

I had all my OS sounds (zips and whooshes) working in Ubuntu, and sound in other applications worked fine. This was all through PulseAudio, and it was over HDMI, in stereo. When I loaded up XBMC, I could play all my stereo sources just fine, and the interface sounds worked great, but I couldn't play any DTS or AC3 tracks. I got the "cannot initialize audio device" message.

But... I was able to get AC3 and DTS bitstreamig (so the lights came on on my amp) like this:
  1. Go into System -> Preferences -> Sound in Ubuntu, click on the "Hardware" tab.
  2. Select the second device, which is labelled "Internal Audio. 1 Output. Digital Stereo (HDMI) Output."
  3. Change "Profile" from the menu from "Digital Stereo (HDMI) Output" to "Off"
  4. Press "Close".

Then when I launch XBMC, I can play AC3 and DTS tracks, but not anything else! Aaagh!

I followed your guide hoping that it would solve my problem and get everything working in XBMC, at the acceptable expense of system sounds. Now, I have no sound at all, and I'm not sure how to fix it. I've run your script with the "-r" option to remove the ALSA update, and have followed the "uninstall" instructions given in the first post, and I think I now have PulseAudio reinstalled, but even though I've set everything back to the way it was in Ubuntu's sound preferences, I get no sound now. Not from XBMC or Ubuntu.