Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751182AbcL1Okr (ORCPT ); Wed, 28 Dec 2016 09:40:47 -0500 Received: from mail-db5eur01on0119.outbound.protection.outlook.com ([104.47.2.119]:52972 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750880AbcL1Okq (ORCPT ); Wed, 28 Dec 2016 09:40:46 -0500 X-Greylist: delayed 12824 seconds by postgrey-1.27 at vger.kernel.org; Wed, 28 Dec 2016 09:40:45 EST From: "Harisangam, Sharvari (S.)" To: Timur Tabi , Nicolin Chen , "Xiubo Li" , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai CC: "alsa-devel@alsa-project.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH] ASoC : fsl_ssi : Correct the condition to check AC97 mode Thread-Topic: [PATCH] ASoC : fsl_ssi : Correct the condition to check AC97 mode Thread-Index: AQHSYPp5twBSGFk3L0S3wYx3dU5J3Q== Date: Wed, 28 Dec 2016 11:06:44 +0000 Message-ID: <20161228110636.GA14768@ubuntu> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=sharvari.harisangam@visteon.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [202.0.77.73] x-ms-office365-filtering-correlation-id: 8400aea3-f1c9-4739-93bd-08d42f119bf9 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:AM5PR0602MB2802; x-microsoft-exchange-diagnostics: 1;AM5PR0602MB2802;7:N3heqr92J0ZwM5dHS5etRJWzRNubIr5xk2OV6un4iD2hAhWUjjJw5yeLdYCaSLoVV+aPwpSy0PVFRymzxDlOuUO/D/1JJKQatgqVv5XqKhMKTkliMfiNlRIO+DQHGyfdxxJ99rNYYyQblgMug2jLUvpEUL3FDKdNSyDcu3qnHqZBvqboINnxnRJ3legSqygu5QV2lImxIk5I8EQ6HrYLk/FJoklsW7zZNV9EK0o7//yMMykHBQf1GTx8+StajE2HTP5c6F5O551sYH9+uUzwD1UIC++Yx+Pllzs2dvjZ7kSE1DORyBod+nBtSxuZ7x0AF+zwYY/MM8MwJy/Lgmc7uXNtl2BPyZr3zTfbApRQbyYvbBXKyvtvzVGAFaWkHQZvQQgV7gfbYSIf3q2ucKzZ5qzp8btL6N9bficQwhj89/ZTWfMyPHA6zFkqhoEtG+mZHNk8HMPWFcpxItDHE5OHag== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(208512329853888); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123560025)(20161123562025)(20161123564025)(6072148);SRVR:AM5PR0602MB2802;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0602MB2802; x-forefront-prvs: 0170DAF08C x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(39410400002)(39450400003)(39840400002)(39860400002)(39850400002)(199003)(189002)(189998001)(106116001)(7416002)(92566002)(54356999)(38730400001)(7736002)(305945005)(101416001)(1076002)(81166006)(50986999)(102836003)(8676002)(6116002)(81156014)(5660300001)(2900100001)(2860100001)(33716001)(3846002)(8936002)(66066001)(2906002)(9686002)(39060400001)(6436002)(25786008)(6506006)(122556002)(4326007)(3660700001)(3280700002)(33656002)(97736004)(5001770100001)(6486002)(106356001)(86362001)(105586002)(77096006)(68736007);DIR:OUT;SFP:1102;SCL:1;SRVR:AM5PR0602MB2802;H:AM5PR0602MB2802.eurprd06.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <5808485AAFB54047816CADF943E10447@eurprd06.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: visteon.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Dec 2016 11:06:44.2625 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 7a147aaf-01ec-498c-80a1-e34a8c63c548 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0602MB2802 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uBSEeplb023967 Content-Length: 1045 Lines: 33 Corrected the condition to check if ssi is configured for AC97 mode. Other modes like dsp_a also satisfy the ANDing condition. Signed-off-by: Sharvari Harisangam --- 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 ca6f6b1..4fbb7a2 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -317,7 +317,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_AC97) == + SND_SOC_DAIFMT_AC97; } static bool fsl_ssi_is_i2s_master(struct fsl_ssi_private *ssi_private) @@ -1016,7 +1017,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_AC97) == SND_SOC_DAIFMT_AC97) fsl_ssi_setup_ac97(ssi_private); return 0; -- 2.7.4