From patchwork Thu Nov 20 08:41:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zidan Wang X-Patchwork-Id: 5346661 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3AB309F2F1 for ; Thu, 20 Nov 2014 08:41:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 77AF6201F5 for ; Thu, 20 Nov 2014 08:41:08 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id BDB31201EF for ; Thu, 20 Nov 2014 08:41:05 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4B3DB2658F7; Thu, 20 Nov 2014 09:41:04 +0100 (CET) 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, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id AEE0C2605F6; Thu, 20 Nov 2014 09:40:56 +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 61D8F260601; Thu, 20 Nov 2014 09:40:55 +0100 (CET) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bn0104.outbound.protection.outlook.com [157.56.110.104]) by alsa0.perex.cz (Postfix) with ESMTP id EAA302605F1 for ; Thu, 20 Nov 2014 09:40:46 +0100 (CET) Received: from CH1PR03CA006.namprd03.prod.outlook.com (10.255.156.151) by CY1PR0301MB1259.namprd03.prod.outlook.com (25.161.213.11) with Microsoft SMTP Server (TLS) id 15.1.16.15; Thu, 20 Nov 2014 08:40:43 +0000 Received: from BN1AFFO11FD014.protection.gbl (10.255.156.132) by CH1PR03CA006.outlook.office365.com (10.255.156.151) with Microsoft SMTP Server (TLS) id 15.1.26.15 via Frontend Transport; Thu, 20 Nov 2014 08:40:42 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD014.mail.protection.outlook.com (10.58.52.74) with Microsoft SMTP Server (TLS) id 15.1.6.13 via Frontend Transport; Thu, 20 Nov 2014 08:40:42 +0000 Received: from b50113.ap.freescale.net (b50113.ap.freescale.net [10.192.241.89]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id sAK8eRFD021593; Thu, 20 Nov 2014 01:40:38 -0700 From: Zidan Wang To: Date: Thu, 20 Nov 2014 16:41:18 +0800 Message-ID: <1416472878-12108-2-git-send-email-b50113@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1416472878-12108-1-git-send-email-b50113@freescale.com> References: <1416472878-12108-1-git-send-email-b50113@freescale.com> X-EOPAttributedMessage: 0 Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=B50113@freescale.com; X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(44976005)(47776003)(92726001)(68736004)(50466002)(99396003)(6806004)(120916001)(19580405001)(19580395003)(104016003)(64706001)(77156002)(62966003)(33646002)(50986999)(76176999)(31966008)(20776003)(102836001)(21056001)(92566001)(104166001)(93916002)(86362001)(87936001)(87286001)(89996001)(88136002)(48376002)(84676001)(85426001)(110136001)(2351001)(4396001)(95666004)(107046002)(36756003)(229853001)(46102003)(50226001)(106466001)(105606002)(97736003)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR0301MB1259; H:tx30smr01.am.freescale.net; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1259; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:CY1PR0301MB1259; X-Forefront-PRVS: 0401647B7F X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:CY1PR0301MB1259; X-OriginatorOrg: freescale.com Cc: alsa-devel@alsa-project.org, lars@metafoo.de, tiwai@suse.de, linux-kernel@vger.kernel.org, patches@opensource.wolfsonmicro.com, lgirdwood@gmail.com, Li.Xiubo@freescale.com, Zidan Wang , ckeepax@opensource.wolfsonmicro.com Subject: [alsa-devel] [PATCH v2 2/2] ASoC: wm8960: LRCM operation should after software reset 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP When shared_lrclk is set, LRCM will be enabled. But the following software reset in wm8960_probe will reset it to the default state. So LRCM operation should after software reset. Signed-off-by: Zidan Wang Acked-by: Charles Keepax --- sound/soc/codecs/wm8960.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index e5d89a2..a7f60b7 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c @@ -976,6 +976,14 @@ static int wm8960_probe(struct snd_soc_codec *codec) return ret; } + if (pdata->shared_lrclk) { + ret = snd_soc_update_bits(codec, WM8960_ADDCTL2, 0x4, 0x4); + if (ret < 0) { + dev_err(codec->dev, "Failed to enable LRCM: %d\n", ret); + return ret; + } + } + wm8960->set_bias_level(codec, SND_SOC_BIAS_STANDBY); /* Latch the update bits */ @@ -1059,16 +1067,6 @@ static int wm8960_i2c_probe(struct i2c_client *i2c, else if (i2c->dev.of_node) wm8960_set_pdata_from_of(i2c, &wm8960->pdata); - if (pdata && pdata->shared_lrclk) { - ret = regmap_update_bits(wm8960->regmap, WM8960_ADDCTL2, - 0x4, 0x4); - if (ret != 0) { - dev_err(&i2c->dev, "Failed to enable LRCM: %d\n", - ret); - return ret; - } - } - i2c_set_clientdata(i2c, wm8960); ret = snd_soc_register_codec(&i2c->dev,