[LINUX] LPCM over HDMI audio resampling questions?
#1
Question 
There is a really good news for Nvidia 8200, 8300, 9300, 9400 integrated motherboard users:

Nvidia started to implement the lossless 8 channel linear pcm over hdmi hd sound for their hardware. There is already a simple patch which applies to Alsa 1.0.20.

With the patched file currently 16bit, 48khz 8channel lossless sound is available, except the channel mapping is wrong and mixed up. With a little modification to the patch i was able to get full 192khz/24bit 6 channel, full hd lossless sound over hdmi cable. To use this feature you need to have an AV receiver with the minimum hdmi 1.0 standard input.

Here is the patch:
http://www.spinics.net/lists/alsa-devel/msg24325.html

Here is me emailing with Nvidia developer about the issues:
http://www.spinics.net/lists/alsa-devel/msg24437.html

I think with this option we are getting closer to get dolby tru-hd and dts master audio movie tracks, along with listening music with 24/96 multichannel format. All we need to have is ffmpeg guys implementing the decode of the new audio standards (maybe they already did, i am not sure) and xbmc to output the decoded high def lpcm without downsample.

By the time i think we can still get a great use of the increased bit/sample and sampling rate. I think xbmc's smoothvideo feature could benefit from this as i think resampling of 48khz audio to 48khz has a lot more quality loss than resampling it to eg. 192khz/24bits.

@Bobo1on1: How is libsamplerate work now in xbmc ? Is it possible to make the resampling to a higher quality sound format ?

How is it with hd audio formats in xbmc. Is it always downsampled to 48khz when i play a movie or an audio file ?


The implementation nvidia made is very cool becasue with it hw:0,3 device shows as a multichannel "analog" device. So it can be used as regular analog hda codec.

If someone wants to try this feature. Here is what i did:
(Note that this process could screw up your installation and make Ubuntu package management wrong with Alsa packages. Also the patch are being developed and changed regulary which would need some maintaining)

This only works for Ubuntu Jaunty and Alsa 1.0.20

Install Alsa 1.0.20 with the famous universal Alsa Upgrade script.

Code:
http://ubuntuforums.org/showthread.php?p=6589810#post6589810

run the script with:

Code:
sudo ./AlsaUpgrade-1.0.x-rev-1.17.sh

Get the patched patch_nvhdmi.c file here:

Code:
http://git.alsa-project.org/?p=alsa-kernel.git;a=blob_plain;f=sound/pci/hda/patch_nvhdmi.c;h=f5792e2eea82dd412dd18f7aca3b6f328027444b

Don't be fooled with the name as it is already patched to enable 8ch lpcm.

Copy the patch_nvhdmi.c file to Alsa source directory downloaded previously by the upgrade script.

Code:
cp ./patch_nvhdmi.c /usr/src/Alsa-1.0.20/alsa-driver-1.0.20/sound/pci/hda/patch_nvhdmi.c

Now compile the kernel modules:

Code:
cd /usr/src/Alsa-1.0.20/alsa-driver-1.0.20/
sudo make clean
sudo make

Copy only the Nvidia kernel module to the overwriting the Ubuntu 1.0.20 kernel module.

Code:
sudo cp pci/hda/snd-hda-codec-nvhdmi.ko /lib/modules/2.6.28-11-generic/kernel/sound/pci/hda/snd-hda-codec-nvhdmi.ko
sudo reboot

After reboot you can test the feature with

Code:
speaker-test -Dhdmi -c6

magically it will start sending multichannel lpcm to your av receiver over hdmi. Note that it is only working if X is loaded. At least you have to start an Xterminal, because the alsa module is not working without the nvidia display kernel module.

I think from now we only need a good .asoundrc file to map the correct channels to the correct place and we can play any type of multichannel format without a bunch of analog cables attached to the receiver. Even multichannel aac tracks or flac tracks are possible this way, without the loss of quality.

Anyone can make the .asoundrc files ? I was thinking of making virtual surround51, surround40 etc devices with correct channel mapping.

Have fun, AlanSmile
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply


