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


- alanwww1 - 2009-10-19 23:44

chris2922 Wrote:Also, the speaker test no longer works - it used to work via Putty but now doesnt.
I enter: "speaker-test -Dhdmi -c6 -r192000 -FS32_LE"
And get:
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

Hi Chris !

Thanks's for the feedback!

You get the resource busy message because now your navsound are working and those keep up your device constantly. If you quit xbmc and just start Xserver (note that you need to have graphical interface started to get hdmi audio working) without xbmc, speaker-test will work again. But you'd rather listen to xbmc than speaker test right ? Wink

If you had some directory missing, please report which one, maybe i have some misstyping in the guide.


- michal - 2009-10-20 02:11

I don't suppose a speaker test feature could be added to XBMC itself?
Probably not the place to ask, but that would be great.


- pokerbud81 - 2009-10-20 03:19

Zotac Ion D-E XBMCLive +1 Perfect Guide no issues.


- nino - 2009-10-21 13:29

Hi

Firstly many thanks for your guide!

Im having a few issues with output from the speakers, let me describe my setup:

Acer Revo - Nvidia GPU with HDMI out

Bose V30 surround sound with HDMI inputs.

I followed the guide and recieved some errors when using amixer:

/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
amixer: Unable to find simple control 'IEC958 default pcm',0

on looking in alsamixer i do not have that channel/device, my selected device is:
Card: HDA Nvidia
Chip: Nvidia MCP7A HDMI

the out put of aplay is:

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)

Thanks in advance for any help, ive just spent a fortune on the surround sound system and im only getting 2.0 from the media server! D'OH!


- alanwww1 - 2009-10-21 16:45

nino Wrote:Thanks in advance for any help, ive just spent a fortune on the surround sound system and im only getting 2.0 from the media server! D'OH!

Why are your trying iec958 ? You should be trying hdmi device. The only way you can get multichannel lpcm.


- nino - 2009-10-21 21:55

Hi alanwww1

Sorry i was aimlessly folowing the tutorial as i know next to nothing about audio cards Confused

i have used XBMC with the hdmi options and im getting the output coming up as PCM 2.0 on the bose system.

Ive tried messing with the syntax of the commands but no joy, could you give me a few tips please.

thanks Big Grin

nino


- alanwww1 - 2009-10-21 23:15

When you type speaker-test -Dhdmi -c6 do you get an error message ? Are you sure the downmix to stereo option is unticked in xbmc ?


- michal - 2009-10-22 12:23

I find alsa configuration really confusing and was hoping you could help me out.

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

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

I am also to some extent blindly following this tutorial. I'm sure I'll understand it eventually. Here's the error I am getting.

Code:
sudo speaker-test -Dhdmi -c2 -r48000 -FS16_LE

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: -2,No such file or directory
Playback open error: -2,No such file or directory
Playback open error: -2,No such file or directory
^C

I very much appreciate the help you have provided thus far.

Regards,
Michal


- nino - 2009-10-22 13:31

hi alanww1

I did a complete format of the revo and reinstalled ubuntu, i think i had some funky issue swith the many different versions of ubuntu that was installed as well i upped my graphics to 256 in the BIO. I didnt need to update ALSA or change as settings as per your guide, it just worked out of the box

XBMC is sucessfully pluing mt 1080 content and the BOSE is reporting DTS 5.1 and Dolby 5.1 !!!! w000000000000000000p

I have the following settings:

Audio Ouput: Digital
Dolby Digital ACE : yes
DTS : yes
Output device: custom
Custom device: plughw:0,3
Passthrough device: hdmi
Downmix: no

The xbmc_dts_test.mkv also works as expected however the aac doesnt, does that mean my bose cant decode AAC files?

Whilst i know its working as expected i want to double check using the speaker test, but im having issues:

speaker-test -Dplughw:0,3 -c6

executes but i dont get anything from the speakers Confused

speaker-test -Dhdmi -c6
Code:
Playback device is hdmi
Stream parameters are 48000Hz, S16_LE, 6 channels
Using 16 octaves of pink noise
Channels count (6) not available for playbacks: Invalid argument
Setting of hwparams failed: Invalid argument

thanks again Smile


- alanwww1 - 2009-10-22 14:03

nino Wrote:hi alanww1
speaker-test -Dhdmi -c6
Code:
Playback device is hdmi
Stream parameters are 48000Hz, S16_LE, 6 channels
Using 16 octaves of pink noise
Channels count (6) not available for playbacks: Invalid argument
Setting of hwparams failed: Invalid argument

thanks again Smile

Hi Nino !

There is a great miss-understanding of formats here. This is why i made a description of formats in the beginning of the guide. You can pass multichannel audio two ways:

- With Bitstreaming of lossy(ac3, dts) or lossless(Dolby-HD, DTS MasterAudio)
Only ac3 and dts works on linux so far. But for this you DON't need my
guide at all. This works out of the box even with s/pdif connection.

- With LPCM multichannel audio you must have hdmi connection due to bandwidth issues, because this way you are passing all 8 channels UNCOMPRESSED in one signal. this is a huge amount of data transfered. For this method you do need my guide as you noticed speaker test with HDMI and with more than 2 channels is not working with default kernel modules. And we still do even have to enable hd formats on new Alsa release.

AAC audio can NOT be bitstreamed (as i wrote in the guide) has to be decoded to LPCM but if you want to pass this LPCM signal as MULTICHANNEL signal you do need my guide.

I hope i was understandable. I might update the beginig of the guide to make things more clear.

Cheers,

Alan