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

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- 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


I decided to try it... - sierradump - 2009-11-14

Hardware = Acer Revo

Well since I was bored and sound wasn't working right in XBMC I decided to reinstall for the 1,000,000 time and try using your guide "THE ALSA WAY" to get this to work.

STEPS:

1.) installed minimal ubuntu
2.) installed my nVidia drivers
3.) followed PART 1 of your guide. Since I didn't install any sound stuff yet, I used your - DPI example.

I am now at the "waiting 10-15 minutes" step but I think I ran into trouble. I was tailing the install and it seems to be done -but finished with this message:

Code:
./pci/snd-bt87x.ko
./pci/ali5451/snd-ali5451.ko
./pci/au88x0/snd-au8820.ko
./pci/au88x0/snd-au8810.ko
./pci/au88x0/snd-au8830.ko
./pci/snd-ens1371.ko
./pci/snd-via82xx.ko
./pci/snd-ens1370.ko
chmod: cannot access `/dev/dsp': No such file or directory
chmod: cannot access `/dev/mixer': No such file or directory
chmod: cannot access `/dev/sequencer': No such file or directory
chmod: cannot access `/dev/midi': No such file or directory
rm: cannot remove `asound.state': No such file or directory

Any ideas? or is that normal?



EDIT/UPDATE:

I continued to PART 2 and now I have another issue:

Code:
root@XBMC-Revo1:/home/xbmc# /usr/bin/amixer -q -c 0 sset 'IEC958 Default PCM',0 unmute
amixer: Unable to find simple control 'IEC958 Default PCM',0

root@XBMC-Revo1:/home/xbmc# /usr/bin/amixer -q -c 0 sset 'IEC958',0 unmute && /usr/bin/amixer -q -c 0 sset 'IEC958',1 unmute
amixer: Unable to find simple control 'IEC958',1

root@XBMC-Revo1:/home/xbmc# sudo alsactl store
root@XBMC-Revo1:/home/xbmc# cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.21.
Compiled on Nov 13 2009 for kernel 2.6.28-16-generic (SMP).
root@XBMC-Revo1:/home/xbmc# aplay -l
**** 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 3: NVIDIA HDMI [NVIDIA HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@XBMC-Revo1:/home/xbmc#

as you can see these commands didn't work for me:
Code:
/usr/bin/amixer -q -c 0 sset 'IEC958 Default PCM',0 unmute
/usr/bin/amixer -q -c 0 sset 'IEC958',0 unmute && /usr/bin/amixer -q -c 0 sset 'IEC958',1 unmute

ALSA MIXER IS SHOWING "ZERO" IEC devices? But it is showing a S/PDIF which I DO NOT HAVE a plug for on the back of the device?


- Kali - 2009-11-14

@alanwww1, to speedup the alsa compilation process add to configure --with-cards="hda-intel" (the only needed driver)

on zotac ion but i think all ion based mb, can be also be added --with-card-options="hda-codec-nvhdmi,hda-codec-realtek"


- alanwww1 - 2009-11-14

Kali Wrote:@alanwww1, to speedup the alsa compilation process add to configure --with-cards="hda-intel" (the only needed driver)

on zotac ion but i think all ion based mb, can be also be added --with-card-options="hda-codec-nvhdmi,hda-codec-realtek"

Thx


- alanwww1 - 2009-11-14

sierradump Wrote:root@XBMC-Revo1:/home/xbmc# /usr/bin/amixer -q -c 0 sset 'IEC958 Default PCM',0 unmute
amixer: Unable to find simple control 'IEC958 Default PCM',0

These amixer lines are just for unmuting the necesary controls. I should have just written: run alsamixer and unmute your hdmi, iec channels.

So i think your setup is ok.


- sierradump - 2009-11-14

@alanwww1

But I no longer have any IEC958 option in my ALSAMIXER. Originally I had IEC958 and I could mute/unmute.

After following your guide, when I type ALSAMIXER, I have SEVERAL new channels but "ZERO" IEC958?

I now see something called PCM. I did NOT have that before?

SO--- Does it seem correct that I have NO (zero) IEC958 channels in my Alsamixer?

What then do I do for that step -- Do I just unmute the PCM and MASTER channels?





P.S.

What about this error, is it normal?

Code:
./pci/au88x0/snd-au8830.ko
./pci/snd-ens1371.ko
./pci/snd-via82xx.ko
./pci/snd-ens1370.ko
chmod: cannot access `/dev/dsp': No such file or directory
chmod: cannot access `/dev/mixer': No such file or directory
chmod: cannot access `/dev/sequencer': No such file or directory
chmod: cannot access `/dev/midi': No such file or directory
rm: cannot remove `asound.state': No such file or directory



- alanwww1 - 2009-11-14

@Sierradumb:

Just tray the speakerstest in an xterminal or gnome and you will see...


- sierradump - 2009-11-14

Sorry for so many questions - I am just confused as after I run through "part1" of your setup, I lost IEC958 in alsamixer, but now I have a PCM, S/PDIF and some other channels (which I did NOT have before?). Just trying to figure out what needs to be muted/unmuted.

Do I only need to unmute PCM? Or do I also need to unmute S/PDIF ?


- JUICESIX90 - 2009-11-14

Hi alanwww1,

I've managed to get mine working now. In xbmc I set both Audio Output Device: & Passthrough Output Device: to custom and manually typed in hdmi:CARD=NVvidia.

