[alsa-devel] [PATCH RFT] ASoC: da7213: Fix setting dmic_samplephase and dmic_clk_rate

Opensource [Adam Thomson] Adam.Thomson.Opensource at diasemi.com
Tue May 14 13:05:52 CEST 2013


Apologies. Completely missed this e-mail.

Good spot. Thanks for the update.

> -----Original Message-----
> From: Axel Lin [mailto:axel.lin at ingics.com]
> Sent: 09 May 2013 14:14
> To: Mark Brown
> Cc: Liam Girdwood; Opensource [Adam Thomson]; alsa-devel at alsa-project.org
> Subject: [PATCH RFT] ASoC: da7213: Fix setting dmic_samplephase and dmic_clk_rate
> 
> When set dmic_samplephase and dmic_clk_rate bits for dmic_cfg,
> current code checks pdata->dmic_data_sel which is wrong.
> 
> Signed-off-by: Axel Lin <axel.lin at ingics.com>
> ---
> This looks like a copy-paste bug.
> 
>  sound/soc/codecs/da7213.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c
> index 41230ad..4a6f1da 100644
> --- a/sound/soc/codecs/da7213.c
> +++ b/sound/soc/codecs/da7213.c
> @@ -1488,17 +1488,17 @@ static int da7213_probe(struct snd_soc_codec *codec)
>  				     DA7213_DMIC_DATA_SEL_SHIFT);
>  			break;
>  		}
> -		switch (pdata->dmic_data_sel) {
> +		switch (pdata->dmic_samplephase) {
>  		case DA7213_DMIC_SAMPLE_ON_CLKEDGE:
>  		case DA7213_DMIC_SAMPLE_BETWEEN_CLKEDGE:
> -			dmic_cfg |= (pdata->dmic_data_sel <<
> +			dmic_cfg |= (pdata->dmic_samplephase <<
>  				     DA7213_DMIC_SAMPLEPHASE_SHIFT);
>  			break;
>  		}
> -		switch (pdata->dmic_data_sel) {
> +		switch (pdata->dmic_clk_rate) {
>  		case DA7213_DMIC_CLK_3_0MHZ:
>  		case DA7213_DMIC_CLK_1_5MHZ:
> -			dmic_cfg |= (pdata->dmic_data_sel <<
> +			dmic_cfg |= (pdata->dmic_clk_rate <<
>  				     DA7213_DMIC_CLK_RATE_SHIFT);
>  			break;
>  		}
> --
> 1.8.1.2
> 
> 



More information about the Alsa-devel mailing list