alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFT] ASoC: arizona: Do proper shift for setting aif1 rate
@ 2012-12-20 15:29 Axel Lin
  2012-12-20 15:57 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-12-20 15:29 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Liam Girdwood

ARIZONA_AIF1_RATE_MASK is 0x7800 /* AIF1_RATE - [14:11] */
Thus we need left shift ARIZONA_AIF1_RATE_SHIFT when setting aif1 rate.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/codecs/arizona.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index adf397b..38248a7 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -714,7 +714,8 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,
 		snd_soc_update_bits(codec, ARIZONA_ASYNC_SAMPLE_RATE_1,
 				    ARIZONA_ASYNC_SAMPLE_RATE_MASK, sr_val);
 		snd_soc_update_bits(codec, base + ARIZONA_AIF_RATE_CTRL,
-				    ARIZONA_AIF1_RATE_MASK, 8);
+				    ARIZONA_AIF1_RATE_MASK,
+				    8 << ARIZONA_AIF1_RATE_SHIFT);
 		break;
 	default:
 		arizona_aif_err(dai, "Invalid clock %d\n", dai_priv->clk);
-- 
1.7.9.5

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

* Re: [PATCH RFT] ASoC: arizona: Do proper shift for setting aif1 rate
  2012-12-20 15:29 [PATCH RFT] ASoC: arizona: Do proper shift for setting aif1 rate Axel Lin
@ 2012-12-20 15:57 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-12-20 15:57 UTC (permalink / raw)
  To: Axel Lin; +Cc: alsa-devel, Liam Girdwood


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

On Thu, Dec 20, 2012 at 11:29:42PM +0800, Axel Lin wrote:
> ARIZONA_AIF1_RATE_MASK is 0x7800 /* AIF1_RATE - [14:11] */
> Thus we need left shift ARIZONA_AIF1_RATE_SHIFT when setting aif1 rate.

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] 2+ messages in thread

end of thread, other threads:[~2012-12-20 16:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-20 15:29 [PATCH RFT] ASoC: arizona: Do proper shift for setting aif1 rate Axel Lin
2012-12-20 15:57 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).