View Full Version : How to acheive LPCM output over HDMI


bahndit
12-31-08, 05:58 AM
I am running a Asus P5N7A-VM and with the integrated NVIDIA 9300 I have been able to get HDMI audio working (NVIDIA 180.11 drivers and ALSA 1.0.18a). However I can not get my setup to pass LPCM, 6-Channel, to my reciever. When playing a video with a 6 channel FLAC file in XBMC I am only getting 2 channels on my receiver. I have spent the last few days poking around the internet to see if anyone has successfully been able to pass LPCM in Linux with the new NVIDIA integrated mobos like mine but I haven't been able to find any useful information. Any suggestions on how to solve this problem?

quantumstate
12-31-08, 11:02 AM
LPCM is almost always stereo only, at least on DVD.

Matt DeVillier
12-31-08, 12:52 PM
qs: I'd guess his source is a bluray rip

bahndit
12-31-08, 02:51 PM
Yeah I have converted some Blu-Ray rips in which I have multichannel FLAC files. So I pose the question again, does anybody know if these new iGPU cards can pass LPCM in Linux like they do in Windows? I can't find information anywhere on the web if about multichannel LPCM on Linux.

quantumstate
12-31-08, 02:53 PM
I believe the Pulse audio system has to do with that. You set up Alsa with a Pulse plugin and the datastream is diverted, although I haven't researched it.

mythmaster
12-31-08, 03:21 PM
Last I checked (couple months ago), this wasn't implemented in alsa yet, but they've probably got it going by now. Check the alsa site for your specific audio chip to see. If it is supported, you'll most likely have to dl and compile a newer version of alsa than you're using.

bahndit
12-31-08, 03:50 PM
I have ALSA 1.0.18a which as far as I know is the newest ALSA build. Don't know anything about PulseAudio as I am new to the Linux world

quantumstate
12-31-08, 04:23 PM
Welcome to the club, neither do the rest of us.

But one of the privileges of running Linux is the need to research and study, because usually you must learn everything about everything, before you can do anything. Only those with good study habits and an IQ north of 130, end up staying with Linux.

So go forth, learn all about Pulse, and come back and share with the rest of us like we do you.

mythmaster
12-31-08, 04:24 PM
That's right, there's a misprint in the wiki that shows "Stable Release (2008-02-06) 1.0.18a". Looking around a bit, it appears this still isn't supported. Sorry.

mythmaster
12-31-08, 04:29 PM
Also, pulseaudio is a sound server -- it still has to go through alsa to get to the hardware, and since the alsa driver doesn't support 6 channel LPCM, then you're out of luck for now.

bahndit
12-31-08, 04:44 PM
Well it is a good thing that I am stubborn because Linux is not going to get rid of me that easily. Thanks for your input. I also found that the new Linux Kernel, 2.6.28, may have what I am looking for. Found this in the changelog:
commit 862f76f86d64c2cf34a7ff5ddf0a175073b76534
Author: Takashi Iwai <tiwai@suse.de>
Date: Wed Jul 30 15:13:29 2008 +0200

ALSA: hda - set up HDMI channels

Set up channel information for HDMI widgets. This will allow LPCM
with multiple channels supported on some HDMI devices.

TODO: It still doesn't check ELD and doesn't change PCM parameters
dynamically.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>

I will experiment and let you all know what I find out.

-Will

bahndit
12-31-08, 04:52 PM
That's right, there's a misprint in the wiki that shows "Stable Release (2008-02-06) 1.0.18a". Looking around a bit, it appears this still isn't supported. Sorry.

mythmaster,
What did you read that makes you say LPCM isn't supported. On the AlsaWiki (http://www.alsa-project.org/main/index.php/Changes_v1.0.17_v1.0.18) it says that 1.0.18 that:
- ALSA: hda - set up HDMI channels
Set up channel information for HDMI widgets. This will allow LPCM
with multiple channels supported on some HDMI devices.
TODO: It still doesn't check ELD and doesn't change PCM parameters
dynamically.
(This is the same thing that i posted earlier about the new kernel)

Were you able to find something that says that the NVIDIA Linux drivers don't support LPCM multichannel or was it ALSA specific?

-Will

mythmaster
12-31-08, 05:08 PM
This will allow LPCM with multiple channels supported on some HDMI devices.
On the hda-intel part of that page --> http://www.alsa-project.org/main/index.php/Changes_v1.0.17_v1.0.18#HDA_Intel_driver_2 I didn't see anything about adding multi-channel LPCM support for nvidia, so I'm assuming it still isn't ready. I could easily be wrong about this, though. If noone here can confirm that it's working, and if you can't find any info anywhere else, then a good idea would be to ask about it on the alsa mailing list.

bahndit
12-31-08, 05:24 PM
Awesome thanks for the input.

Loto_Bak
01-20-09, 07:06 PM
Some XBMC users have 8 channel LPCM over HDMI working but it is only on INTEL platforms.

