From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lrg@ti.com>
Subject: [PATCH RFT] ASoC: wm2200: Fix setting dai format in wm2200_set_fmt
Date: Fri, 21 Dec 2012 16:28:37 +0800 [thread overview]
Message-ID: <1356078517.8338.2.camel@phoenix> (raw)
According to the defines in wm2200.h:
/*
* R1284 (0x504) - Audio IF 1_5
*/
#define WM2200_AIF1_FMT_MASK 0x0007 /* AIF1_FMT - [2:0] */
#define WM2200_AIF1_FMT_SHIFT 0 /* AIF1_FMT - [2:0] */
#define WM2200_AIF1_FMT_WIDTH 3 /* AIF1_FMT - [2:0] */
We should not left shift 1 bit for fmt_val when setting dai format.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
Hi Mark,
wm2200.h defines WM2200_AIF1_FMT_SHIFT to be 0, so current code looks wrong to me.
I don't have the datasheet, so can you check if this patch is correct?
Axel
sound/soc/codecs/wm2200.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c
index afcf31d..a12fc2f 100644
--- a/sound/soc/codecs/wm2200.c
+++ b/sound/soc/codecs/wm2200.c
@@ -1626,7 +1626,7 @@ static int wm2200_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
WM2200_AIF1TX_LRCLK_MSTR | WM2200_AIF1TX_LRCLK_INV,
lrclk);
snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_5,
- WM2200_AIF1_FMT_MASK << 1, fmt_val << 1);
+ WM2200_AIF1_FMT_MASK, fmt_val);
return 0;
}
--
1.7.9.5
next reply other threads:[~2012-12-21 8:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-21 8:28 Axel Lin [this message]
2012-12-21 9:34 ` [PATCH RFT] ASoC: wm2200: Fix setting dai format in wm2200_set_fmt 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=1356078517.8338.2.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--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.