Commit 61559af1 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

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: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
parent c1be5a5b
...@@ -1488,17 +1488,17 @@ static int da7213_probe(struct snd_soc_codec *codec) ...@@ -1488,17 +1488,17 @@ static int da7213_probe(struct snd_soc_codec *codec)
DA7213_DMIC_DATA_SEL_SHIFT); DA7213_DMIC_DATA_SEL_SHIFT);
break; break;
} }
switch (pdata->dmic_data_sel) { switch (pdata->dmic_samplephase) {
case DA7213_DMIC_SAMPLE_ON_CLKEDGE: case DA7213_DMIC_SAMPLE_ON_CLKEDGE:
case DA7213_DMIC_SAMPLE_BETWEEN_CLKEDGE: case DA7213_DMIC_SAMPLE_BETWEEN_CLKEDGE:
dmic_cfg |= (pdata->dmic_data_sel << dmic_cfg |= (pdata->dmic_samplephase <<
DA7213_DMIC_SAMPLEPHASE_SHIFT); DA7213_DMIC_SAMPLEPHASE_SHIFT);
break; break;
} }
switch (pdata->dmic_data_sel) { switch (pdata->dmic_clk_rate) {
case DA7213_DMIC_CLK_3_0MHZ: case DA7213_DMIC_CLK_3_0MHZ:
case DA7213_DMIC_CLK_1_5MHZ: case DA7213_DMIC_CLK_1_5MHZ:
dmic_cfg |= (pdata->dmic_data_sel << dmic_cfg |= (pdata->dmic_clk_rate <<
DA7213_DMIC_CLK_RATE_SHIFT); DA7213_DMIC_CLK_RATE_SHIFT);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment