[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220530125421.885236-1-brent.lu@intel.com>
Date: Mon, 30 May 2022 20:54:21 +0800
From: Brent Lu <brent.lu@...el.com>
To: alsa-devel@...a-project.org
Cc: Cezary Rojewski <cezary.rojewski@...el.com>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
Liam Girdwood <liam.r.girdwood@...ux.intel.com>,
Jie Yang <yang.jie@...ux.intel.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, Brent Lu <brent.lu@...el.com>,
Bard Liao <yung-chuan.liao@...ux.intel.com>,
xliu <xiang.liu@...rus.com>, linux-kernel@...r.kernel.org
Subject: [PATCH] ASoC: Intel: cirrus-common: fix incorrect channel mapping
From: xliu <xiang.liu@...rus.com>
The default mapping of ASPRX1 Slot is left channel. Map the slots of
right amplifiers (WR and TR) to right channel.
Signed-off-by: xliu <xiang.liu@...rus.com>
Signed-off-by: Brent Lu <brent.lu@...el.com>
---
sound/soc/intel/boards/sof_cirrus_common.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/sound/soc/intel/boards/sof_cirrus_common.c b/sound/soc/intel/boards/sof_cirrus_common.c
index e71d74ec1b0b..64ca0e3991dc 100644
--- a/sound/soc/intel/boards/sof_cirrus_common.c
+++ b/sound/soc/intel/boards/sof_cirrus_common.c
@@ -107,6 +107,7 @@ static int cs35l41_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct snd_soc_dai *codec_dai;
int clk_freq, i, ret;
+ int rx_ch[2] = {1, 0};
clk_freq = sof_dai_get_bclk(rtd); /* BCLK freq */
@@ -134,6 +135,17 @@ static int cs35l41_hw_params(struct snd_pcm_substream *substream,
ret);
return ret;
}
+
+ /* Setup for R channel Slot: WR and TR */
+ if (i % 2) {
+ ret = snd_soc_dai_set_channel_map(codec_dai, 0, NULL,
+ ARRAY_SIZE(rx_ch), rx_ch);
+ if (ret < 0) {
+ dev_err(codec_dai->dev, "fail to set channel map, ret %d\n",
+ ret);
+ return ret;
+ }
+ }
}
return 0;
--
2.25.1
Powered by blists - more mailing lists