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


- sierradump - 2009-11-15

@alanwww1,

Again I really appreciate your help. It's still not working "right" but I believe it is because of my A/V Receiver... I need to learn the settings.

I think what I want on my A/V Receiver is for it to "auto detect" the input signal (the signal coming FROM XBMC). I just don't know where/how to do that - it seems to be stuck on "stereo"...

BUT thanks to your guide I believe my XBMC PC is setup correctly!

Thanks again!


Update: - sierradump - 2009-11-15

Following alanwww1 guide, the Acer Revo will work using the "Alsa way" (part2). I didn't try pulse audio.

@alanwww1;

Is there a way to make the audio signal "LOUDER"? My xbox running XBMC using spdif out is much louder than my Revo?

When using xbox I can comfortably listen to my dvd collection at a/v reciever volume of "-30". BUT when I watch from the XBMC running on linux pc - I have to crank the a/v receiver all the way up to "-10 to -5" to get the same listening volume?

Any ideas?


- Kali - 2009-11-15

the avr do not have the source amplifier function?


- alanwww1 - 2009-11-15

sierradump Wrote:Following alanwww1 guide, the Acer Revo will work using the "Alsa way" (part2). I didn't try pulse audio.

@alanwww1;

Is there a way to make the audio signal "LOUDER"? My xbox running XBMC using spdif out is much louder than my Revo?

When using xbox I can comfortably listen to my dvd collection at a/v reciever volume of "-30". BUT when I watch from the XBMC running on linux pc - I have to crank the a/v receiver all the way up to "-10 to -5" to get the same listening volume?

Any ideas?

Maybe the volume is down in xbmc itself...
Or in alsa. Try maximize pcm volume, master volume etc.


- genka - 2009-11-16

Alanwww, thanks for your work, to my amazement it worked on Zotac ION board and Karmic using Alsa mode. I encountered a "2 user limit" in "adduser" step. Not sure it is necessary, my account already was in "audio" group. Also I couldn't run your Alsa upgrade script in one step, it was stopping midway. I tried twice and it stopped in different spots.
This is a partial log file from one of the attempts:
Code:
texlive-latex-extra texlive-latex-extra-doc texlive-latex-recommended
  texlive-latex-recommended-doc texlive-math-extra texlive-pictures
  texlive-pictures-doc texlive-pstricks texlive-pstricks-doc tipa
  x11proto-core-dev x11proto-input-dev x11proto-kb-dev xmlto xtrans-dev
0 upgraded, 96 newly installed, 0 to remove and 0 not upgraded.
Need to get 262MB/267MB of archives.
After this operation, 569MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com karmic/main g++-4.4 4.4.1-4ubuntu8 [4,701kB]
Get:2 http://us.archive.ubuntu.com karmic/main g++ 4:4.4.1-1ubuntu2 [1,446B]
Get:3 http://us.archive.ubuntu.com karmic/main dpkg-dev 1.15.4ubuntu2 [573kB]
Get:4 http://us.archive.ubuntu.com karmic/main build-essential 11.4 [7,172B]
Get:5 http://us.archive.ubuntu.com karmic/main cvs 1:1.12.13-12ubuntu1 [1,685kB]
Get:6 http://us.archive.ubuntu.com karmic/main tex-common 1.20 [722kB]
Get:7 http://us.archive.ubuntu.com karmic/main texlive-common 2007.dfsg.2-4ubuntu1 [91.7kB]
Get:8 http://us.archive.ubuntu.com karmic/main texlive-doc-base 2007.dfsg.2-2 [759kB]
Get:9 http://us.archive.ubuntu.com karmic/main texlive-base-bin 2007.dfsg.2-7ubuntu1 [2,368kB]

I still have one problem- "Failed to intitialize audio device" message. My solution is to go into audio and subtitles settings and change output to Analog and back to Digital. What could be the reason for this?


- alanwww1 - 2009-11-16

genka Wrote:I still have one problem- "Failed to intitialize audio device" message. My solution is to go into audio and subtitles settings and change output to Analog and back to Digital. What could be the reason for this?

When do you have this message ? After boot, or after a dts track, how it comes up ? What are the settings in xbmc ?


- mikestik - 2009-11-16

Can one the specialists here tell me if the information in the following link could help my sound problems (XBMC+Revo+190.42 nividia drivers)

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


- genka - 2009-11-16

alanwww1 Wrote:When do you have this message ? After boot, or after a dts track, how it comes up ? What are the settings in xbmc ?

Message comes up when a file starts playing. It looks like sound will be fine on on consequent files, as long as they have similar encoding. If I go from 5.1 to 2.0 track or back, I have to do digital->analog->digital again. I tried setting audio hardware to hdmi and custom hdmi:CARD=NVidia, didn't notice a difference. For consistency sake it would be nice to test against reference files, but the ones you provided are no longer available on rapidshare. If you want, I could host them or share on a P2P network.


- alanwww1 - 2009-11-16

genka Wrote:Message comes up when a file starts playing. It looks like sound will be fine on on consequent files, as long as they have similar encoding. If I go from 5.1 to 2.0 track or back, I have to do digital->analog->digital again. I tried setting audio hardware to hdmi and custom hdmi:CARD=NVidia, didn't notice a difference. For consistency sake it would be nice to test against reference files, but the ones you provided are no longer available on rapidshare. If you want, I could host them or share on a P2P network.

I've seen this behavior back with old alsa versions. If you done everything right, i have no idea what could be the problem...


- genka - 2009-11-17

I'll play with it myself- I'm still in the beginning of a steep learning curve. Are the any debugging options I could try?
I also noticed that it doesn't play multichannel audio files from Music menu. I haven't tried to play them before setting up Alsa, so I don't know if it is related.
A bit offtopic: where can I find good information about audio setup screen (Settings->System->Audio and subtitles)? Wiki manual refers to some old XBox version and is mostly irrelevant http://wiki.xbmc.org/?title=System_Settings#Audio_Hardware


- genka - 2009-11-18

OK, this is what I found after more careful testing. When set to Analog in Settings-System- Audio Hardware all stereo sources work. In order for 5.1 video tracks to work both output and passthrough devices have to be set to custom and custom string to hdmi:CARD=NVidia. Then have to switch digital-analog- digital while playing the file.
I had a problem with whole XBMC freezing, which I sought was unrelated, but I noticed it only happens in digital audio mode. Pausing occurs when I pause playback. Happens all the time, not an intermittent issue. I enabled debug in XBMC, below are two examples of last messages:
Code:
19:59:10 T:3078911888 M:1388134400  NOTICE: Created m_glPixmapTexture (2)
19:59:13 T:2999622512 M:1387487232   DEBUG: CPullupCorrection: detected pattern of length 24: 42000.00 42000.00 41000.00 42000.00 42000.00 42000.00 41000.00 42000.00 42000.00 41000.00 42000.00 42000.00 41000.00 42000.00 42000.00 42000.00 41000.00 42000.00 42000.00 41000.00 42000.00 42000.00 42000.00 41000.00
19:59:19 T:2999622512 M:1378996224   DEBUG: CPullupCorrection: pattern lost
19:59:20 T:2968521584 M:1377218560   DEBUG: Thread 2968521584 terminating (autodelete)
19:59:21 T:3078911888 M:1377218560    INFO: CheckIdle - Closing session to http://www.google.com (easy=0xa147c40, multi=(nil))
19:59:22 T:2999622512 M:1377140736   DEBUG: CPullupCorrection: detected pattern of length 24: 42000.00 41000.00 42000.00 42000.00 41000.00 42000.00 42000.00 42000.00 41000.00 42000.00 42000.00 41000.00 42000.00 42000.00 42000.00 41000.00 42000.00 42000.00 41000.00 42000.00 42000.00 42000.00 41000.00 42000.00
19:59:30 T:3078911888 M:1376616448   DEBUG: SECTION:UnloadDelayed(DLL: special://xbmc/system/ImageLib-i486-linux.so)
19:59:30 T:3078911888 M:1376616448   DEBUG: Unloading: ImageLib-i486-linux.so
19:59:35 T:3078911888 M:1376116736   DEBUG: SDLKeyboard: scancode: 172, sym: 0, unicode: 0, modifier: 0
19:59:35 T:3078911888 M:1376116736   DEBUG: OnKey: 61619 pressed, action is 12
19:59:35 T:3078911888 M:1376116736   DEBUG: CGUIAudioManager::Initialize
19:59:35 T:3078911888 M:1376116736   DEBUG: ------ Window Init (DialogSeekBar.xml) ------
19:59:35 T:3078911888 M:1376116736   DEBUG: Alloc resources: 0.03ms (0.00 ms skin load)
19:59:39 T:3078911888 M:1376079872   DEBUG: SECTION:UnloadDelayed(DLL: libmad.so.0)
19:59:39 T:3078911888 M:1376079872   DEBUG: Unloading: libmad.so.0
19:59:39 T:3078911888 M:1376079872   DEBUG: SECTION:UnloadDelayed(SECTION: LCODE)
19:59:43 T:3078911888 M:1375969280   DEBUG: SDLKeyboard: scancode: 172, sym: 0, unicode: 0, modifier: 0
19:59:43 T:3078911888 M:1375969280   DEBUG: OnKey: 61619 pressed, action is 12
19:59:43 T:3078911888 M:1375969280   DEBUG: CGUIAudioManager::DeInitialize
19:59:43 T:2947545968 M:1375969280   DEBUG: CDVDPlayerAudio:: Discontinuty - was:129045852.714114, should be:147510910.431228, error:18465057.717113
19:59:49 T:2947545968 M:1375805440 WARNING: CDVDMessageQueue(audio)::Get - retrieved last data packet of queue

Code:
21:29:06 T:3077760912 M:1354485760   DEBUG: GL: Creating YUV NPOT texture of size 1920 x 400
21:29:06 T:3077760912 M:1354485760   DEBUG: GL: Creating YUV NPOT texture of size 960 x 200
21:29:06 T:3077760912 M:1354485760   DEBUG: GL: Creating YUV NPOT texture of size 960 x 200
21:29:06 T:3077760912 M:1354461184  NOTICE: Created m_glPixmapTexture (64)
21:29:07 T:2874145648 M:1354448896  NOTICE:  (VDPAU) Didnt find a Video Surface Available (Total: 6). Creating a new one. TRY #1
21:29:08 T:3077760912 M:1351659520   DEBUG: ------ Window Deinit (DialogSeekBar.xml) ------
21:29:09 T:2874145648 M:1351311360   DEBUG: CPullupCorrection: detected pattern of length 24: 42000.00 42000.00 42000.00 41000.00 42000.00 42000.00 41000.00 42000.00 42000.00 42000.00 41000.00 42000.00 42000.00 41000.00 42000.00 42000.00 41000.00 42000.00 42000.00 42000.00 41000.00 42000.00 42000.00 41000.00
21:29:11 T:3077760912 M:1351188480   DEBUG: SDLKeyboard: scancode: 172, sym: 0, unicode: 0, modifier: 0
21:29:11 T:3077760912 M:1351188480   DEBUG: OnKey: 61619 pressed, action is 12
21:29:11 T:3077760912 M:1351188480   DEBUG: CGUIAudioManager::Initialize
21:29:11 T:3077760912 M:1350901760   DEBUG: ------ Window Init (DialogSeekBar.xml) ------
21:29:11 T:3077760912 M:1350901760   DEBUG: Alloc resources: 0.35ms (0.00 ms skin load)
21:29:13 T:2985290608 M:1350995968   DEBUG: Thread 2985290608 terminating (autodelete)
21:29:13 T:3077760912 M:1350995968    INFO: CheckIdle - Closing session to http://www.google.com (easy=0xbbdada8, multi=(nil))
21:29:14 T:2993683312 M:1350877184   DEBUG: Thread 2993683312 terminating (autodelete)
21:29:16 T:3077760912 M:1350885376   DEBUG: SECTION:UnloadDelayed(DLL: special://xbmc/system/ImageLib-i486-linux.so)
21:29:16 T:3077760912 M:1350885376   DEBUG: Unloading: ImageLib-i486-linux.so
21:29:22 T:3077760912 M:1350631424   DEBUG: SDLKeyboard: scancode: 172, sym: 0, unicode: 0, modifier: 0
21:29:22 T:3077760912 M:1350631424   DEBUG: OnKey: 61619 pressed, action is 12
21:29:22 T:3077760912 M:1350631424   DEBUG: CGUIAudioManager::DeInitialize
21:29:22 T:2950683504 M:1350631424   DEBUG: CDVDPlayerAudio:: Discontinuty - was:631096602.803555, should be:631126180.244448, error:29577.440893
21:29:28 T:2950683504 M:1344548864 WARNING: CDVDMessageQueue(audio)::Get - retrieved last data packet of queue
I hope these files provide some useful troubleshooting information.


- alanwww1 - 2009-11-18

Sorry Genka,
but honestly i don't know what the problem is. Maybe you could ask the Devs.


- Chimsen - 2009-11-18

Hello from Germany,

maybe i have a Problem with LPCM and 192KHz 24-Bit :-( I can run the Speakertest but sometimes i get the "Wirteerror -32, broken Pipe" like in this run:

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

speaker-test 1.0.21

Wiedergabe-Gerät ist hdmi
Stream-Parameter sind 192000 Hz, S32_LE, 6 Kanäle
Verwende 16 Oktaven rosa Rauschen
Rate ist 192000 Hz (angefordert: 192000 Hz)
Puffergröße von 32 bis 2720
Periodengröße von 16 bis 1360
Verwende maximale Puffergröße 2720
Perioden = 4
gesetzt: period_size = 544
gesetzt: buffer_size = 2720
0 - Vorne links
4 - Mitte
1 - Vorne rechts
3 - Hinten rechts
Schreibfehler: -32, Broken pipe
2 - Hinten links
5 - Bass
Zeit pro Periode = 17,975867
0 - Vorne links
4 - Mitte
1 - Vorne rechts
3 - Hinten rechts
2 - Hinten links
5 - Bass

my AVR shows me only "96KHz PCM" in the Display
but i get the Sound :-(

Image

What is wrong? I have a Pionner VSX-LX50 that support up to
192KHz and 24-Bit Sound.


Thank you,
Tim


- alanwww1 - 2009-11-19

Hello Chimsen !

I have no idea what could be wrong.It could be that your AV receiver not compatible or your cable can not take the high bandwidth signal. Check your cable !


- genka - 2009-11-19

alanwww1 Wrote:Sorry Genka,
but honestly i don't know what the problem is. Maybe you could ask the Devs.

Alan, I understand that the process is not foolproof and you can't provide a solution for every problem on all hardware platforms.
I have one more question. In your guide you show screenshots from Gnome sound config. How do you get this application? I can't find anything with similar looks through the menus on Karmic.