Rgb
01-21-09, 07:31 AM
LPCM is almost always stereo only, at least on DVD.

The source audio doesn't have to be LPCM.

Someone may want the software media player (mplayer, VLC, XBMC, etc) to decode good old fashioned Dolby Digital 5.1, DTS 5.1, DTS 24/96 or the new DD+/DTS-HD codecs in the PC to LPCM, then send it out via HDMI, rather than have the receiver decode these codecs. One reason may be bass management, or the desire to use better quality external processing or better external DACs, etc.

So, the source could be a 10 year old DVD with Dolby Digital 5.1, etc, not just new BluRays with multi channel PCM.

For me, I would just need to use the HDMI out as an SPDIF, i.e. send Dolby/DTS bitstreams (undecoded) and stereo PCM (16/44 and 24/96), but I don't need to yet- no receiver with HDMI inputs. I just use a coax SPDIF out from the motherboard.

Rgb
01-21-09, 07:36 AM
Only those with good study habits and an IQ north of 130, end up staying with Linux.

.

...opposed to Windows users of the past 7 years or so, whose IQ's have been steadily decreasing to something south of 80 :D.

I am actually being serious- MS has very successfully engineered XP/VIsta for the masses, dumbing them down further and taking control away with every service pack and OS release since XP.

There are still many tech-oriented users in the Win forum hacking away at registry's, driver revs, etc, though I think there were more low level tinkerers on the Win forums prior to around 2003 or so.

Matt DeVillier
01-21-09, 01:33 PM
The source audio doesn't have to be LPCM.

Someone may want the software media player (mplayer, VLC, XBMC, etc) to decode good old fashioned Dolby Digital 5.1, DTS 5.1, DTS 24/96 or the new DD+/DTS-HD codecs in the PC to LPCM, then send it out via HDMI, rather than have the receiver decode these codecs. One reason may be bass management, or the desire to use better quality external processing or better external DACs, etc.

So, the source could be a 10 year old DVD with Dolby Digital 5.1, etc, not just new BluRays with multi channel PCM.

For me, I would just need to use the HDMI out as an SPDIF, i.e. send Dolby/DTS bitstreams (undecoded) and stereo PCM (16/44 and 24/96), but I don't need to yet- no receiver with HDMI inputs. I just use a coax SPDIF out from the motherboard.

I think you're stretching a bit with the DD/DTS. There's no good reason to decode regular old DD/DTS and output PCM over HDMI unless you were going to downmix to 2-ch, if connecting directly to a TV or similar. DD/DTS decoded on the PC is going to be exactly the same as DD/DTS decoded by the receiver, assuming both are Dolby/DTS certified decoders. And where the decoding is done doesn't affect the ability to use outboard DACs etc

I do agree that decoding THD/DTS-MA to 6-ch PCM is useful, particularly for those with HDMI receivers that do not decode those codecs..

Loto_Bak
01-22-09, 07:27 PM
There are some advantages decoding at the PC Software level.

By decoding it allows the PC to process the channels. This would mean...
Normalization could be accomplished across ALL formats (not just 2 channel stereo as it is now)
Volume control could be an option at the PC level (not just at your amp)
EQ adjustment could be possible at the PC level (your amp doesnt support a 'Dynamic Volume' feature? code it on your pc!)

be decoding at the PC we can add audio features in software instead of buying a new amp :)

Landris
01-22-09, 09:21 PM
Except a PC is nowhere near as good as a decent amp at these things. Ideally, you'd want the PC to touch the audio as little as possible. I want the decoding and outputting, and nothing else. Any extra features introduce more noise.

Rgb
01-23-09, 07:26 AM
Another reason to do decoding/processing inside the PC is to add processing modes you might not have on your external pre/pro or receiver, like Dolby Headphone, DPL2, DPL2x, etc.

Assuming digital SPDIF or HDMI output and good software processing algorithms, there should be no more noise introduced vs an external pre/pro/receiver.

Since the software algorithms and processing power of a PC can be changed/improved, decoding/processing inside the PC in the digital domain can easily match or exceed the quality of any external pre/pro/amp. This may not be the case with today's media players/codecs/algorithms, but the point is, it *can* be better.

Audio up-scaling, like upconverting 16/44 or 16/48 PCM from CD's or DVD's to 24/96 or 24/192 can easily beat the upsampling quality of external pre/pros/receivers-

http://canhtpcbeatcd.blogspot.com/

http://www.avsforum.com/avs-vb/showthread.php?t=937598

bahndit
02-12-09, 12:39 AM
Some XBMC users have 8 channel LPCM over HDMI working but it is only on INTEL platforms.
Loto_Bak,
Where did you hear about the users that have 8 channel LPCM working over HDMI on their INTEL boards. I would love to see what they did to get it working. Hopefully I can learn something that will help me get things figured out for my setup.
It would be lovely to have my rig do HD-Audio as well as video.

-Bahndit