Commit 81b3cc55 authored by Sergej Sawazki's avatar Sergej Sawazki Committed by Mark Brown

ASoC: wm8741: Fix setting BCLK and LRCLK polarity

After checking the code and the datasheet, it seems like we are handling
the clock inversion (SND_SOC_DAIFMT_NB_IF and SND_SOC_DAIFMT_IB_IF) not
correctly.

>From the datasheet (Table 58):
R5 Format Control, BITS[5:4], [BCP:LRP]:
  (0) 00 =  normal   BCLK, normal   LRCLK
  (1) 01 =  normal   BCLK, inverted LRCLK <-- Fix this
  (2) 10 =  inverted BCLK, normal   LRCLK
  (3) 11 =  inverted BCLK, inverted LRCLK <-- Fix this
Signed-off-by: default avatarSergej Sawazki <sergej@taudac.com>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent eaf8abcf
...@@ -333,13 +333,13 @@ static int wm8741_set_dai_fmt(struct snd_soc_dai *codec_dai, ...@@ -333,13 +333,13 @@ static int wm8741_set_dai_fmt(struct snd_soc_dai *codec_dai,
switch (fmt & SND_SOC_DAIFMT_INV_MASK) { switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
case SND_SOC_DAIFMT_NB_NF: case SND_SOC_DAIFMT_NB_NF:
break; break;
case SND_SOC_DAIFMT_IB_IF: case SND_SOC_DAIFMT_NB_IF:
iface |= 0x10; iface |= 0x10;
break; break;
case SND_SOC_DAIFMT_IB_NF: case SND_SOC_DAIFMT_IB_NF:
iface |= 0x20; iface |= 0x20;
break; break;
case SND_SOC_DAIFMT_NB_IF: case SND_SOC_DAIFMT_IB_IF:
iface |= 0x30; iface |= 0x30;
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment