summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorShuming Fan <shumingf@realtek.com>2026-02-25 17:12:10 +0800
committerMark Brown <broonie@kernel.org>2026-03-01 23:48:08 +0000
commit986841dcad257615a6e3f89231bb38e1f3506b77 (patch)
tree6e8e4eeb31bb0d8e221431bf68f4e5536e41b018 /sound
parent9351cf3fd92dc1349bb75f2f7f7324607dcf596f (diff)
ASoC: rt1321: fix DMIC ch2/3 mask issue
This patch fixed the DMIC ch2/3 mask missing problem. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20260225091210.3648905-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/rt1320-sdw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/codecs/rt1320-sdw.c b/sound/soc/codecs/rt1320-sdw.c
index 50f65662e143..8bb7e8497c72 100644
--- a/sound/soc/codecs/rt1320-sdw.c
+++ b/sound/soc/codecs/rt1320-sdw.c
@@ -2629,7 +2629,7 @@ static int rt1320_sdw_hw_params(struct snd_pcm_substream *substream,
struct sdw_port_config port_config;
struct sdw_port_config dmic_port_config[2];
struct sdw_stream_runtime *sdw_stream;
- int retval;
+ int retval, num_channels;
unsigned int sampling_rate;
dev_dbg(dai->dev, "%s %s", __func__, dai->name);
@@ -2661,7 +2661,8 @@ static int rt1320_sdw_hw_params(struct snd_pcm_substream *substream,
dmic_port_config[1].num = 10;
break;
case RT1321_DEV_ID:
- dmic_port_config[0].ch_mask = BIT(0) | BIT(1);
+ num_channels = params_channels(params);
+ dmic_port_config[0].ch_mask = GENMASK(num_channels - 1, 0);
dmic_port_config[0].num = 8;
break;
default: