mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 18:47:06 +00:00
2e715fb4fc
Add support for BCM2712 (Raspberry Pi 5).
3bb5880ab3
Patches were generated from the diff between linux kernel branch linux-6.1.y
and rpi-6.1.y from raspberry pi kernel source:
- git format-patch linux-6.1.y...rpi-6.1.y
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
[Remove applied and reverted patches, squash patches and config commits]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
57 lines
1.8 KiB
Diff
57 lines
1.8 KiB
Diff
From a1caea3c996f6bfa8c9568f521257f4e473285fb Mon Sep 17 00:00:00 2001
|
|
From: Matthias Reichl <hias@horus.com>
|
|
Date: Fri, 29 Sep 2023 21:50:28 +0200
|
|
Subject: [PATCH] ASoC: hdmi-codec: Fix broken channel map reporting
|
|
|
|
Commit b84b53149476b22cc3b8677b771fb4cf06d1d455 upstream.
|
|
|
|
Commit 4e0871333661 ("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
|
|
|
|
Switch this back to ca_id in case of PCM audio so the correct channel
|
|
map is reported again and set it to HDMI_CODEC_CHMAP_IDX_UNKNOWN in
|
|
case of non-PCM audio so the PCM channel map control returns "Unknown"
|
|
channels (value 0).
|
|
|
|
Fixes: 4e0871333661 ("ASoC: hdmi-codec: fix channel info for compressed formats")
|
|
Cc: stable@vger.kernel.org
|
|
Signed-off-by: Matthias Reichl <hias@horus.com>
|
|
Link: https://lore.kernel.org/r/20230929195027.97136-1-hias@horus.com
|
|
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
---
|
|
sound/soc/codecs/hdmi-codec.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
--- a/sound/soc/codecs/hdmi-codec.c
|
|
+++ b/sound/soc/codecs/hdmi-codec.c
|
|
@@ -520,7 +520,10 @@ static int hdmi_codec_fill_codec_params(
|
|
hp->sample_rate = sample_rate;
|
|
hp->channels = channels;
|
|
|
|
- hcp->chmap_idx = idx;
|
|
+ if (pcm_audio)
|
|
+ hcp->chmap_idx = ca_id;
|
|
+ else
|
|
+ hcp->chmap_idx = HDMI_CODEC_CHMAP_IDX_UNKNOWN;
|
|
|
|
return 0;
|
|
}
|