* [PATCH RFT] ASoC: wm2200: Fix setting dai format in wm2200_set_fmt
@ 2012-12-21 8:28 Axel Lin
2012-12-21 9:34 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-12-21 8:28 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Liam Girdwood
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH RFT] ASoC: wm2200: Fix setting dai format in wm2200_set_fmt
2012-12-21 8:28 [PATCH RFT] ASoC: wm2200: Fix setting dai format in wm2200_set_fmt Axel Lin
@ 2012-12-21 9:34 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-12-21 9:34 UTC (permalink / raw)
To: Axel Lin; +Cc: alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 116 bytes --]
On Fri, Dec 21, 2012 at 04:28:37PM +0800, Axel Lin wrote:
> According to the defines in wm2200.h:
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-21 9:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-21 8:28 [PATCH RFT] ASoC: wm2200: Fix setting dai format in wm2200_set_fmt Axel Lin
2012-12-21 9:34 ` 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).