[alsa-devel] NVIDIA HDMI: Channel remapping does not work for stereo?
aplattner at nvidia.com
Wed Oct 30 00:12:31 CET 2013
On 10/24/2013 04:31 PM, Anssi Hannula wrote:
> I just noticed while testing the ALSA HDMI channel remapping code that
> my NVIDIA codec 0x10de0015 does not seem to follow the Audio Sample
> Packet (ASP) channel mapping (set by verb F34h as per HDA spec 220.127.116.11)
> when playing back stereo audio.
> This can be reproduced by e.g.:
> $ speaker-test -c2 -Dhdmi:CARD=NVidia,DEV=0 -m FR,FL
> The channels are reversed compared to what the printout is (i.e. the
> codec plays the streams straight-through instead of swapping channels as
> E.g. this works expectedly, however:
> $ speaker-test -c4 -Dhdmi:CARD=NVidia,DEV=1 -m FR,FL,RR,RL
> (note that recent sound git master or for-next is needed for these kind
> of remappings to work properly at all)
> On Intel HDMI codec 0x80862806 both work.
> While stereo right-left swapping is admittedly a rather corner-case
> situation, I guess we should probably refuse such chmaps when they are
> not supported.
> Aaron, do you have any information on whether this affects all NVIDIA
> HDMI codecs?
I don't know much about the audio side of things, I'm afraid. The more
knowledgeable people I asked about this said that they would expect a
L/R swap to work.
"In fact the CTR/LFE channels have their mappings swapped.
The default mapping is:
Converter channel 0 mapped to ASP slot 0
Converter channel 1 mapped to ASP slot 1
Converter channel 2 mapped to ASP slot 3
Converter channel 3 mapped to ASP slot 2
Converter channel 4 mapped to ASP slot 4
Converter channel 5 mapped to ASP slot 5
Converter channel 6 mapped to ASP slot 6
Converter channel 7 mapped to ASP slot 7
In theory, you should be able to map any incoming channel, to any
You can look at section18.104.22.168 of the HDA spec (Audio Sample Packet
(ASP) Channel Mapping) for the information on this.
There is a way to manually send verbs and get their responses to see if
the HW is programmed correctly.
To do this, you have to use the Immediate Command and response registers
to issue a "Get ASP Channel Mapping" for each channel. The other
parameters needed are the codec id and node id of the associated
It is a bit involved, but I can send you the info. If you have the codec
and node ids already, it is actually relatively simple."
More information about the Alsa-devel