Messages In This Thread
[LINUX] LPCM over HDMI audio resampling questions? - by alanwww1 - 2009-06-08, 17:43
[No subject] - by althekiller - 2009-06-08, 19:50
[No subject] - by alanwww1 - 2009-06-08, 20:00
[No subject] - by bobo1on1 - 2009-06-10, 22:45
[No subject] - by alanwww1 - 2009-06-11, 08:44
[No subject] - by bobo1on1 - 2009-06-11, 17:41
[No subject] - by alanwww1 - 2009-06-11, 22:54
[No subject] - by Hannes The Hun - 2009-06-11, 23:10
[No subject] - by snoxbox - 2009-06-12, 00:21
[No subject] - by Matt Devo - 2009-06-12, 07:08
[No subject] - by alanwww1 - 2009-06-12, 08:43
[No subject] - by snoxbox - 2009-06-12, 09:02
[No subject] - by alanwww1 - 2009-06-12, 14:34
[No subject] - by spiff - 2009-06-12, 15:44
Channel Mapping Fix - by Bahndit - 2009-06-14, 05:51
[No subject] - by Bahndit - 2009-06-14, 06:13
[No subject] - by alanwww1 - 2009-06-14, 09:11
[No subject] - by alanwww1 - 2009-06-14, 10:20
[No subject] - by alanwww1 - 2009-06-14, 11:06
[No subject] - by Bahndit - 2009-06-14, 20:42
[No subject] - by alanwww1 - 2009-06-15, 09:22
[No subject] - by Bahndit - 2009-06-15, 10:04
[No subject] - by alanwww1 - 2009-06-15, 11:35
[No subject] - by Bahndit - 2009-06-15, 12:00
[No subject] - by alanwww1 - 2009-06-15, 12:55
[No subject] - by alanwww1 - 2009-06-15, 17:16
[No subject] - by swevo24 - 2009-06-15, 22:12
[No subject] - by alanwww1 - 2009-06-15, 22:57
[No subject] - by mlmc - 2009-06-16, 09:32
[No subject] - by joel_ezekiel - 2009-06-24, 09:07
[No subject] - by Bahndit - 2009-06-27, 05:55
asound.conf mapping - by plue - 2009-07-01, 06:06
[No subject] - by ylagace - 2009-07-02, 17:05
[No subject] - by plue - 2009-07-02, 22:07
[No subject] - by ylagace - 2009-07-03, 03:00
[No subject] - by plue - 2009-07-03, 14:00
[No subject] - by alanwww1 - 2009-07-03, 15:18
[No subject] - by ylagace - 2009-07-03, 17:24
[No subject] - by alanwww1 - 2009-07-03, 18:09
[No subject] - by ylagace - 2009-07-03, 19:33
[No subject] - by ylagace - 2009-07-04, 00:41
[No subject] - by alanwww1 - 2009-07-04, 20:29
[No subject] - by ylagace - 2009-07-06, 00:12
[No subject] - by ultrabrutal - 2009-07-06, 12:45
[No subject] - by alanwww1 - 2009-07-06, 18:16
[No subject] - by alanwww1 - 2009-07-06, 18:28
[No subject] - by ultrabrutal - 2009-07-06, 19:06
[No subject] - by alanwww1 - 2009-07-06, 19:54
[No subject] - by ultrabrutal - 2009-07-06, 20:05
[No subject] - by ylagace - 2009-07-06, 21:37
[No subject] - by donalddk - 2009-07-07, 15:53
[No subject] - by ultrabrutal - 2009-07-07, 16:01
[No subject] - by ylagace - 2009-07-07, 22:48
[No subject] - by DarthV - 2009-07-08, 15:28
[No subject] - by nmiller - 2009-07-09, 01:52
[No subject] - by alanwww1 - 2009-07-09, 11:39
[No subject] - by Haggy - 2009-07-09, 12:13
[No subject] - by ylagace - 2009-07-09, 19:22
[No subject] - by alanwww1 - 2009-07-09, 23:06
[No subject] - by ylagace - 2009-07-10, 17:18
[No subject] - by nmiller - 2009-07-10, 23:26
[No subject] - by plue - 2009-07-13, 12:43
[No subject] - by hotlobster - 2009-07-20, 12:46
[No subject] - by hotlobster - 2009-07-24, 11:24
[No subject] - by plue - 2009-07-27, 13:15
[No subject] - by hotlobster - 2009-07-27, 13:25
[No subject] - by plue - 2009-08-03, 10:47
[No subject] - by rickardkk - 2009-09-07, 15:20
[No subject] - by ubiq - 2009-09-25, 22:42
[No subject] - by markdr - 2009-09-28, 10:23
[No subject] - by markdr - 2009-10-05, 23:06
[No subject] - by alanwww1 - 2009-10-12, 13:46
[No subject] - by UglyBob - 2009-11-09, 10:58
Logout Mark Read Team Forum Stats Members Help
[LINUX] LPCM over HDMI audio resampling questions?0