[LINUX] LPCM over HDMI audio resampling questions?
#31
Hey Joel,
How did you do the remapping of your channels? The original way that I did it is not as good as Alan's .asoundrc fix. I had problems with an PCM rip that I made as well until I used Alan's method. (See this post)
I don't know anything about dumphd but I am going to have to check it out.

-Will
Reply
#32
Star 
alanwww1 Wrote:Anyone can make the .asoundrc files ? I was thinking of making virtual surround51, surround40 etc devices with correct channel mapping.

Here the virtual surround devices with correct mapping. It was created by reading the alsa nvhdmi driver and also the intelhdmi driver for ca_index configuration referenced by nvhdmi.

Configuring to use for analog audio the device plugConfusedurround71 should be fine.

Code:
# Linux has channel order
# FL, FR, RL, RR, C, LFE, SL, SR
# HDMI has this one
# FL, FR, LFE, FC, RL, RR, RLC, RRC

pcm.!front {
  type route
  slave.pcm hdmi
  slave.channels 2
  ttable {
    0.0= 1
    1.1= 1
  }
}
pcm.!surround21 {
  type route
  slave.pcm hdmi
  slave.channels 4
  ttable {
    0.0= 1
    1.1= 1
    2.2= 1
  }
}
pcm.!surround30 {
  type route
  slave.pcm hdmi
  slave.channels 4
  ttable {
    0.0= 1
    1.1= 1
    2.3= 1
  }
}
pcm.!surround31 {
  type route
  slave.pcm hdmi
  slave.channels 4
  ttable {
    0.0= 1
    1.1= 1
    2.3= 1
    3.2= 1
  }
}
pcm.!surround40 {
  type route
  slave.pcm hdmi
  slave.channels 6
  ttable {
    0.0= 1
    1.1= 1
    2.4= 1
    3.5= 1
  }
}
pcm.!surround41 {
  type route
  slave.pcm hdmi
  slave.channels 6
  ttable {
    0.0= 1
    1.1= 1
    2.4= 1
    3.5= 1
    4.2= 1
  }
}
pcm.!surround50 {
  type route
  slave.pcm hdmi
  slave.channels 6
  ttable {
    0.0= 1
    1.1= 1
    2.4= 1
    3.5= 1
    4.3= 1
  }
}
pcm.!surround51 {
  type route
  slave.pcm hdmi
  slave.channels 6
  ttable {
    0.0= 1
    1.1= 1
    2.4= 1
    3.5= 1
    4.3= 1
    5.2= 1
  }
}
pcm.!surround71 {
  type route
  slave.pcm hdmi
  slave.channels 8
  ttable {
    0.0= 1
    1.1= 1
    2.4= 1
    3.5= 1
    4.3= 1
    5.2= 1
    6.6= 1
    7.7= 1
  }
}

If you want that stereo sound arrives as stereo to the amp, remove all lines starting with: slave.channels
Reply
#33
I am having some problems in applying the patch and I am not very knowledgeable of Linux.

I have Ion Zotac N330 board with minimal Ubuntu. XBMC is working fine but I get audio initialization error when running movies with HD audio codecs (True-HD, DTS-HD).

when I try to apply the patch:

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

It shows me the options -di (download and install) or -d (download only) and -i (install only).

I tried -d first and then copied the patch.c file to the Alsa driver source directory and then ran with -i option.

The problem is when I run the sudo make clean and sudu make commands, I get a few warnings about no config files and it does not create a .ko file.

I think I need some more explicit instructions on how to apply the patch as the behavior is different from the instructions above.

Thanks,
Reply
#34
ylagace Wrote:I have Ion Zotac N330 board with minimal Ubuntu. XBMC is working fine but I get audio initialization error when running movies with HD audio codecs (True-HD, DTS-HD).

I haven't tested with True-HD and DTS-HD because I didn't have any file that contains content with this codecs (if anybody has any link to download samples for testing, please post them).

I suppose that XBMC or the driver isn't capable to bitstream the content as True-HD or DTS-HD. So I propose to you to first test playing as analog (it will appear as Multichannel LPCM to your AMP).

The patch above permits multiple channels at 48kHz. If you applied the patch correctly and you configure the analog sound (not bitstream) output to hdmi it will not be able to play because HD codecs use to be of 192kHz.

