From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
alsa-devel@alsa-project.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@ti.com>
Subject: [RFC][PATCH 3/3] ASoC: wm8940: Do not left shift the div parameter in wm8940_set_dai_clkdiv
Date: Mon, 24 Oct 2011 11:35:12 +0800 [thread overview]
Message-ID: <1319427312.5773.6.camel@phoenix> (raw)
In-Reply-To: <1319427161.5773.3.camel@phoenix>
Just check with other codec drivers, we do left shit div for
the corresponding bits from the caller in all other drivers.
I don't find the caller calling wm8940_set_dai_clkdiv now,
just make the behavior consistent with other drivers.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
sound/soc/codecs/wm8940.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
index fec3892..72cec5b 100644
--- a/sound/soc/codecs/wm8940.c
+++ b/sound/soc/codecs/wm8940.c
@@ -620,15 +620,15 @@ static int wm8940_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
switch (div_id) {
case WM8940_BCLKDIV:
reg = snd_soc_read(codec, WM8940_CLOCK) & 0xFEF3;
- ret = snd_soc_write(codec, WM8940_CLOCK, reg | (div << 2));
+ ret = snd_soc_write(codec, WM8940_CLOCK, reg | div);
break;
case WM8940_MCLKDIV:
reg = snd_soc_read(codec, WM8940_CLOCK) & 0xFF1F;
- ret = snd_soc_write(codec, WM8940_CLOCK, reg | (div << 5));
+ ret = snd_soc_write(codec, WM8940_CLOCK, reg | div);
break;
case WM8940_OPCLKDIV:
reg = snd_soc_read(codec, WM8940_GPIO) & 0xFFCF;
- ret = snd_soc_write(codec, WM8940_GPIO, reg | (div << 4));
+ ret = snd_soc_write(codec, WM8940_GPIO, reg | div);
break;
}
return ret;
--
1.7.5.4
WARNING: multiple messages have this Message-ID (diff)
From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@ti.com>,
alsa-devel@alsa-project.org
Subject: [RFC][PATCH 3/3] ASoC: wm8940: Do not left shift the div parameter in wm8940_set_dai_clkdiv
Date: Mon, 24 Oct 2011 11:35:12 +0800 [thread overview]
Message-ID: <1319427312.5773.6.camel@phoenix> (raw)
In-Reply-To: <1319427161.5773.3.camel@phoenix>
Just check with other codec drivers, we do left shit div for
the corresponding bits from the caller in all other drivers.
I don't find the caller calling wm8940_set_dai_clkdiv now,
just make the behavior consistent with other drivers.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
sound/soc/codecs/wm8940.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
index fec3892..72cec5b 100644
--- a/sound/soc/codecs/wm8940.c
+++ b/sound/soc/codecs/wm8940.c
@@ -620,15 +620,15 @@ static int wm8940_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
switch (div_id) {
case WM8940_BCLKDIV:
reg = snd_soc_read(codec, WM8940_CLOCK) & 0xFEF3;
- ret = snd_soc_write(codec, WM8940_CLOCK, reg | (div << 2));
+ ret = snd_soc_write(codec, WM8940_CLOCK, reg | div);
break;
case WM8940_MCLKDIV:
reg = snd_soc_read(codec, WM8940_CLOCK) & 0xFF1F;
- ret = snd_soc_write(codec, WM8940_CLOCK, reg | (div << 5));
+ ret = snd_soc_write(codec, WM8940_CLOCK, reg | div);
break;
case WM8940_OPCLKDIV:
reg = snd_soc_read(codec, WM8940_GPIO) & 0xFFCF;
- ret = snd_soc_write(codec, WM8940_GPIO, reg | (div << 4));
+ ret = snd_soc_write(codec, WM8940_GPIO, reg | div);
break;
}
return ret;
--
1.7.5.4
next prev parent reply other threads:[~2011-10-24 3:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-24 3:32 [PATCH 1/3] ASoC: wm8940: Fix setting PLL Output clock division ratio Axel Lin
2011-10-24 3:33 ` [PATCH 2/3] ASoC: wm8940: Fix a typo for the mask of setting WM8940_BCLKDIV Axel Lin
2011-10-24 3:33 ` Axel Lin
2011-10-24 12:06 ` Girdwood, Liam
2011-10-24 12:06 ` Girdwood, Liam
2011-10-24 3:35 ` Axel Lin [this message]
2011-10-24 3:35 ` [RFC][PATCH 3/3] ASoC: wm8940: Do not left shift the div parameter in wm8940_set_dai_clkdiv Axel Lin
2011-10-24 10:10 ` Mark Brown
2011-10-24 12:06 ` [PATCH 1/3] ASoC: wm8940: Fix setting PLL Output clock division ratio Girdwood, Liam
2011-10-24 12:09 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1319427312.5773.6.camel@phoenix \
--to=axel.lin@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dp@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.