diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-10-17 08:14:56 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-17 17:46:41 -0400 |
commit | 3a340104fad6ecbea5ad6792a2ea855f0507a6e0 (patch) | |
tree | 512bd250298c58a85bd4e0f0957e56d1f2785e70 /sound | |
parent | af1c53865df2a33c02647a38660192820cbf519f (diff) |
ASoC: wm8741: Fix setting interface format for DSP modes
According to the datasheet:
Format Control (05h)
BITS[3:2]
FMT[1:0] Audio data format selection
00 = right justified mode
01 = left justified mode
10 = I2S mode
11 = DSP mode
BIT[4] LRP Polarity selec for LRCLK/DSP mode select
0 = normal LRCLK poalrity/DSP mode A
1 = inverted LRCLK poarity/DSP mode B
For SND_SOC_DAIFMT_DSP_A, we should set 0x000C instead of 0x0003.
For SND_SOC_DAIFMT_DSP_B, we should set 0x001C instead of 0x0013.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/wm8741.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c index a42b282e0afd..85ebe029ee17 100644 --- a/sound/soc/codecs/wm8741.c +++ b/sound/soc/codecs/wm8741.c | |||
@@ -339,10 +339,10 @@ static int wm8741_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
339 | iface |= 0x0004; | 339 | iface |= 0x0004; |
340 | break; | 340 | break; |
341 | case SND_SOC_DAIFMT_DSP_A: | 341 | case SND_SOC_DAIFMT_DSP_A: |
342 | iface |= 0x0003; | 342 | iface |= 0x000C; |
343 | break; | 343 | break; |
344 | case SND_SOC_DAIFMT_DSP_B: | 344 | case SND_SOC_DAIFMT_DSP_B: |
345 | iface |= 0x0013; | 345 | iface |= 0x001C; |
346 | break; | 346 | break; |
347 | default: | 347 | default: |
348 | return -EINVAL; | 348 | return -EINVAL; |