Skip to content

Commit 986841d

Browse files
shumingfanbroonie
authored andcommitted
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>
1 parent 9351cf3 commit 986841d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

sound/soc/codecs/rt1320-sdw.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2629,7 +2629,7 @@ static int rt1320_sdw_hw_params(struct snd_pcm_substream *substream,
26292629
struct sdw_port_config port_config;
26302630
struct sdw_port_config dmic_port_config[2];
26312631
struct sdw_stream_runtime *sdw_stream;
2632-
int retval;
2632+
int retval, num_channels;
26332633
unsigned int sampling_rate;
26342634

26352635
dev_dbg(dai->dev, "%s %s", __func__, dai->name);
@@ -2661,7 +2661,8 @@ static int rt1320_sdw_hw_params(struct snd_pcm_substream *substream,
26612661
dmic_port_config[1].num = 10;
26622662
break;
26632663
case RT1321_DEV_ID:
2664-
dmic_port_config[0].ch_mask = BIT(0) | BIT(1);
2664+
num_channels = params_channels(params);
2665+
dmic_port_config[0].ch_mask = GENMASK(num_channels - 1, 0);
26652666
dmic_port_config[0].num = 8;
26662667
break;
26672668
default:

0 commit comments

Comments
 (0)