diff options
| author | Shuming Fan <shumingf@realtek.com> | 2026-02-25 17:12:10 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-04-02 13:25:18 +0200 |
| commit | 938b5cb4f413a0f2703174526411b49e706d00b8 (patch) | |
| tree | 5064debabbc183b2b2f1fc421cfaa9b3191e68b0 /sound/soc | |
| parent | d72061d3de9e1dc974a7feee66dc19be15255077 (diff) | |
ASoC: rt1321: fix DMIC ch2/3 mask issue
[ Upstream commit 986841dcad257615a6e3f89231bb38e1f3506b77 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound/soc')
| -rw-r--r-- | sound/soc/codecs/rt1320-sdw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/codecs/rt1320-sdw.c b/sound/soc/codecs/rt1320-sdw.c index e6142645b903..4d09dd06f2d8 100644 --- a/sound/soc/codecs/rt1320-sdw.c +++ b/sound/soc/codecs/rt1320-sdw.c @@ -1455,7 +1455,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); @@ -1487,7 +1487,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: |
