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


- bitlisz - 2010-01-11

Den4t Wrote:Hi !
Can't download the sample for now, rapidshare overloaded, will try tomorrow.
One question - is this audio only or have a video track ?
If this audio only, i think, xbmc use PAPlayer by default, can you play
the sample with DVDPlayer ? PAPlayer use another mapping scheme, i think.
With DVDPlayer you will see in xbmc.log:
DEBUG: Initialize - using alsa device xbmc_win71:'plug:hdmi'
This is with video, just a sample 5.1 truehd speakertest from demo bluray disc.


7.1 Flac Test File - pbjr - 2010-01-11

While googling, I found this 7.1 test file if it can help.

www.megaupload.com/?d=E5X4E34S

It came from this post here discussing 8 channel flac support.
http://www.hydrogenaudio.org/forums/lofiversion/index.php/t77207.html


- andyblac - 2010-01-11

alanwww1 Wrote:Thanks guys for the great feedback.

I was on Holiday, but now back. As soon as i get my work in shape i put together a new guide with updated new Ubuntu, Alsa, XBMC, Nvidia driver.

Also i am interested in checking out Intel's new platforms with Proper channel detection a and mapping with OPEN SOURCE drivers. These platforms with Broadcom's Crystal HD chip for video decode, could be a great alternative of Nvidia ION.

great cant wait, i'm still getting problems with my ASROCK & Onkyo 875, i only get stereo on it, also the ION is ALOT more powerfull the the BC Crystal HD chip.


- bitlisz - 2010-01-11

pbjr Wrote:While googling, I found this 7.1 test file if it can help.

www.megaupload.com/?d=E5X4E34S

It came from this post here discussing 8 channel flac support.
http://www.hydrogenaudio.org/forums/lofiversion/index.php/t77207.html

But as I said no problem with any 7.1...
The problem only with:
Dolby Digital TrueHD 5.1 and AAC5.1 (swaping channels)
DTS from wav
Dolby Digital Plus (audio dropouts/lots of hdmi reconnects)

Anyway here are more free files to test:
http://www.2l.no/hires/index.html


- Den4t - 2010-01-11

bitlisz Wrote:But as I said no problem with any 7.1...
The problem only with:
Dolby Digital TrueHD 5.1 and AAC5.1 (swaping channels)
DTS from wav
Dolby Digital Plus (audio dropouts/lots of hdmi reconnects)
[/url]

OK, i got both samples, DDTrueHD51.m2ts and 8_Channel_ID.flac
So, what a have in system and in xbmc.

1.
speaker-test -Dhdmi -c6 -r192000 -FS32_LE

speaker-test 1.0.22

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
channel mapping right receiver show 6ch PCM

2.
speaker-test -Dhdmi -c8 -r192000 -FS32_LE

speaker-test 1.0.22

Playback device is hdmi
Stream parameters are 192000Hz, S32_LE, 8 channels
Using 16 octaves of pink noise
Rate set to 192000Hz (requested 192000Hz)
Buffer size range from 8 to 2048
Period size range from 4 to 1024
Using max buffer size 2048
Periods = 4
was set period_size = 512
was set buffer_size = 2048
0 - Front Left
4 - Center
1 - Front Right
7 - Side Right
3 - Rear Right
2 - Rear Left
6 - Side Left
5 - LFE
channel mapping right receiver show 8ch PCM

So, system alsa mapping seems to be correct.

Now try to play samples, first - DDTrueHD51.m2ts
xbmc.log:
19:14:29 T:3086329824 M:3431227392 DEBUG: GetMusicVideoId (/storage/tmp/samples/11/DDTrueHD51.m2ts)
, query = select idMVideo from musicvideo where idFile=1167
19:14:29 T:2916088688 M:3431227392 DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_RESYNC(33344.000000, 1
)
19:14:29 T:2916088688 M:3431227392 NOTICE: Creating audio device with codec id: 86064, channels: 6,
sample rate: 48000, no pass-through
19:14:29 T:2916088688 M:3431227392 DEBUG: CALSADirectSound::CALSADirectSound - Channels: 6 - Sample
Rate: 48000 - SampleBit: 16 - Resample false - Codec PCM - IsMusic false - IsPassthrough false - audi
oDevice: plug:hdmi
19:14:29 T:2916088688 M:3431227392 DEBUG: RemoveActiveDevice - Removing device 1
19:14:29 T:2916088688 M:3431227392 DEBUG: SetActiveDevice - SetActiveDevice from 0 to 2
19:14:29 T:2916088688 M:3431227392 DEBUG: RemoveActiveDevice - Removing device 0
19:14:29 T:2939661168 M:3431227392 DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE
19:14:29 T:2939661168 M:3431227392 DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_RESYNC(0.000000, 0)
19:14:29 T:2916088688 M:3431227392 DEBUG: Initialize - using alsa device xbmc_win51:'plug:hdmi'
On receiver - 6ch PCM, channel mapping right !
Last line from log shows xbmc_win51 mapping, which i do not touch at all,
so, this work correctly without my patch.

Now flac (play with DVDPlayer):
19:15:57 T:3086329824 M:3430141952 DEBUG: CGUIInfoManager::SetCurrentSong(/storage/tmp/samples/11/8
_Channel_ID.flac)
19:15:57 T:3086329824 M:3430141952 DEBUG: LoadMusicTag: loading tag information for file: /storage/
tmp/samples/11/8_Channel_ID.flac
19:15:57 T:2968849264 M:3430141952 NOTICE: running thread: CDVDPlayerAudio:Tonguerocess()
19:15:57 T:2968849264 M:3430141952 NOTICE: Creating audio device with codec id: 86031, channels: 8,
sample rate: 48000, no pass-through
19:15:57 T:2968849264 M:3430141952 DEBUG: CALSADirectSound::CALSADirectSound - Channels: 8 - Sample
Rate: 48000 - SampleBit: 16 - Resample false - Codec PCM - IsMusic false - IsPassthrough false - audi
oDevice: plug:hdmi
19:15:57 T:2968849264 M:3430141952 DEBUG: RemoveActiveDevice - Removing device 1
19:15:57 T:2968849264 M:3430141952 DEBUG: SetActiveDevice - SetActiveDevice from 0 to 2
19:15:57 T:2968849264 M:3430141952 DEBUG: RemoveActiveDevice - Removing device 0
19:15:57 T:3086329824 M:3430141952 DEBUG: Loading additional tag info for file /storage/tmp/samples
/11/8_Channel_ID.flac
19:15:57 T:2968849264 M:3430141952 DEBUG: Initialize - using alsa device xbmc_win71:'plug:hdmi'

receiver show 8ch PCM, channel mapping right.
From last line we see xbmc_win71 mapping which is my Smile


Try please speaker-test as above, to check correct system channel mapping.

And now AAC, i have only one such movie. First i have convert audio track
from AAC to AC3 with mplayer and use pass-through when play in xbmc
to check that channel mapping in original movie is correct, then play original AAC:

19:53:08 T:2895108976 M:3426988032 DEBUG: CALSADirectSound::CALSADirectSound - Channels: 6 - SampleRate: 48000 - SampleBit: 16 - Resample false - Codec AAC - IsMusic false - IsPassthrough false - audioDevice: plug:hdmi
19:53:08 T:2895108976 M:3426988032 DEBUG: RemoveActiveDevice - Removing device 1
19:53:08 T:2895108976 M:3426988032 DEBUG: SetActiveDevice - SetActiveDevice from 0 to 2
19:53:08 T:2895108976 M:3426988032 DEBUG: RemoveActiveDevice - Removing device 0
9:53:08 T:2895108976 M:3426902016 DEBUG: Initialize - using alsa device xbmc_aac51:'plug:hdmi'

xbmc_aac51 - is my, from above post. Receiver show 6ch PCM, all channel mapping correct. AAC and AC3 souns identical.


trac - Den4t - 2010-01-12

May be good news: http://trac.xbmc.org/ticket/8479


- Gryph - 2010-01-17

Not sure if this will be of help to anyone, but it's here if you come across the same problem I did after upgrading from 1.0.20 to 1.0.22.1 using Ubuntu 9.11, using the ALC888 codec ...

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: ALC888 Analog [ALC888 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 1: ALC888 Digital [ALC888 Digital]
Subdevices: 0/1
Subdevice #0: subdevice #0

It was detecting the sound card, but was having no sound - In alsamixer it was showing as unmuted. Doing a speaker-test would result in no sound.

Only way around getting the sound back for me was to:-

Download the drivers from Realtek website: http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=14&PFid=24&Level=4&Conn=3&DownTypeID=3&GetDown=false

This should give you: LinuxPkg_5.14.tar.bz2

bunzip LinuxPkg_5.14.tar.bz2
tar xvf LinuxPkg_5.14.tar
cd realtek-linux-audiopack-5.14
sudo ./install

(Although it says to do the manual install for Ubuntu in the Readme.txt file - I found the automatic install worked albeit the minor modifications below)

This will then do it's thing, and finally will run "alsaconf" at completion of the script

Now, it puts the default conf files as: alsa-base & sound - This crapped out Alsa; so
sudo mv alsa-base alsa-base.conf
sudo mv sound sound.conf

---- alsa-base.conf ----
options snd-hda-intel model=6stack-dig

---- sound.conf ----
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel

-----------------------------------

sudo modprobe snd-hda-intel

sudo reboot

Now, sound seemed to kick back in


- thedon_1 - 2010-01-18

I have a PC based on the Zotac Ion A-B board and really had a hard time getting audio workinh through HDMI. I tried so many other things but none worked.

I reinstalled ubuntu, followed the instructions and now i get full dolby digital through my amp.

Thanks!


- gribbler - 2010-01-18

Are the NVIDIA 190 series still 'broken' as described at the start of this thread?


- Kali - 2010-01-19

both 190 and 195, next driver probably fix this bug
http://www.nvnews.net/vbulletin/showpost.php?p=2153790&postcount=42


- alanwww1 - 2010-01-19

gribbler Wrote:Are the NVIDIA 190 series still 'broken' as described at the start of this thread?

Nvidia Devs reproduced the problem and promised to fix it probably in the next release hopefully. Check this thread:

http://www.nvnews.net/vbulletin/showthread.php?t=140999


Almost there - kalhua - 2010-01-19

Hello, and thanks for creating this thread. I have an Acer Revo 3610 running Ubuntu Karmic 9.10. I have installed XBMC and followed your guide. I am getting sound through HDMI but cant seem to accomplish getting PCM at full bitrate as you have described. It always seems to play the core DTS track. I looked at the picture you linked to showing what the the setting should look in Ubuntu and have noticed that mine look nothing like it. I don't see any mention of Alsa at all. I can get multi channel pcm through HDMI with the speaker test all mapped correctly, hopefully that is a clue.

Thanks


- myrison - 2010-01-19

kalhua Wrote:Hello, and thanks for creating this thread. I have an Acer Revo 3610 running Ubuntu Karmic 9.10. I have installed XBMC and followed your guide. I am getting sound through HDMI but cant seem to accomplish getting PCM at full bitrate as you have described. It always seems to play the core DTS track. I looked at the picture you linked to showing what the the setting should look in Ubuntu and have noticed that mine look nothing like it. I don't see any mention of Alsa at all. I can get multi channel pcm through HDMI with the speaker test all mapped correctly, hopefully that is a clue.
Thanks


I don't believe the Acer is capable of reproducing DTS-MA / DTS-HD, if that is what you mean when you say you can only play the DTS core (as opposed to DTS-MA). This is related to a hardware limitation, nothing to do with how you've set up your alsa config.

On the Acer Aspire Revo 1600 (my only reference point since I have one), you can play uncompressed PCM, Dolby 5.1, Dolby TrueHD, or DTS (core). You cannot currently play DTS-HD. So assuming the 3610 is the same as the 1600, your choices for getting DTS-HD are to convert it via some external program to lossless PCM and play back that way, or just to play the core of the DTS-MA file.

I'll caveat all of the above by saying this is my own experience and I could be wrong. Smile In fact, I hope I am wrong about DTS-MA, but I'm pretty sure it's not possible currently.

Jason


- Kali - 2010-01-19

no free codecs for dts-ma is avalilable, the only way to play dts-ma track is TMT3 (windows) with Asus Xonar HDAV1.3 or ATI 5xxx or Intel H55 chipset (support isn't yet available)


- thedon_1 - 2010-01-19

Maybe i spoke too soon.

I tried the aac test file and it doesn't output 5.1

When the voice says rear left and right it comes out of the front speakers.

The other file works perfectly.

Any ideas?