From patchwork Fri Jul 20 09:20:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 1220221 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 4FAFADF24C for ; Fri, 20 Jul 2012 09:41:32 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Ss9di-0006lx-OU; Fri, 20 Jul 2012 09:36:50 +0000 Received: from am1ehsobe004.messaging.microsoft.com ([213.199.154.207] helo=am1outboundpool.messaging.microsoft.com) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Ss9Yj-00066J-Qm for linux-arm-kernel@lists.infradead.org; Fri, 20 Jul 2012 09:31:52 +0000 Received: from mail36-am1-R.bigfish.com (10.3.201.237) by AM1EHSOBE006.bigfish.com (10.3.204.26) with Microsoft SMTP Server id 14.1.225.23; Fri, 20 Jul 2012 09:31:31 +0000 Received: from mail36-am1 (localhost [127.0.0.1]) by mail36-am1-R.bigfish.com (Postfix) with ESMTP id 5D00748035D; Fri, 20 Jul 2012 09:31:31 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 3 X-BigFish: VS3(zzzz1202h1082kzz8275bh8275dhz2dh2a8h668h839hd24he5bhf0ah107ah) Received: from mail36-am1 (localhost.localdomain [127.0.0.1]) by mail36-am1 (MessageSwitch) id 1342776689465384_10026; Fri, 20 Jul 2012 09:31:29 +0000 (UTC) Received: from AM1EHSMHS005.bigfish.com (unknown [10.3.201.240]) by mail36-am1.bigfish.com (Postfix) with ESMTP id 6EE09200047; Fri, 20 Jul 2012 09:31:29 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by AM1EHSMHS005.bigfish.com (10.3.207.105) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 20 Jul 2012 09:31:29 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server (TLS) id 14.2.298.5; Fri, 20 Jul 2012 04:31:27 -0500 Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id q6K9VHUx010017; Fri, 20 Jul 2012 02:31:25 -0700 From: Dong Aisheng To: Subject: [PATCH 3/4] ASoC: sgtl5000: remove unneeded snd_soc_dapm_new_widgets in probe Date: Fri, 20 Jul 2012 17:20:26 +0800 Message-ID: <1342776027-31758-4-git-send-email-b29396@freescale.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1342776027-31758-1-git-send-email-b29396@freescale.com> References: <1342776027-31758-1-git-send-email-b29396@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [213.199.154.207 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: alsa-devel@alsa-project.org, broonie@opensource.wolfsonmicro.com, lrg@ti.com, shawn.guo@freescale.com, w.sang@pengutronix.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Dong Aisheng There's a driver bug that sgtl5000 dapm widget kcontrols do not work. e.g. can not select capture mux with amixer tool(no error info prompted). The root cause is that we still call snd_soc_dapm_new_widgets in codec driver probe function afer converting to table based widgets. This will cause the card dapm widgets are instantiated before the dapm_routes are registered. Then, no available dapm widget pathes can be found during instantiation which finally will cause soc_dapm_mux_update_power to fail(can not find correct path with kcontrol) in snd_soc_dapm_put_enum_double function. Here we remove the unneeded snd_soc_dapm_new_widgets in codec probe and let the soc core to handle the register sequence properly. Then we can fix above issue. Cc: Mark Brown Cc: Liam Girdwood Cc: Wolfram Sang Cc: Shawn Guo Signed-off-by: Dong Aisheng Tested-by: Shawn Guo --- sound/soc/codecs/sgtl5000.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 8af6a52..5c54b6f 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -1357,8 +1357,6 @@ static int sgtl5000_probe(struct snd_soc_codec *codec) if (ret) goto err; - snd_soc_dapm_new_widgets(&codec->dapm); - return 0; err: