From patchwork Fri Jun 5 13:43:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Mouiche X-Patchwork-Id: 6553541 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 275939F1C1 for ; Fri, 5 Jun 2015 13:43:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 44F6E206E3 for ; Fri, 5 Jun 2015 13:43:45 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 44DC6206D9 for ; Fri, 5 Jun 2015 13:43:42 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 5412E266854; Fri, 5 Jun 2015 15:43:41 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 466D2266831; Fri, 5 Jun 2015 15:43:35 +0200 (CEST) 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 379CB266842; Fri, 5 Jun 2015 15:43:32 +0200 (CEST) Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by alsa0.perex.cz (Postfix) with ESMTP id 51BBD2667CE for ; Fri, 5 Jun 2015 15:43:24 +0200 (CEST) Received: by wgbgq6 with SMTP id gq6so57238923wgb.3 for ; Fri, 05 Jun 2015 06:43:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=dAJQp+LjwVoy6c5OCBFfR/fXWkr2ZMxhncg3vQuDkzM=; b=XDekp4nadFbGC3gMqUNoH6ESenXK/uwV3sbWyJLCZr2fFR/Cr33Xa3m3og7JpQ8Xr2 smcA1WQsUY7s7GPm+DkJ4bX63mQtd8bzdrlVtr317lGWESjZvc8pPwQttet8IKs4UZ6U Jgx2+wb+t7HVgYbVuIk/jxkZhdT3BfKY0K8p7PmIleAPGo6EqlzfFhjMiGeLurkIr5BL 9vZ7IaPJMlHXk9EJL9aTab2g/giHH8M/gMCZPDwZgqtQvIMqR9YYtLDfjJrKTgMNWrEJ F1MGqv9jVqfiibLaoQCCzkKHPlLZ/ldqoVrHlVvnwbrmCJMe5V/eaoKHCnXX0zWXPuAO tUww== X-Gm-Message-State: ALoCoQlaE8Nhmld+wVIbUHm0az8YC05E3F+IKvNRb4Dp4uYCIeKfu5H1CErpuWd1zaBp8Jm6WUTm X-Received: by 10.194.179.200 with SMTP id di8mr6790643wjc.56.1433511804060; Fri, 05 Jun 2015 06:43:24 -0700 (PDT) Received: from localhost.localdomain (AAnnecy-653-1-146-177.w86-200.abo.wanadoo.fr. [86.200.209.177]) by mx.google.com with ESMTPSA id w11sm10702459wjr.48.2015.06.05.06.43.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 05 Jun 2015 06:43:23 -0700 (PDT) From: Arnaud Mouiche To: alsa-devel@alsa-project.org Date: Fri, 5 Jun 2015 15:43:14 +0200 Message-Id: <1433511794-29284-1-git-send-email-arnaud.mouiche@invoxia.com> X-Mailer: git-send-email 1.9.1 Cc: Arnaud Mouiche Subject: [alsa-devel] [PATCH] ASoC: fsl_ssi: Fixing invalid fmt SND_SOC_DAIFMT_AC97 test 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 SND_SOC_DAIFMT_AC97 (6) has similar bits than SND_SOC_DAIFMT_DSP_A (4) and can't be tested with a simple AND operation Signed-off-by: Arnaud Mouiche --- sound/soc/fsl/fsl_ssi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 6b0c8f7..c25a1e8 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -249,7 +249,8 @@ MODULE_DEVICE_TABLE(of, fsl_ssi_ids); static bool fsl_ssi_is_ac97(struct fsl_ssi_private *ssi_private) { - return !!(ssi_private->dai_fmt & SND_SOC_DAIFMT_AC97); + return (ssi_private->dai_fmt & SND_SOC_DAIFMT_FORMAT_MASK) == + SND_SOC_DAIFMT_AC97; } static bool fsl_ssi_is_i2s_master(struct fsl_ssi_private *ssi_private) @@ -945,7 +946,7 @@ static int _fsl_ssi_set_dai_fmt(struct device *dev, CCSR_SSI_SCR_TCH_EN); } - if (fmt & SND_SOC_DAIFMT_AC97) + if ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_AC97) fsl_ssi_setup_ac97(ssi_private); return 0;