diff mbox series

[2/2] ASoC: wm8974: remove unsupported clock mode

Message ID 1593657056-4989-1-git-send-email-puyou.lu@gmail.com (mailing list archive)
State Accepted
Commit 01283d56f0ea0040b64dc785542f3ad3fb8b3e68
Headers show
Series [1/2] ASoC: wm8974: fix Boost Mixer Aux Switch | expand

Commit Message

puyou.lu@gmail.com July 2, 2020, 2:30 a.m. UTC
From: Puyou Lu <puyou.lu@gmail.com>

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

Signed-off-by: Puyou Lu <puyou.lu@gmail.com>
---
 sound/soc/codecs/wm8974.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c
index 764bf93..7cfc896 100644
--- a/sound/soc/codecs/wm8974.c
+++ b/sound/soc/codecs/wm8974.c
@@ -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: