From patchwork Fri Jul 3 08:30:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shengjiu Wang X-Patchwork-Id: 6713431 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 72DDC9F40A for ; Fri, 3 Jul 2015 08:31:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8BFF8206CB for ; Fri, 3 Jul 2015 08:31:24 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 4A02E20439 for ; Fri, 3 Jul 2015 08:31:23 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id A179B260595; Fri, 3 Jul 2015 10:31:21 +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 1E18D260484; Fri, 3 Jul 2015 10:31:14 +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 28067260527; Fri, 3 Jul 2015 10:31:12 +0200 (CEST) Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0112.outbound.protection.outlook.com [65.55.169.112]) by alsa0.perex.cz (Postfix) with ESMTP id 83B3D260476 for ; Fri, 3 Jul 2015 10:31:04 +0200 (CEST) Received: from BLUPR0301CA0018.namprd03.prod.outlook.com (10.162.113.156) by CH1PR03MB611.namprd03.prod.outlook.com (10.255.156.167) with Microsoft SMTP Server (TLS) id 15.1.201.16; Fri, 3 Jul 2015 08:31:03 +0000 Received: from BL2FFO11FD025.protection.gbl (2a01:111:f400:7c09::192) by BLUPR0301CA0018.outlook.office365.com (2a01:111:e400:5259::28) with Microsoft SMTP Server (TLS) id 15.1.207.19 via Frontend Transport; Fri, 3 Jul 2015 08:31:02 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; alsa-project.org; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11FD025.mail.protection.outlook.com (10.173.161.104) with Microsoft SMTP Server (TLS) id 15.1.201.10 via Frontend Transport; Fri, 3 Jul 2015 08:31:02 +0000 Received: from audiosh1.ap.freescale.net (audiosh1.ap.freescale.net [10.192.241.212]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t638UvKv017152; Fri, 3 Jul 2015 01:30:58 -0700 From: Shengjiu Wang To: , , , , Date: Fri, 3 Jul 2015 16:30:30 +0800 Message-ID: <127af50a5e5f16ff9c98dbe6da04a55a58d72f44.1435912028.git.shengjiu.wang@freescale.com> X-Mailer: git-send-email 1.7.9.5 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD025; 1:82R0If8EPoXQFyHQoBpaIFRHbnhNOQkxaRfgv2m69MTq8q2+iPY9L3+uFrxAzA4voJwHhUoEiolhhc3ahNwvAz2heUdySAJ8L8FCd45oM0BOB4j3TxX86efdzg+B70GM5ajh0b5H3lnD4BLYxJc6j/+H0NakglA89rKZazehmPJUlfmP+57fwINrFRJvV56uITvL62nHv973fEp1lajPJKyI4b195VmbdIY6RkiH/ScQEe9K97VtXjMVQB4YFJRytpNVRALrfelzbFaIBvAjJCDbH/HLRX3he56nl1RPAKlhqrzdyVRpPpd8fSpPOmiv X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(339900001)(189002)(199003)(19580395003)(104016003)(106466001)(92566002)(229853001)(19580405001)(50466002)(77096005)(50226001)(33646002)(48376002)(62966003)(5001770100001)(105606002)(46102003)(87936001)(77156002)(2201001)(575784001)(47776003)(5001960100002)(189998001)(85426001)(118296001)(50986999)(86362001)(36756003)(6806004); DIR:OUT; SFP:1102; SCL:1; SRVR:CH1PR03MB611; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; CH1PR03MB611; 2:RCqcglxvFkKoIKoQiuhW/w4w1swaX2XJx/mX4We7rzN78avLgwGLsMjA7KZWsyYL; 3:D3sUb+0ckg8QCXlLOqaoI1KZFJQRrzhNd64YmK5KkrBcXwe3FHmCM2Bhck04cVxzUbrqZW+OO2VgQssWCwbUBCb329R/S8KXSpyQYl3W+/D5YDl1X/DyVaxCQBES1NfhegXkw9t2fhQjEl2ZZjT7BJoal4uYUJ98a2YCXtYa+b3ptNkE2VYdMnXBG6Ts1TS5eD+dNuuJvkVyU5iTO5Ei4bwLS6FqRFz7mjH6iWg8bbU=; 25:wvnVLVha7VAT6495lM4ELk5nTNF/QIV2Osh1X3N8uhHPKXrUkRdxhY+eBID6CzqFXu7ct4mQ3qbnviW+pQaSVixsHR60L1Qg4IL2afpQl1XrYPVsjS7pZiU0qcD1/ma1YeIuRMYTmHmtRahsbXhQPzCYJlsIo//XrO7+i6iBOIZr0xQJFsGL3UFt0rZhn5TYvh90aeeDG8qMZut9mG7OB/L2j1VlaZBHyiB+mLx/7QIa1l7dZJ8lKEA3vt/SIX/RHV4Tf/g5Ufv9uyUFv9yPuw==; 20:wfuJIxQS1QQbu/XsBhy4UYrrhkgkB7NywX9tMFZmlI5I0UpBEt0Tzseqzu0VZDgH1xYF2i+cM3Ren1zBdYvoRv/K12wzRlw67b0d8HJOv9OO68Xn/U5hDv8KGY54iakxg7uHKUkNWvMkMJGcs2AlwfDBna2cvBt6HwCJfvSV9yceOzQIjbsUrra0XUaHgBMuiMjfDdwM+zWx+iguJ2afznGGSXlUDpDkmaZWazbbsyiKFB/PTPiClGh91mbOTHcAeEyFm6tgbzlb8iqXKpFfnvSbQozW9qo+Aink0ZgG+OMsGwV2S5UPsdGqROhZmPRmwhiKDhW204TrtvirLeKgmXrGN8X0Mnuq5No6r/SHyKo= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CH1PR03MB611; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:CH1PR03MB611; BCL:0; PCL:0; RULEID:; SRVR:CH1PR03MB611; X-Microsoft-Exchange-Diagnostics: 1; CH1PR03MB611; 4:79HULLquUZfWQ1XF4ftIstHJXjSJcdwr0tOAAHWNwSLzwdtzNi6FOQR9+2yF4/LSw0oifJhcut5oRXMuWPrfihnwND/wVj52bMgMMRLuo/shPu/4tdFGSJ7wAXZv1+aU2AZ3T7GTQHx+vgyKl6YNBpw33be18lWeLS8OyNcKQ0Ne6i2/8VZ1mWvrkem9cpo44Y0qIsdWR6dD3gtnRX/5/GSIFtQLwtwlRgCzPr/QHsp5yeqHvrqDf2G+J/bI5uAacUV5T8/wNOaRzZyc62ONwFoiLri7gtB5GaXXg8SA9fo= X-Forefront-PRVS: 0626C21B10 X-Microsoft-Exchange-Diagnostics: 1; CH1PR03MB611; 23:TOKgIs1hXf5PYcDkjDknl1ZFfel5YfWDuWK0g2GTs4PbykFhOBsyHCWLss2ObnvMeBaV7xBJKDI+hVzcO4frS8zQRxcZ0X/na6+iAfEfunOjfuQnRaZvzplNM26M2kRplUv47nKq8i4L5acdeUOdeG89NdglgX09N7n94XsHUYz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nw61fg96cCnD6diHsyjaMPD3UcRJBlyaOPiwg== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2015 08:31:02.1043 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH1PR03MB611 Cc: alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH V2] ASoC: core: Don't probe the component which is dummy 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 Dummy dai can be used by multiple sound card. But it only belong to one card's dapm list. If another card use it, there will be dapm_assert_locked warning. [ 20.015782] WARNING: CPU: 1 PID: 661 at sound/soc/soc-dapm.c:124 dapm_assert_locked.isra.36+0x4c/0x58() [ 20.025249] Modules linked in: [ 20.028349] CPU: 1 PID: 661 Comm: aplay Not tainted 4.1.0-rc6-next-20150605-00004-gaee05d8-dirty #92 [ 20.037528] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 20.044110] Backtrace: [ 20.046614] [<80012e00>] (dump_backtrace) from [<80012fa0>] (show_stack+0x18/0x1c) [ 20.054229] r6:809e8060 r5:00000000 r4:00000000 r3:00000000 [ 20.060002] [<80012f88>] (show_stack) from [<807a0f74>] (dump_stack+0x80/0x9c) [ 20.067293] [<807a0ef4>] (dump_stack) from [<8002b144>] (warn_slowpath_common+0x7c/0xb4) [ 20.075427] r5:0000007c r4:00000000 [ 20.079065] [<8002b0c8>] (warn_slowpath_common) from [<8002b1a0>] (warn_slowpath_null+0x24/0x2c) [ 20.087898] r8:00000001 r7:88007c28 r6:ed94a680 r5:809e83e4 r4:ed83d6c0 [ 20.094747] [<8002b17c>] (warn_slowpath_null) from [<8058403c>] (dapm_assert_locked.isra.36+0x4c/0x58) [ 20.104101] [<80583ff0>] (dapm_assert_locked.isra.36) from [<805842ec>] (dapm_mark_dirty+0x64/0xa4) [ 20.113165] [<80584288>] (dapm_mark_dirty) from [<805853a8>] (soc_dapm_dai_stream_event.isra.42+0x30/0xc8) [ 20.122863] r8:ed9b5dbc r7:00000000 r6:00000001 r5:00000001 r4:ed83d6c0 [ 20.129706] [<80585378>] (soc_dapm_dai_stream_event.isra.42) from [<80587e28>] (snd_soc_dapm_stream_event+0x78/0xa0) [ 20.140264] r5:ee2ee62c r4:00000001 [ 20.143918] [<80587db0>] (snd_soc_dapm_stream_event) from [<8058957c>] (soc_pcm_prepare+0x138/0x21c) [ 20.153058] r8:ed8d9480 r7:00000000 r6:ed9b0e00 r5:00000001 r4:ee2ee62c r3:00000000 ... This patch is to not probe the dummy component in soc_probe_component. Then there is no widget created for dummy DAI, and also don't need to check the dummy dai in dapm_connect_dai_link_widgets(). Signed-off-by: Shengjiu Wang --- changes in v2 - don't probe the component which is dummy - remove the dummy check in dapm_connect_dai_link_widgets(). sound/soc/soc-core.c | 2 +- sound/soc/soc-dapm.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 3a4a5c0..6ce6217 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1102,7 +1102,7 @@ static int soc_probe_component(struct snd_soc_card *card, struct snd_soc_dai *dai; int ret; - if (component->probed) + if (!strcmp(component->name, "snd-soc-dummy") || component->probed) return 0; component->card = card; diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index aa327c9..37ab6b9 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3820,11 +3820,6 @@ static void dapm_connect_dai_link_widgets(struct snd_soc_card *card, for (i = 0; i < rtd->num_codecs; i++) { struct snd_soc_dai *codec_dai = rtd->codec_dais[i]; - /* there is no point in connecting BE DAI links with dummies */ - if (snd_soc_dai_is_dummy(codec_dai) || - snd_soc_dai_is_dummy(cpu_dai)) - continue; - /* connect BE DAI playback if widgets are valid */ if (codec_dai->playback_widget && cpu_dai->playback_widget) { source = cpu_dai->playback_widget;