All of lore.kernel.org
 help / color / mirror / Atom feed
From: puyou.lu@gmail.com
To: broonie@kernel.org, lgirdwood@gmail.com
Cc: Puyou Lu <puyou.lu@gmail.com>,
	patches@opensource.cirrus.com, alsa-devel@alsa-project.org
Subject: [PATCH 2/2] ASoC: wm8974: remove unsupported clock mode
Date: Thu,  2 Jul 2020 10:30:56 +0800	[thread overview]
Message-ID: <1593657056-4989-1-git-send-email-puyou.lu@gmail.com> (raw)

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


             reply	other threads:[~2020-07-09 14:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02  2:30 puyou.lu [this message]
2020-07-02  9:31 ` [PATCH 2/2] ASoC: wm8974: remove unsupported clock mode Charles Keepax

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1593657056-4989-1-git-send-email-puyou.lu@gmail.com \
    --to=puyou.lu@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=patches@opensource.cirrus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.