Skip to contentSkip to conversation

ASoC: wm8974: remove unsupported clock mode

PATCH In review [email protected] 2 participants 2 messages Jul 2, 2020 – Jul 9, 2020

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

PATCH 2/2 ASoC: wm8974: remove unsupported clock mode

From: Puyou Lu <[email protected]>

In DSP_A mode, BIT7 of IFACE should bit 0 according to datasheet (ie. inverted frame clock is not support in this mode).

---
 sound/soc/codecs/wm8974.c | 4 ++++
 1 file changed, 4 insertions(+)
sound/soc/codecs/wm8974.c +4 -0
index 764bf93..7cfc896 100644
@@ -474,6 +474,10 @@ static int wm8974_set_dai_fmt(struct snd_soc_dai *codec_dai,
 		iface |= 0x0008;
 		break;
 	case SND_SOC_DAIFMT_DSP_A:
+		if ((fmt & SND_SOC_DAIFMT_INV_MASK) == SND_SOC_DAIFMT_IB_IF ||
+		    (fmt & SND_SOC_DAIFMT_INV_MASK) == SND_SOC_DAIFMT_NB_IF) {
+			return -EINVAL;
+		}
 		iface |= 0x00018;
 		break;
 	default:
Signature · 1 line
2.7.4