From patchwork Wed Nov 26 11:02:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zidan Wang X-Patchwork-Id: 5384731 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D1F26C11AC for ; Wed, 26 Nov 2014 11:04:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1185E201C7 for ; Wed, 26 Nov 2014 11:04:26 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id A897F201C0 for ; Wed, 26 Nov 2014 11:04:20 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3D8EA265AB3; Wed, 26 Nov 2014 12:04:19 +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, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id D202F265AE7; Wed, 26 Nov 2014 12:03:20 +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 7D4FE265AE7; Wed, 26 Nov 2014 12:03:20 +0100 (CET) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0124.outbound.protection.outlook.com [207.46.100.124]) by alsa0.perex.cz (Postfix) with ESMTP id EF1E1265B55 for ; Wed, 26 Nov 2014 12:01:40 +0100 (CET) Received: from BY2PR03CA002.namprd03.prod.outlook.com (10.255.93.19) by BN3PR0301MB1251.namprd03.prod.outlook.com (25.161.207.27) with Microsoft SMTP Server (TLS) id 15.1.26.15; Wed, 26 Nov 2014 11:01:38 +0000 Received: from BN1AFFO11FD044.protection.gbl (10.255.93.4) by BY2PR03CA002.outlook.office365.com (10.255.93.19) with Microsoft SMTP Server (TLS) id 15.1.26.15 via Frontend Transport; Wed, 26 Nov 2014 11:01:37 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD044.mail.protection.outlook.com (10.58.52.191) with Microsoft SMTP Server (TLS) id 15.1.6.13 via Frontend Transport; Wed, 26 Nov 2014 11:01:36 +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 sAQB1UsH019447; Wed, 26 Nov 2014 04:01:31 -0700 From: Zidan Wang To: Date: Wed, 26 Nov 2014 19:02:20 +0800 Message-ID: <1416999740-21805-1-git-send-email-b50113@freescale.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(84676001)(97736003)(33646002)(110136001)(104016003)(64706001)(19580395003)(62966003)(77156002)(6806004)(44976005)(19580405001)(93916002)(86362001)(92726001)(20776003)(92566001)(89996001)(88136002)(87936001)(87286001)(104166001)(102836001)(105606002)(95666004)(107046002)(106466001)(4396001)(50226001)(21056001)(50986999)(2351001)(229853001)(31966008)(46102003)(50466002)(48376002)(120916001)(99396003)(68736004)(47776003)(36756003)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR0301MB1251; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; 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:BN3PR0301MB1251; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:BN3PR0301MB1251; X-Forefront-PRVS: 04073E895A 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-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:BN3PR0301MB1251; 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] 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 --- sound/soc/codecs/wm8960.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index bc8793cd..21db90c 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c @@ -960,6 +960,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; + } + } + /* Latch the update bits */ snd_soc_update_bits(codec, WM8960_LINVOL, 0x100, 0x100); snd_soc_update_bits(codec, WM8960_RINVOL, 0x100, 0x100); @@ -1030,15 +1038,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);