My only question is about the Onkyo amp (I've noticed in your posts you have one as well) When I play a movie Pure Audio mode kicks in on my amp (the little blue light). Do you have any idea if this is the optimal setting for this amp.

I've searched all over the net but just get conflicting information about it.

Thanks again.


- alanwww1 - 2009-11-14

JUICESIX90 Wrote:Hi alanwww1,
My only question is about the Onkyo amp (I've noticed in your posts you have one as well) When I play a movie Pure Audio mode kicks in on my amp (the little blue light). Do you have any idea if this is the optimal setting for this amp.

I've searched all over the net but just get conflicting information about it.

Thanks again.

If you don't want to use any sound tuning (like bass, balance etc,) than it is an ideal mode for you.


- JUICESIX90 - 2009-11-14

alanwww1 Wrote:If you don't want to use any sound tuning (like bass, balance etc,) than it is an ideal mode for you.

Thanks.

It's strange, on some forums I read people stating it's only for 2.1 but my rear speakers are clearly working. Others say that the sub woofer doesn't work but mine does!?!?

Well I think I'll stick with it, it sounds pretty good to me.

I don't know about you but I get very, very pedantic over these things Nerd I have to know if my set up is running the best it can or I won't sleep at night!Laugh


Still no sound? - sierradump - 2009-11-14

okay I am still having trouble with the audio. I have followed your guide but get no sound from my speakers.




Quote:alsamixer should show three iec devices, all has to be unmuted

My alsamixer is showing "0" iec devices. Here are a couple of screen grabs of the way I setup alsamixer -- Do I need to unmute the SPDIF channel? There are no spdif ports on this machine (no optical or analog).


Image

Image

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

aplay -l
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 3: NVIDIA HDMI [NVIDIA HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

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



--UPDATE-- Including my speaker test:

speaker-test -Dhdmi -c2 -r48000 -FS16_LE

Code:
speaker-test 1.0.21

Playback device is hdmi
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 16384
Period size range from 32 to 8192
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
0 - Front Left
1 - Front Right
Time per period = 5.630850

speaker-test -Dhdmi -c6 -r192000 -FS32_LE

Code:
speaker-test 1.0.21

Playback device is hdmi
Stream parameters are 192000Hz, S32_LE, 6 channels
Using 16 octaves of pink noise
Rate set to 192000Hz (requested 192000Hz)
Buffer size range from 32 to 2720
Period size range from 16 to 1360
Using max buffer size 2720
Periods = 4
was set period_size = 544
was set buffer_size = 2720
0 - Front Left
4 - Center
1 - Front Right
3 - Rear Right
2 - Rear Left
5 - LFE
Time per period = 17.962943



- alanwww1 - 2009-11-14

Sierredump !

Your setup seems fine.

You only have one iec device i think cause you don't have a separate iec device other than the hdmi port.

Before asking you can always try to unmute the one iec cahnnel and check. Nerd

Try it, be sure that you try speaker-test with xserver running !


- alanwww1 - 2009-11-14

JUICESIX90 Wrote:Well I think I'll stick with it, it sounds pretty good to me. I don't know about you but I get very, very pedantic over these things Nerd I have to know if my set up is running the best it can or I won't sleep at night!Laugh

You can be sure that this way you get the best quality. Now you only need hd quality stuff to play.


- sierradump - 2009-11-14

alanwww1 Wrote:Sierredump !

Your setup seems fine.

You only have one iec device i think cause you don't have a separate iec device other than the hdmi port.

Before asking you can always try to unmute the one iec cahnnel and check. Nerd

Try it, be sure that you try speaker-test with xserver running !


alanwww1,


I REALLY APPRECIATE YOUR HELP! I am not the best with linux.

UPDATE! I am getting closer I think. I NOW HAVE SOME SOUND! Even the XBMC event sounds. But I am unable to make my "XBMC Settings->System-> Audio Hardware " look like your alsa (part2) screenshots.

For "AUDIO OUTPUT DEVICE: = hdmi:CARD=NVidia" I don't have the "hdmi:CARD=NVidia" option? Do I set it to "CUSTOM" and then type "hdmi:CARD=NVidia" into the "custom audio device" ?


Also -- See below:


When you say "try speaker-test with xserver running" -- would having XBMC up and running on TV accomplish that?

When XBMC is running and I try:
Code:
speaker-test -Dhdmi -c2 -r48000 -FS16_LE

I get the following?

Code:
speaker-test 1.0.21

Playback device is hdmi
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy


Same with:

Code:
speaker-test -Dhdmi -c6 -r192000 -FS32_LE

I get:

Code:
speaker-test 1.0.21

Playback device is hdmi
Stream parameters are 192000Hz, S32_LE, 6 channels
Using 16 octaves of pink noise
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy



- alanwww1 - 2009-11-15

sierradump Wrote:UPDATE! I am getting closer I think. I NOW HAVE SOME SOUND! Even the XBMC event sounds. But I am unable to make my "XBMC Settings->System-> Audio Hardware " look like your alsa (part2) screenshots.

For "AUDIO OUTPUT DEVICE: = hdmi:CARD=NVidia" I don't have the "hdmi:CARD=NVidia" option? Do I set it to "CUSTOM" and then type "hdmi:CARD=NVidia" into the "custom audio device" ?


When XBMC is running and I try:
Code:
speaker-test -Dhdmi -c2 -r48000 -FS16_LE

I get the following?

Code:
speaker-test 1.0.21

Playback device is hdmi
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy
Playback open error: -16,Device or resource busy

[/CODE]

It's all normal. In xbmc settings it looks different,because it changed through the svns. I have to update the screenshot ! Just choose hdmi.

The busy error you get cause xbmc is using the soundcard. Never mind that. If xbmc works, you are all set.