aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergej Sawazki <sergej@taudac.com>2017-11-03 14:34:28 -0400
committerMark Brown <broonie@kernel.org>2017-11-03 14:46:40 -0400
commit81b3cc55afc3cde54df98f93fbd4704fab7cc0e0 (patch)
tree575e3406f099ea7d4636146d37e871c94e0af9fa
parenteaf8abcfb21ecb5f6460d0505b03da4c3b7eee98 (diff)
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: Sergej Sawazki <sergej@taudac.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/wm8741.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c
index 3c96af057a3e..a394dbee77aa 100644
--- a/sound/soc/codecs/wm8741.c
+++ b/sound/soc/codecs/wm8741.c
@@ -333,13 +333,13 @@ static int wm8741_set_dai_fmt(struct snd_soc_dai *codec_dai,
333 switch (fmt & SND_SOC_DAIFMT_INV_MASK) { 333 switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
334 case SND_SOC_DAIFMT_NB_NF: 334 case SND_SOC_DAIFMT_NB_NF:
335 break; 335 break;
336 case SND_SOC_DAIFMT_IB_IF: 336 case SND_SOC_DAIFMT_NB_IF:
337 iface |= 0x10; 337 iface |= 0x10;
338 break; 338 break;
339 case SND_SOC_DAIFMT_IB_NF: 339 case SND_SOC_DAIFMT_IB_NF:
340 iface |= 0x20; 340 iface |= 0x20;
341 break; 341 break;
342 case SND_SOC_DAIFMT_NB_IF: 342 case SND_SOC_DAIFMT_IB_IF:
343 iface |= 0x30; 343 iface |= 0x30;
344 break; 344 break;
345 default: 345 default: