From patchwork Thu Feb 22 22:01:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiuli Pan X-Patchwork-Id: 10240303 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 118F1602DC for ; Sat, 24 Feb 2018 07:42:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2EFA29873 for ; Sat, 24 Feb 2018 07:42:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E439D29875; Sat, 24 Feb 2018 07:42:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.4 required=2.0 tests=BAYES_00, DATE_IN_PAST_06_12, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 338D129873 for ; Sat, 24 Feb 2018 07:42:36 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id CD6F0267219; Sat, 24 Feb 2018 08:42:34 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 86778267873; Fri, 23 Feb 2018 08:43:12 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by alsa0.perex.cz (Postfix) with ESMTP id 17443267871 for ; Fri, 23 Feb 2018 08:43:06 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Feb 2018 23:43:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,382,1515484800"; d="scan'208";a="32195166" Received: from pxl-skle.sh.intel.com ([10.239.14.107]) by fmsmga004.fm.intel.com with ESMTP; 22 Feb 2018 23:43:03 -0800 From: Xiuli Pan To: alsa-devel@alsa-project.org Date: Fri, 23 Feb 2018 06:01:28 +0800 Message-Id: <1519336888-71831-1-git-send-email-xiuli.pan@linux.intel.com> X-Mailer: git-send-email 2.7.4 X-Mailman-Approved-At: Sat, 24 Feb 2018 08:42:32 +0100 Cc: Mark Brown , Pan Xiuli , xiuli.pan@intel.com Subject: [alsa-devel] [FIX][PATCH] ASoC: topology: Fix logical inversion in set_link_hw_format() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Pan Xiuli The master/slave conventions are wrt. the codec. The topology code contains a logical inversion, fix to follow ASoC usage. Signed-off-by: Pan Xiuli --- sound/soc/soc-topology.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 561f74d..2931248 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -2030,11 +2030,11 @@ static void set_link_hw_format(struct snd_soc_dai_link *link, /* clock masters */ bclk_master = hw_config->bclk_master; fsync_master = hw_config->fsync_master; - if (!bclk_master && !fsync_master) + if (bclk_master && fsync_master) link->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM; - else if (bclk_master && !fsync_master) - link->dai_fmt |= SND_SOC_DAIFMT_CBS_CFM; else if (!bclk_master && fsync_master) + link->dai_fmt |= SND_SOC_DAIFMT_CBS_CFM; + else if (bclk_master && !fsync_master) link->dai_fmt |= SND_SOC_DAIFMT_CBM_CFS; else link->dai_fmt |= SND_SOC_DAIFMT_CBS_CFS;