So you have 2 possible solutions:
  • Configure the analog output to play to plug:hdmi
  • Apply another patch to permit up to 192kHz LPCM
In the above solutions it will output as Multichannel LPCM (but in wrong speakers order).
Thats why I send this configuration to solve it:
plue Wrote:Here the virtual surround devices with correct mapping.



To test digital bitstream output as True-HD and DTS-HD should know:
-This is unaffected by speakers order (any digital bitstream shouldn't be affected)
-I didn't found any information about if it is possible by XBMC or by any driver (so please if you or anybody achieve the AMP to display True-HD or DTS-HD, please post that it is possible somewhere)

For this test you should configure to digital output, also that the AMP accepts DTS and Dobly and the bitstream digital output to hdmi (here without plug: !!, plug:hdmi to analog output).
Reply
#35
OK now working after I ran with the option -di then reboot then copy patch file and re-compile.

The speaker test is working.

Thanks
Reply
#36
ylagace Wrote:OK now working after I ran with the option -di then reboot then copy patch file and re-compile.

Hi ylagace,
This means that XBMC streams the HD bitstream to the AMP or xbmc decodes it and in the AMP appears PCM.

Thanks in advance.
Reply
#37
Hi guys.

It's good to know that others also experiment with lpcm audio.

I have a promise from Wei Ni Nvidia developer that he will find a general solution for channel mapping based on the hdmi report about available channels and sample formats of your receiver.

Here is what he wrote:

Code:
Hi, Alan

I will look the patch_intelhdmi.c, if I have a general solution, I will submit to the kernel.

Thanks

Wei.

Let's hope the best.

I think if there is an official solution we will see it here first:

http://git.alsa-project.org/?p=alsa-kern...5f;hb=HEAD
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
#38
Hi guys,

I need to make it clear that I have only tested with speaker-test.

I still have problems with bluray playback in xbmc. I do not get audio initialization error anymore but it keeps buffering the movie and I do not get anything beyond that. So i have no idea if I can get the LPCM multichannel to light up on my AVR (Onkyo SR705). I have many blurays with True-HD and DTS-HD working on my PCH and AVR so I will be able to try things.

I need to start looking at the xbmc log file, etc. first but I have very liitle time to spend on it and I am away starting tomorrow for a week. I will report on my experiment results once I can free up more time...
Reply
#39
ylagace Wrote:Hi guys,

I need to make it clear that I have only tested with speaker-test.

I still have problems with bluray playback in xbmc. I do not get audio initialization error anymore but it keeps buffering the movie and I do not get anything beyond that. So i have no idea if I can get the LPCM multichannel to light up on my AVR (Onkyo SR705). I have many blurays with True-HD and DTS-HD working on my PCH and AVR so I will be able to try things.

I need to start looking at the xbmc log file, etc. first but I have very liitle time to spend on it and I am away starting tomorrow for a week. I will report on my experiment results once I can free up more time...

At first start just try to play a normal dts or ac3 file, but with passthrough disabled. This way you can test the lpcm capability in xbmc.
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
#40
I might be able to try that tonight and i assume by deselecting AC3 and DTS in the xbmc audio hardware setup I will achieve this.

Please correct me if I am wrong and/or if I have to do something else to disable the passthrough.
Reply
#41
I have removed the passthrough and I get multichannel LPCM on my AVR with the channels mixed up as you described for both AC3 and DTS.
Reply
#42
ylagace Wrote:I have removed the passthrough and I get multichannel LPCM on my AVR with the channels mixed up as you described for both AC3 and DTS.

It is a good sign. You hardware is working. HD audio is only possible if you patch the source file to add the higher sampling rates and bits to the available formats. See the earlier posts.
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
#43
No chance for me to try the patch as I am away for a while but in meantime I have the log of a TrueHD example. This movie (Indiana Crystal Skull) has a TrueHD stream in the first position. You can see the error message and the first stream is showing as AC3?? in the log.

I hope this might be useful to some of you until I return and try the patch.

The video is playing good but I get the audio by very short dribble like 1 sec out of 10 or 20 secs. The AVR is showing Digital Dolby then PCM and back (keep cycling). I had passthrough enable. Now I realize I should have tried without passthrough (too late now!). Anyway just in case I post it here:

http://pastebin.com/m3ceac9f2
Reply
#44
Asrock ION 330. I got the patch applied no problems there...

Code:
┌────────────────────[AlsaMixer v1.0.20 (Press Escape to quit)]────────────────────┐
│ Card: HDA NVidia                                                                 │
│ Chip: Nvidia MCP7A HDMI                                                          │
│ View: [Playback] Capture  All                                                    │
│ Item: Master Front [dB gain=12.00, 12.00]                                        │
│                                                                                  │
│                                                                                  │
│    ┌──┐      ┌──┐      ┌──┐      ┌──┐     ┌──┐                                   │
│    │▒▒│      │▒▒│      │▒▒│      │  │     │  │                                   │
│    │▒▒│      │▒▒│      │▒▒│      │  │     │  │                                   │
│    │▒▒│      │▒▒│      │▒▒│      │  │     │  │                                   >
│    │▒▒│      │▒▒│      │▒▒│      │  │     │  │                                   >
│    │▒▒│      │▒▒│      │▒▒│      │  │     │  │                                   >
│    │▒▒│      │▒▒│      │▒▒│      │  │     │  │                                   >
│    │▒▒│      │▒▒│      │▒▒│      │  │     │  │                                   >
│    │▒▒│      │▒▒│      │▒▒│      │  │     │  │                                   >
│    │▒▒│      │▒▒│      │▒▒│      │  │     │  │                                   │
│    │▒▒│      │▒▒│      │▒▒│      │  │     │  │                                   │
│    │▒▒│      │▒▒│      │▒▒│      │▒▒│     │  │                                   │
│    │▒▒│      │▒▒│      │▒▒│      │▒▒│     │  │                                   │
│    ├──┤      └──┘      ├──┤      ├──┤     ├──┤      ┌──┐      ┌──┐      ┌──┐     │
│    │OO│                │OO│      │MO│     │MM│      │OO│      │OO│      │OO│     │
│    └──┘                └──┘      └──┘     └──┘      └──┘      └──┘      └──┘     │
│  100<>100  100<>100  100<>100   10<>10    0<>0                                   │
│ <Master F>   PCM      Front      Line     Mic      IEC958   IEC958 D  IEC958 1   │
└──────────────────────────────────────────────────────────────────────────────────┘

xbmc@Stuen:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: VT1708S Analog [VT1708S Analog]
Subdevices: 1/2
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
card 0: NVidia [HDA NVidia], device 1: VT1708S Digital [VT1708S Digital]
Subdevices: 2/2
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0


xbmc@Stuen:~$ aplay -L
default:CARD=NVidia
HDA NVidia, VT1708S Analog
Default Audio Device
front:CARD=NVidia,DEV=0
HDA NVidia, VT1708S Analog
Front speakers
surround40:CARD=NVidia,DEV=0
HDA NVidia, VT1708S Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=NVidia,DEV=0
HDA NVidia, VT1708S Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=NVidia,DEV=0
HDA NVidia, VT1708S Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=NVidia,DEV=0
HDA NVidia, VT1708S Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=NVidia,DEV=0
HDA NVidia, VT1708S Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=NVidia,DEV=0
HDA NVidia, VT1708S Digital
IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia,DEV=0
HDA NVidia, NVIDIA HDMI
HDMI Audio Output
null
Discard all samples (playback) or generate zero samples (capture)

xbmc@Stuen:~$ speaker-test -Dhdmi -c8

speaker-test 1.0.20

Playback device is hdmi
Stream parameters are 48000Hz, S16_LE, 8 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 16 to 4096
Period size range from 8 to 2048
Using max buffer size 4096
Periods = 4
was set period_size = 1024
was set buffer_size = 4096
0 - Front Left
4 - Center
1 - Front Right
7 - Side Right
^C

Not a sound is heard via my Onkyo 876 receiver (7.1 setup) nor the Pioneer KRL-37V TV. Tried both hdmi and plughw:0,3.

I'm going crazy here... Any ideas guys?
Reply
#45
VERY IMPORTANT !

EVERYONE HAVE TO START XSERVER TO HEAR ANY HDMI SOUND !

Start X and then start an xterm, there try the speaker test !

This could be your problem.
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

Logout Mark Read Team Forum Stats Members Help
[LINUX] LPCM over HDMI audio resampling questions?0