Skip to contentSkip to conversation

ASoC: wm8741: Fix setting BCLK and LRCLK polarity

PATCH RESEND In review Sergej Sawazki 2 participants 6 messages Nov 3, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 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.

Quoted 1 line

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

---
Based on 'for-next' (e678524)

 sound/soc/codecs/wm8741.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/wm8741.c +2 -2
index 3c96af0..a394dbe 100644
@@ -333,13 +333,13 @@ static int wm8741_set_dai_fmt(struct snd_soc_dai *codec_dai,
 	switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
 	case SND_SOC_DAIFMT_NB_NF:
 		break;
-	case SND_SOC_DAIFMT_IB_IF:
+	case SND_SOC_DAIFMT_NB_IF:
 		iface |= 0x10;
 		break;
 	case SND_SOC_DAIFMT_IB_NF:
 		iface |= 0x20;
 		break;
-	case SND_SOC_DAIFMT_NB_IF:
+	case SND_SOC_DAIFMT_IB_IF:
 		iface |= 0x30;
 		break;
 	default:
Signature · 1 line
2.7.4
#2 lore raw

Am 03.11.2017 um 19:37 schrieb Mark Brown:

Quoted 8 lines · Sergej Sawazki
Quoted 4 lines

(3) 11 = inverted BCLK, inverted LRCLK <-- Fix this

---

Is this a straight resend - you dropped Charles' ack?

Oops, sorry, forgot about Charles' ack. I have created a new patch, made sure it applies and resent.

maintainer
#3 lore raw
Quoted 10 lines · Sergej Sawazki

Am 03.11.2017 um 19:37 schrieb Mark Brown:

Quoted 6 lines · Sergej Sawazki
Quoted 3 lines

(3) 11 = inverted BCLK, inverted LRCLK <-- Fix this

Is this a straight resend - you dropped Charles' ack?

Oops, sorry, forgot about Charles' ack. I have created a new patch, made sure it applies and resent.

Just to be clear when you say it's a new patch you mean it's the same patch but rebased?

#4 lore raw

Am 03.11.2017 um 19:46 schrieb Mark Brown:

Quoted 7 lines · Sergej Sawazki
Quoted 5 lines

Am 03.11.2017 um 19:37 schrieb Mark Brown:

Quoted 4 lines · Sergej Sawazki
Quoted 3 lines

(3) 11 = inverted BCLK, inverted LRCLK <-- Fix this

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Is this a straight resend - you dropped Charles' ack?

Oops, sorry, forgot about Charles' ack. I have created a new patch, made sure it applies and resent.

Just to be clear when you say it's a new patch you mean it's the same patch but rebased?

Right, same content, rebased on current for-next.

maintainer
#5 lore raw
Quoted 6 lines · Sergej Sawazki

Am 03.11.2017 um 19:46 schrieb Mark Brown:

Quoted 2 lines

Just to be clear when you say it's a new patch you mean it's the same patch but rebased?

Right, same content, rebased on current for-next.

Great!