lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 31 May 2022 09:51:36 -0500
From:   Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To:     Brent Lu <brent.lu@...el.com>, alsa-devel@...a-project.org
Cc:     Cezary Rojewski <cezary.rojewski@...el.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>,
        Bard Liao <yung-chuan.liao@...ux.intel.com>,
        xliu <xiang.liu@...rus.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: Intel: cirrus-common: fix incorrect channel mapping



On 5/30/22 07:54, Brent Lu wrote:
> 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};

Should this be 'const'?

I am also not clear on the mapping, how does this select the right
channel? This selects slot0 and the left channel, what am I missing?


>  
>  	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;
> +			}
> +		}

Should we do this loop for the left channels as well to have an explicit
setting?

>  	}
>  
>  	return 0;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