All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFT] ASoC: da7213: Fix setting dmic_samplephase and dmic_clk_rate
@ 2013-05-09 13:14 Axel Lin
  2013-05-09 13:29 ` Mark Brown
  2013-05-14 11:05 ` Opensource [Adam Thomson]
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2013-05-09 13:14 UTC (permalink / raw)
  To: Mark Brown; +Cc: Adam Thomson, Liam Girdwood, alsa-devel

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@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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-14 11:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-09 13:14 [PATCH RFT] ASoC: da7213: Fix setting dmic_samplephase and dmic_clk_rate Axel Lin
2013-05-09 13:29 ` Mark Brown
2013-05-14 11:05 ` Opensource [Adam Thomson]

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.