Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: broonie@kernel.org, lgirdwood@gmail.com,
	Chen-Yu Tsai <wens@csie.org>,
	Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Mylene Josserand <mylene.josserand@free-electrons.com>,
	linux-arm-kernel@lists.infradead.org,
	alsa-devel@alsa-project.org,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	codekipper@gmail.com, stable@vger.kernel.org
Subject: [PATCH 1/3] ASoC: sun8i-codec: Invert Master / Slave condition
Date: Wed,  8 Nov 2017 16:47:08 +0100	[thread overview]
Message-ID: <20171108154710.16407-2-maxime.ripard@free-electrons.com> (raw)
In-Reply-To: <20171108154710.16407-1-maxime.ripard@free-electrons.com>

The current code had the condition backward when checking if the codec
should be running in slave or master mode.

Fix it, and make the comment a bit more readable.

Fixes: 36c684936fae ("ASoC: Add sun8i digital audio codec")
Cc: <stable@vger.kernel.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 sound/soc/sunxi/sun8i-codec.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index abfb710df7cb..038107baf414 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -170,11 +170,11 @@ static int sun8i_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
 
 	/* clock masters */
 	switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
-	case SND_SOC_DAIFMT_CBS_CFS: /* DAI Slave */
-		value = 0x0; /* Codec Master */
+	case SND_SOC_DAIFMT_CBS_CFS: /* Codec slave, DAI master */
+		value = 0x1;
 		break;
-	case SND_SOC_DAIFMT_CBM_CFM: /* DAI Master */
-		value = 0x1; /* Codec Slave */
+	case SND_SOC_DAIFMT_CBM_CFM: /* Codec Master, DAI slave */
+		value = 0x0;
 		break;
 	default:
 		return -EINVAL;
-- 
2.14.3

       reply	other threads:[~2017-11-08 15:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20171108154710.16407-1-maxime.ripard@free-electrons.com>
2017-11-08 15:47 ` Maxime Ripard [this message]
2017-11-08 16:22   ` [PATCH 1/3] ASoC: sun8i-codec: Invert Master / Slave condition Chen-Yu Tsai
2017-11-08 18:26   ` Applied "ASoC: sun8i-codec: Invert Master / Slave condition" to the asoc tree Mark Brown
2017-11-08 15:47 ` [PATCH 2/3] ASoC: sun8i-codec: Set the BCLK divider Maxime Ripard
2017-11-08 16:22   ` Chen-Yu Tsai
2017-11-08 15:47 ` [PATCH 3/3] ASoC: sun8i-codec: Fix left and right channels inversion Maxime Ripard
2017-11-08 16:25   ` Chen-Yu Tsai
2017-11-08 21:33   ` Applied "ASoC: sun8i-codec: Fix left and right channels inversion" to the asoc tree Mark Brown

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=20171108154710.16407-2-maxime.ripard@free-electrons.com \
    --to=maxime.ripard@free-electrons.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=codekipper@gmail.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mylene.josserand@free-electrons.com \
    --cc=stable@vger.kernel.org \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=wens@csie.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox