alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] ASoC: wm8974: remove unsupported clock mode
@ 2020-07-02  2:30 puyou.lu
  2020-07-02  9:31 ` Charles Keepax
  0 siblings, 1 reply; 2+ messages in thread
From: puyou.lu @ 2020-07-02  2:30 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: Puyou Lu, patches, alsa-devel

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 --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:
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/2] ASoC: wm8974: remove unsupported clock mode
  2020-07-02  2:30 [PATCH 2/2] ASoC: wm8974: remove unsupported clock mode puyou.lu
@ 2020-07-02  9:31 ` Charles Keepax
  0 siblings, 0 replies; 2+ messages in thread
From: Charles Keepax @ 2020-07-02  9:31 UTC (permalink / raw)
  To: puyou.lu; +Cc: patches, alsa-devel, broonie, lgirdwood

On Thu, Jul 02, 2020 at 10:30:56AM +0800, puyou.lu@gmail.com wrote:
> 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>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-09 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-02  2:30 [PATCH 2/2] ASoC: wm8974: remove unsupported clock mode puyou.lu
2020-07-02  9:31 ` Charles Keepax

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).