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


- mikestik - 2009-12-30

Have you got sound if you plug the hdmi straight into the TV? I have this problem with 9.11 for ages now. I've got a Yamaha amp.

Found this on the ubuntu forum

http://www.gossamer-threads.com/lists/mythtv/users/388582

9.04.1 works for me, 9.11 = no sound at all


- jdandc - 2009-12-30

Just wanted to say thanks for taking the time and effort to write such a detailed and informative thread. I resolved my issue no end, after much searching etc.

Huge thanks.
Wink


- jdandc - 2009-12-30

Hi Alanwww1,

I just wanted to share my appreciation for this most helpful thread, resolved my issue and taught me some new tricks on the way.

My sound issues are now sorted, only my lirc issues and getting Visual Effects to stay at none and I am 100% sorted.

Thanks again.


- ssimon - 2009-12-30

Hello alanwww1,

I wanted to thank you 1st. I followed your excellent ALSA Audio guide and managed to get my multichannel audio LPCM over HDMI to work on my Acer Revo 1600! YEY!

Only issue I found is that the LFE (base) seems to be super loud and almost on all the time. I cannot raise the volume on playback as the LFE practically blows out my subwoofer. This issue is limited to the LPCM output from XBMC as my cable box and Xbox do not have this problem on HDMI.

I ran the alsamixer but there is no way to control the LFE volume. Any suggestions to lowering the LFE?

Thanks in advance!


- Phantisy - 2009-12-30

mikestik Wrote:Have you got sound if you plug the hdmi straight into the TV? I have this problem with 9.11 for ages now. I've got a Yamaha amp.

Found this on the ubuntu forum

http://www.gossamer-threads.com/lists/mythtv/users/388582

9.04.1 works for me, 9.11 = no sound at all

Still no sound. Funny thing is that my movies with mp3 sound play fine. ALL my movies play fine no matter what the sound source is. Its when I play just a MP3 that I have no sound.


- Jovack - 2010-01-01

I thought I had it, but, at the lest step...

xbmc@XBMCLive:~$ /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

xbmc@XBMCLive:~$ /usr/bin/amixer -q -c 0 sset 'IEC958 Default PCM',0 unmute
amixer: Unable to find simple control 'IEC958 Default PCM',0

I'm 99% sure i had the IEC958 device showing in my mixer before I did the steps.

I fail the speaker test at this time. The simple L and R test works, but, the 6 channel does not output anything.

Any thoughts? This is an Acer Aspire 1600.

Thanks!

--Rod


- alanwww1 - 2010-01-02

Jovack Wrote:I thought I had it, but, at the lest step...

xbmc@XBMCLive:~$ /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

xbmc@XBMCLive:~$ /usr/bin/amixer -q -c 0 sset 'IEC958 Default PCM',0 unmute
amixer: Unable to find simple control 'IEC958 Default PCM',0

I'm 99% sure i had the IEC958 device showing in my mixer before I did the steps.

I fail the speaker test at this time. The simple L and R test works, but, the 6 channel does not output anything.

Any thoughts? This is an Acer Aspire 1600.

Thanks!

--Rod

Are you sure you are not using the latest nvidia driver ?


- wolrah - 2010-01-02

Wish I had found this thread earlier today. I decided to convert my WinMCE box to XBMC, so I went out and bought an nVidia graphics card to replace my ATI card so I could have hardware decoding under Linux. Unfortunately, the cheapest nVidia card my local store had in stock supporting HDMI audio was a GeForce G210 and at the time I did not know of the issues with drivers newer than 185 series nor that my new card would require said newer drivers.

I'm on Ubuntu 9.10 using the latest 195 series drivers from the VDPAU PPA and just finished compiling ALSA 1.0.22.1 in the hopes that it would work. Alas, the answer is no. alsamixer can see the card but shows no controls, aplay -L shows only the null audio device. I skimmed the whole thread and read the last five pages, has there been any development I've missed or should I go back tomorrow and exchange it for a 9xxx series card?


- andyblac - 2010-01-02

just come across this thread so it looks like we are getting closer to get multi-channel PCM back Big Grin i would love to have this working as i have never got it working i only get "STEREO" on my Onkyo-875 from my AsRock 330-HT when i try to use Tru-HD to PCM and now that MakeMKV does Tru-HD and DTS-HD this is needed even more NodNod


- peterkant - 2010-01-05

Great guide, I just wanted to thank alanwww1 for the hard work of putting this together.

Just one comment, in my setup (Revo 1600, XBMC A2 Live), of course 5.1 sound didn't work after install, so I followed the guide and magic, it works. But just out of curiosity, I checked the version of the Nvidia drivers I had installed with Live:

xbmc@XBMCLive:~$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86 Kernel Module 190.42 Tue Oct 20 20:18:32 PDT 2009
GCC version: gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8)

So it seems that 190.42 drivers do work with 5.1 sound over HDMI. It saved me from a downgrade to 185.xx. Maybe other revo users might want to give it a try before downgrading.


- bitlisz - 2010-01-06

peterkant Wrote:So it seems that 190.42 drivers do work with 5.1 sound over HDMI. It saved me from a downgrade to 185.xx. Maybe other revo users might want to give it a try before downgrading.
please test with 7.1 linear pcm audio:
speaker-test -D hw:0,3 -t wave -c 8 -f cd
or
speaker-test -Dhdmi -c6 -r192000 -FS32_LE


- bitlisz - 2010-01-06

I wanted to say Thanks for the guide for alanwww1!
I had a very hard fight with all the stuff.
The easiest work was with the MultiChannel PCM sound over HDMI. Just workedSmile
Have to find a proper guide for converting from m2ts with DTS-HD to mkv with 7.1 flac.

Now upgraded to XBMC 9.11 (from beta 2) and still ok.
Ubuntu 9.10 with alsa 1.0.21, and nvidia 185.18.36.
Only problem with this driver is many flash video has green flickering with VDPAU enabled, but this is solved with newer nvidia drivers.

I found maybe a bug: that if the movie paused for longer time (or during ffd/rwd), maybe for some minutes, and often the hdmi sound lost.
The AV receives shows still the last stale and it seems nothing came on HDMI (the cannel sibmbols are blinking)), to get sound back again, i have to restart the movie or restart XBMC.


- bitlisz - 2010-01-06

Again some stuff offtopic but i cant stand itSmile
OFFTOPIC:
So after this very long linux learning i get to work nearly all stuff what i wanted: raid1 on 3x2HDDs, samba, transmission-torrent, jdownloader, xbmc with remote...
I'm not recommend for linux Fractal Desing Shape remote, quiet many hours, and and still not works as needed...So I used my old RF remote: Q-Sonic Master Remote 6 in 1, and forget to use with my Harmony555, cos it is RF.
Some work needed to enable XBMC start with remote key.
And here are some pictures:
http://picasaweb.google.hu/bitlisz/2009120820100103ION#

With all HDD on the power consumption 75W, if only system disk (2,5") used 45W (probably the the powersupply not the best).

I managed the 24p issues too with modified edid (lower frequency modified),
and used the "CustomEDID" option to get all the time HDMI on.
Now all modes usable:
Code:
(**) NVIDIA(0): Option "CustomEDID" "DFP-0:/etc/X11/edid_hk2.bin"
(**) NVIDIA(0): Option "ExactModeTimingsDVI" "True"
(**) NVIDIA(0): Option "UseDisplayDevice" "DFP"
(**) NVIDIA(0): Option "TripleBuffer" "0"
(**) NVIDIA(0): Option "FlatPanelProperties" "Scaling = Native"
(**) NVIDIA(0): Option "DynamicTwinView" "False"
(**) NVIDIA(0): Enabling RENDER acceleration
(II) NVIDIA(0): Support for GLX with the Damage and Composite X extensions is
(II) NVIDIA(0):     enabled.
(II) NVIDIA(0): NVIDIA GPU ION (C79) at PCI:3:0:0 (GPU-0)
(--) NVIDIA(0): Memory: 524288 kBytes
(--) NVIDIA(0): VideoBIOS: 62.79.67.00.00
(--) NVIDIA(0): Interlaced video modes are supported on this GPU
(--) NVIDIA(0): Connected display device(s) on ION at PCI:3:0:0:
(--) NVIDIA(0):     HCG AVR254/5/354 (DFP-0)
(--) NVIDIA(0): HCG AVR254/5/354 (DFP-0): 165.0 MHz maximum pixel clock
(--) NVIDIA(0): HCG AVR254/5/354 (DFP-0): Internal Single Link TMDS
(II) NVIDIA(0): Option "UseDisplayDevice" "DFP" converted to "DFP-0".
(II) NVIDIA(0): Assigned Display Device: DFP-0
(II) NVIDIA(0): Validated modes:
(II) NVIDIA(0):     "1920x1080@50"
(II) NVIDIA(0):     "1920x1080@60"
(II) NVIDIA(0):     "1920x1080@24"
(II) NVIDIA(0):     "[email protected]"
(II) NVIDIA(0):     "1920x1080@50i"
(II) NVIDIA(0):     "1920x1080@60i"
(II) NVIDIA(0):     "[email protected]"
(II) NVIDIA(0):     "[email protected]"
(II) NVIDIA(0):     "1920x1080@25"
(II) NVIDIA(0):     "[email protected]"
(II) NVIDIA(0):     "1920x1080@30"



- myrison - 2010-01-06

peterkant Wrote:Great guide, I just wanted to thank alanwww1 for the hard work of putting this together.

Just one comment, in my setup (Revo 1600, XBMC A2 Live), of course 5.1 sound didn't work after install, so I followed the guide and magic, it works. But just out of curiosity, I checked the version of the Nvidia drivers I had installed with Live:

xbmc@XBMCLive:~$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86 Kernel Module 190.42 Tue Oct 20 20:18:32 PDT 2009
GCC version: gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8)

So it seems that 190.42 drivers do work with 5.1 sound over HDMI. It saved me from a downgrade to 185.xx. Maybe other revo users might want to give it a try before downgrading.

Wow, consider yourself incredibly lucky. I'd be interested in you running the 8-channel test (referenced a few posts up) as well to make sure it works. I spent so long getting my Revo to do this correctly in the first place that I'd be afraid to upgrade, but I do like the overscan controls in the 190.x versions of the drivers so I would consider it. (probably after a full image of the Revo I could restore -when- (most likely not if) I screw up the upgrade. Wink

Thanks for posting your experience. I'm sure a lot of Revo owners are interested.


audio from flv files not working - myrison - 2010-01-06

Guys -

I posted a few weeks back thanking Alan for this guide and I just as well do it again as I'm still running well on 99% of my files. Thanks Alan. Big Grin

The one exception is related to flv files, which are almost entirely trailers downloaded for movies. I get no audio from these files. This happens whether I play them with VLC, XBMC, etc.

Here is a snippet of my XBMC debug log that indicates issues with PulseAudio... Given that I'm supposed to be using Alsa, I'm not sure if this is meaningful, but it's the only possible clue I can find in my logs.

The audio encoded in this file is mp3, and mp3s work fine if played by themselves, so I think it's related to the flv extension, not to the audio format... though I could be wrong. Smile

Has anyone else run into this or do you have any clues on getting sound from flv files to work? I've marked a few lines below in red that I believe are relevant...

Thanks for taking a look.

Code:
22:48:36 T:2887818128 M:531144704    INFO: ffmpeg[AC209B90]: Input #0, flv, from 'smb://NEO/Videos/Movies/Along Came Polly/Along Came Polly-trailer.flv':
22:48:36 T:2887818128 M:531144704    INFO: ffmpeg[AC209B90]:   Duration: 00:00:30.56, start: 0.000000, bitrate: 668 kb/s
22:48:36 T:2887818128 M:531144704    INFO: ffmpeg[AC209B90]:     Stream #0.0: Video: vp6f, yuv420p, 480x270, 668 kb/s, 14.99 tbr, 1k tbn, 1k tbc
22:48:36 T:2887818128 M:531144704    INFO: ffmpeg[AC209B90]:     Stream #0.1: Audio: mp3, 22050 Hz, 1 channels, s16
22:48:36 T:2887818128 M:531144704    INFO: ffmpeg[AC209B90]:   Metadata
22:48:36 T:2887818128 M:531144704    INFO: ffmpeg[AC209B90]:     duration        : 31
22:48:36 T:2887818128 M:531144704    INFO: ffmpeg[AC209B90]:     width           : 480
22:48:36 T:2887818128 M:531144704    INFO: ffmpeg[AC209B90]:     height          : 270
22:48:36 T:2887818128 M:531144704    INFO: ffmpeg[AC209B90]:     videodatarate   : 653
22:48:36 T:2887818128 M:531144704    INFO: ffmpeg[AC209B90]:     canSeekToEnd    : false
22:48:36 T:2887818128 M:531144704    INFO: ffmpeg[AC209B90]:     videocodecid    : 4
22:48:36 T:2887818128 M:531144704    INFO: ffmpeg[AC209B90]:     audiodatarate   : 48
22:48:36 T:2887818128 M:531144704    INFO: ffmpeg[AC209B90]:     audiocodecid    : 2
22:48:36 T:2887818128 M:531144704    INFO: ffmpeg[AC209B90]:     framerate       : 15
22:48:36 T:2887818128 M:531144704    INFO: ffmpeg[AC209B90]:     creationdate    : Thu Nov 23 22:31:26 2006
22:48:36 T:2887818128 M:531144704    INFO: ffmpeg[AC209B90]:     Encoded_By      : ScreenPlay
22:48:36 T:2887818128 M:531144704    INFO: ffmpeg[AC209B90]:     Encoded_With    : Sorenson Squeeze
22:48:36 T:2887818128 M:531144704  NOTICE: Opening video stream: 0 source: 256
22:48:36 T:2887818128 M:531144704  NOTICE: Creating video codec with codec id: 95
22:48:36 T:2887818128 M:531144704   DEBUG: FactoryCodec - Video:  - Opening
22:48:36 T:2887818128 M:531144704   DEBUG: Loading: /usr/share/xbmc/system/players/dvdplayer/swscale-0.6.1-i486-linux.so
22:48:36 T:2887818128 M:531005440  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: On2 VP6 (Flash version)
22:48:36 T:2887818128 M:531005440   DEBUG: FactoryCodec - Video: ff-vp6f - Opened
22:48:36 T:2887818128 M:531005440  NOTICE: Creating video thread
22:48:36 T:2887818128 M:531005440  NOTICE: Opening audio stream: 1 source: 256
22:48:36 T:2879425424 M:531005440   DEBUG: thread start, auto delete: 0
22:48:36 T:2887818128 M:531005440  NOTICE: Finding audio codec for: 86017
22:48:36 T:2879425424 M:531005440   DEBUG: LinuxRendererGL: Cleaning up GL resources
22:48:36 T:2887818128 M:531005440   DEBUG: FactoryCodec - Audio: passthrough - Opening
[color=red][b]22:48:36 T:2887818128 M:531005440   DEBUG: FactoryCodec - Audio: passthrough - Failed[/color][/b]
22:48:36 T:2879425424 M:531005440  NOTICE: running thread: video_thread
22:48:36 T:2887818128 M:531005440   DEBUG: FactoryCodec - Audio: libmad - Opening
22:48:36 T:2887818128 M:531005440   DEBUG: Loading: libmad.so.0
22:48:36 T:2887818128 M:531005440   DEBUG: FactoryCodec - Audio: libmad - Opened
22:48:36 T:2887818128 M:531005440  NOTICE: Creating audio thread
22:48:36 T:2871032720 M:531005440   DEBUG: thread start, auto delete: 0
22:48:36 T:2871032720 M:531005440  NOTICE: running thread: CDVDPlayerAudio::Process()
<snip>
22:48:36 T:2871032720 M:530866176  NOTICE: Creating audio device with codec id: 86017, channels: 1, sample rate: 22050, no pass-through
22:48:36 T:2871032720 M:530866176    INFO: AudioRendererFactory:  not a explicit device, trying to autodetect.
[color=red][b]22:48:36 T:2871032720 M:530866176   DEBUG: PulseAudio: Opening Channels: 1 - SampleRate: 22050 - SampleBit: 16 - Resample false - Codec PCM - IsMusic false - IsPassthrough false - device: hdmi[/b][/color]
22:48:36 T:2871032720 M:530866176   DEBUG: RemoveActiveDevice - Removing device 1
22:48:36 T:2879425424 M:530866176   DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_RESYNC(66000.000000, 0)
22:48:36 T:3043186576 M:530513920   DEBUG: OnPlayBackStarted - Playback has started
22:48:36 T:3043186576 M:530513920   DEBUG: Activating window ID: 12005
22:48:36 T:3043186576 M:530513920   DEBUG: Checking if window ID 12005 is locked.
22:48:36 T:3043186576 M:530513920   DEBUG: ------ Window Deinit (MyVideoNav.xml) ------
22:48:36 T:2871032720 M:530513920   DEBUG: CGUIAudioManager::DeInitialize
22:48:36 T:2871032720 M:530513920   DEBUG: SetActiveDevice - SetActiveDevice from 0 to 2
22:48:36 T:2871032720 M:530513920   DEBUG: RemoveActiveDevice - Removing device 0
22:48:36 T:3043186576 M:530444288    INFO: XRANDR: /usr/share/xbmc/xbmc-xrandr --output default --mode 0x10e
[b][color=red]22:48:36 T:2871032720 M:529887232   DEBUG: PulseAudio: Context ready
22:48:36 T:2871032720 M:529887232   DEBUG: PulseAudio: Stream failed
22:48:36 T:2871032720 M:529887232   ERROR: PulseAudio: Waited for the stream but it failed[/color][/b]
22:48:36 T:2871032720 M:529887232   DEBUG: SetActiveDevice - SetActiveDevice from 2 to 1
22:48:36 T:2871032720 M:529887232   DEBUG: RemoveActiveDevice - Removing device 2
22:48:36 T:2871032720 M:529887232   DEBUG: [b][color=red]CALSADirectSound::CALSADirectSound - Channels: 1 - SampleRate: 22050 - SampleBit: 16 - Resample false - Codec PCM - IsMusic false - IsPassthrough false - audioDevice: hdmi[/color][/b]
22:48:36 T:2871032720 M:529887232   DEBUG: RemoveActiveDevice - Removing device 1
22:48:36 T:2871032720 M:529887232   DEBUG: SetActiveDevice - SetActiveDevice from 0 to 2
22:48:36 T:2871032720 M:530096128   DEBUG: RemoveActiveDevice - Removing device 0
[b][color=red]22:48:36 T:2871032720 M:530096128   DEBUG: Initialize - using alsa device plug:hdmi
22:48:36 T:2871032720 M:530096128   DEBUG: CALSADirectSound::Initialize - packet size:1024, packet count:16, buffer size:8192[/color][/b]
<SNIP>
22:48:36 T:3043186576 M:520458240   DEBUG: CGUIInfoManager::SetCurrentMovie(smb://NEO/Videos/Movies/Along Came Polly/Along Came Polly-trailer.flv)