From patchwork Wed Nov 8 15:47:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 118288 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5448621qgn; Wed, 8 Nov 2017 07:47:26 -0800 (PST) X-Google-Smtp-Source: ABhQp+SIzDc9dYkQCUkm8hfvXiHtVwusU/Hee6HsvVb4EwVcEodq7GiAn4J9G7KR+rs0NC6TTwbG X-Received: by 10.98.237.5 with SMTP id u5mr921684pfh.209.1510156046873; Wed, 08 Nov 2017 07:47:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510156046; cv=none; d=google.com; s=arc-20160816; b=YH27M4jb5ssFn+5myW4zUq1KmuIS4tfhx/aYSPNEofMedOwinrMOWPjpeokY0JuAdK uOgsvbJ/jlX8foez3yDraflOQpce1mjJdA/zPt0bb4dEQOJH/envc1Vm4yqC7fkwwgKb xcjeZBP+/N5+3uuciz3mhLl3WaHXPI6BUEKS1U03q09BHNACExzhiv9Vess5PUnZSD/7 bZHlTtP52R3qW6VgCZwGrFE28xlH+n251oZyNaNISQ5O2jhT+rpViGl5iH8+tKkvSflj 3+FAiIuV+18YsII5y3b/zX1/sIAjXzHd22DWsfVEF00Hy6KJOsFSuRTxcKYNMg2yZ7vi TGYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=FfGhoLTskpKqE6sbI8l06Xfrd5MOA4ZwGPVlR4/6RT0=; b=v6CWrRf65lgMYZyfLeS+YqoACVMRz82L64Emw3xLoURZ+X8Z7aL1zVRTamXJ2O515y 2TirJQO8a6o9BgOrycCcVUXFJBaoxBvCK6J0NCANO6aDzG7nky/9mfzyNRFzpOB5DyRH FN4iy+YvN3abwhkxKHfQ8Dru46JBSbPYnAkYimZ93p8aEFSk01uPensP7NvgNedcG/ie I/PPchapPX3zcoTUf2WUE7pFow1rAz+y3GkEdoA3imAaZhQ1dmlyCJkkselLMK3eNZS6 Of7A2Q0S6yhM3PD8D5eioz2NXH0mcVTjI1r1rIC2V6izZcDvX950mTzF/ZguW/YmbDrk BHZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m6si4025896pgu.691.2017.11.08.07.47.26; Wed, 08 Nov 2017 07:47:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752690AbdKHPrX (ORCPT + 9 others); Wed, 8 Nov 2017 10:47:23 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:44582 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752491AbdKHPrU (ORCPT ); Wed, 8 Nov 2017 10:47:20 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 70D23208C0; Wed, 8 Nov 2017 16:47:18 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 472092068C; Wed, 8 Nov 2017 16:47:18 +0100 (CET) From: Maxime Ripard To: broonie@kernel.org, lgirdwood@gmail.com, Chen-Yu Tsai , Maxime Ripard Cc: Mylene Josserand , linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, Thomas Petazzoni , 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 Message-Id: <20171108154710.16407-2-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171108154710.16407-1-maxime.ripard@free-electrons.com> References: <20171108154710.16407-1-maxime.ripard@free-electrons.com> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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: Signed-off-by: Maxime Ripard --- sound/soc/sunxi/sun8i-codec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.14.3 Reviewed-by: Chen-Yu Tsai 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;