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

* Re: [PATCH RFT] ASoC: da7213: Fix setting dmic_samplephase and dmic_clk_rate
  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]
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-05-09 13:29 UTC (permalink / raw)
  To: Axel Lin; +Cc: Adam Thomson, Liam Girdwood, alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 200 bytes --]

On Thu, May 09, 2013 at 09:14:20PM +0800, Axel Lin wrote:
> When set dmic_samplephase and dmic_clk_rate bits for dmic_cfg,
> current code checks pdata->dmic_data_sel which is wrong.

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH RFT] ASoC: da7213: Fix setting dmic_samplephase and dmic_clk_rate
  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]
  1 sibling, 0 replies; 3+ messages in thread
From: Opensource [Adam Thomson] @ 2013-05-14 11:05 UTC (permalink / raw)
  To: Axel Lin, Mark Brown
  Cc: Opensource [Adam Thomson], Liam Girdwood,
	alsa-devel@alsa-project.org

Apologies. Completely missed this e-mail.

Good spot. Thanks for the update.

> -----Original Message-----
> From: Axel Lin [mailto:axel.lin@ingics.com]
> Sent: 09 May 2013 14:14
> To: Mark Brown
> Cc: Liam Girdwood; Opensource [Adam Thomson]; alsa-devel@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@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	[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.