public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
* [PATCH] ASoC: samsung: ASoC: samsung: Fix IISMOD setting in i2s_set_sysclk()
@ 2014-11-20 10:03 Padmavathi Venna
  2014-11-20 10:44 ` [alsa-devel] " Sylwester Nawrocki
  2014-11-21 18:08 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Padmavathi Venna @ 2014-11-20 10:03 UTC (permalink / raw)
  To: linux-arm-kernel

In the i2s_set_sysclk() callback we are currently clearing all bits
of the IISMOD register in i2s_set_sysclk. It's due to an incorrect
mask used for the AND operation which is introduced in commit
a5a56871f804edac93a53b5e871c0e9818fb9033 (ASoC: samsung:
add support for exynos7 I2S controller) and also adds the missing
break statement.

Cc: Sylwester Nawrocki <s.nawrocki@samsung•com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung•com>
Signed-off-by: Padmavathi Venna <padma.v@samsung•com>
---
 sound/soc/samsung/i2s.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 0df6547..e1ace52 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -494,7 +494,7 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai,
 		if (dir == SND_SOC_CLOCK_IN)
 			mod |= 1 << i2s_regs->cdclkcon_off;
 		else
-			mod &= 0 << i2s_regs->cdclkcon_off;
+			mod &= ~(1 << i2s_regs->cdclkcon_off);
 
 		i2s->rfs = rfs;
 		break;
@@ -551,10 +551,11 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai,
 		}
 
 		if (clk_id == 0)
-			mod &= 0 << i2s_regs->rclksrc_off;
+			mod &= ~(1 << i2s_regs->rclksrc_off);
 		else
 			mod |= 1 << i2s_regs->rclksrc_off;
 
+		break;
 	default:
 		dev_err(&i2s->pdev->dev, "We don't serve that!\n");
 		return -EINVAL;
-- 
1.7.4.4

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

* [alsa-devel] [PATCH] ASoC: samsung: ASoC: samsung: Fix IISMOD setting in i2s_set_sysclk()
  2014-11-20 10:03 [PATCH] ASoC: samsung: ASoC: samsung: Fix IISMOD setting in i2s_set_sysclk() Padmavathi Venna
@ 2014-11-20 10:44 ` Sylwester Nawrocki
  2014-11-21 18:08 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Sylwester Nawrocki @ 2014-11-20 10:44 UTC (permalink / raw)
  To: linux-arm-kernel

On 20/11/14 11:03, Padmavathi Venna wrote:
> In the i2s_set_sysclk() callback we are currently clearing all bits
> of the IISMOD register in i2s_set_sysclk. It's due to an incorrect
> mask used for the AND operation which is introduced in commit
> a5a56871f804edac93a53b5e871c0e9818fb9033 (ASoC: samsung:
> add support for exynos7 I2S controller) and also adds the missing

The patch looks good to me, I'd just write about the missing break
in a separate sentence, i.e. s/and also adds/. Also add/

> break statement.
> 
> Cc: Sylwester Nawrocki <s.nawrocki@samsung•com>
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung•com>
> Signed-off-by: Padmavathi Venna <padma.v@samsung•com>
> ---
>  sound/soc/samsung/i2s.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
> index 0df6547..e1ace52 100644
> --- a/sound/soc/samsung/i2s.c
> +++ b/sound/soc/samsung/i2s.c
> @@ -494,7 +494,7 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai,
>  		if (dir == SND_SOC_CLOCK_IN)
>  			mod |= 1 << i2s_regs->cdclkcon_off;
>  		else
> -			mod &= 0 << i2s_regs->cdclkcon_off;
> +			mod &= ~(1 << i2s_regs->cdclkcon_off);
>  
>  		i2s->rfs = rfs;
>  		break;
> @@ -551,10 +551,11 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai,
>  		}
>  
>  		if (clk_id == 0)
> -			mod &= 0 << i2s_regs->rclksrc_off;
> +			mod &= ~(1 << i2s_regs->rclksrc_off);
>  		else
>  			mod |= 1 << i2s_regs->rclksrc_off;
>  
> +		break;
>  	default:
>  		dev_err(&i2s->pdev->dev, "We don't serve that!\n");
>  		return -EINVAL;

--
Regards,
Sylwester

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

* [PATCH] ASoC: samsung: ASoC: samsung: Fix IISMOD setting in i2s_set_sysclk()
  2014-11-20 10:03 [PATCH] ASoC: samsung: ASoC: samsung: Fix IISMOD setting in i2s_set_sysclk() Padmavathi Venna
  2014-11-20 10:44 ` [alsa-devel] " Sylwester Nawrocki
@ 2014-11-21 18:08 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2014-11-21 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Nov 20, 2014 at 03:33:17PM +0530, Padmavathi Venna wrote:
> In the i2s_set_sysclk() callback we are currently clearing all bits
> of the IISMOD register in i2s_set_sysclk. It's due to an incorrect
> mask used for the AND operation which is introduced in commit
> a5a56871f804edac93a53b5e871c0e9818fb9033 (ASoC: samsung:
> add support for exynos7 I2S controller) and also adds the missing
> break statement.

Applied, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141121/2251f2c9/attachment.sig>

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

end of thread, other threads:[~2014-11-21 18:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-20 10:03 [PATCH] ASoC: samsung: ASoC: samsung: Fix IISMOD setting in i2s_set_sysclk() Padmavathi Venna
2014-11-20 10:44 ` [alsa-devel] " Sylwester Nawrocki
2014-11-21 18:08 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox