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

+- XBMC Community Forum (http://forum.xbmc.org)
+-- 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44


- 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?