Skip to content

Commit

Permalink
ASoC: hdmi-codec: Fix broken channel map reporting
Browse files Browse the repository at this point in the history
Commit 4e08713 ("ASoC: hdmi-codec: fix channel info for
compressed formats") accidentally changed hcp->chmap_idx from
ca_id, the CEA channel allocation ID, to idx, the index to
the table of channel mappings ordered by preference.

This resulted in wrong channel maps being reported to userspace,
eg for 5.1 "FL,FR,LFE,FC" was reported instead of the expected
"FL,FR,LFE,FC,RL,RR":

~ # speaker-test -c 6 -t sine
...
 0 - Front Left
 3 - Front Center
 1 - Front Right
 2 - LFE
 4 - Unknown
 5 - Unknown

~ # amixer cget iface=PCM,name='Playback Channel Map' | grep ': values'
  : values=3,4,8,7,0,0,0,0

Revert this incorrect change so that channel maps are properly
reported again.

Fixes: 4e08713 ("ASoC: hdmi-codec: fix channel info for compressed formats")
Cc: [email protected]
Signed-off-by: Matthias Reichl <[email protected]>
  • Loading branch information
HiassofT authored and pelwell committed Sep 11, 2023
1 parent 0f3ef99 commit b4ecf4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/hdmi-codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ static int hdmi_codec_fill_codec_params(struct snd_soc_dai *dai,
hp->sample_rate = sample_rate;
hp->channels = channels;

hcp->chmap_idx = idx;
hcp->chmap_idx = ca_id;

return 0;
}
Expand Down

0 comments on commit b4ecf4a

Please sign in to comment.