From patchwork Thu Aug 2 15:03:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 143349 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2277086ljj; Thu, 2 Aug 2018 08:06:01 -0700 (PDT) X-Google-Smtp-Source: AAOMgpevrZ+ijZxmhU7JMD6bu7QsiU5Qc+CsdWVFSJUZcNorsnpzPUxzPkVP6mjeYsENz1TuLiNd X-Received: by 2002:a63:115e:: with SMTP id 30-v6mr3240370pgr.53.1533222361047; Thu, 02 Aug 2018 08:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533222361; cv=none; d=google.com; s=arc-20160816; b=H2XqWomLZq5x6szmSEl6MFxFDo0JXpTnTyVx1/iKsmuxQuiIoR0KugiWxaz5mnarpV fYHFgFdiO58o2vJqThzIiz3FdGfjxvxkoOh+oLox2dWrsQ+w2UwZP4UAb0bFcoPS1N/q hGUHugJAzMcgx6sUObGaLjAYgiey69cXOoK6VOImq/UvtFy0BUjWZ6UJU10wyHfwyCtk NlpqfBgOJHVj0FxxiyO5+WUsUm/W9DIfVByVHQIai90Ig/E7Jkfkp5J4Qai9h1R2kp6+ haluLq2FAr3tSvo8IPCJS3lOX1KNRrFNOPjA5Z5sxxnujMROWMwCKvBSQQPcgBtf3Xor P5aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=lsiz5N5rWCk8QDHzn/s6pltCN2LXL/Z1fx+4l7XaxPI=; b=tvQ+TfTet2vIjejHuX/jIvW1mBKg9Ggfu/jQy2+IFKwMtnkbWokPyMWsyn2cWOJDES bT+Q5ODmUJgt0UWqMxpECt2HO8+ufpj0x+pqqOjius9fKTbpSaQ9TDeCBajVh4Z4Ir5f 1dWT52bAvke4USDJ2znfzsvEvnk6IPnbucoPzfF79JNoamwcxoac8vJVL15d+OKec3Yt zotKtJIf7Hz61kr8RY6v+XkRI1me1mKVqWBKEi8UvP1Mpul+KMIECVls5GI1mbwpBlda TGW1hSPBIpaMR1hV7b/ZfL22P/04GJyXO/4b37qPun7TE0sgUWJ5Iv388OhOteQZLmBT 6kYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="P/zGrPpP"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c4-v6si2147308pfd.344.2018.08.02.08.05.58; Thu, 02 Aug 2018 08:06:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="P/zGrPpP"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732608AbeHBQ5a (ORCPT + 31 others); Thu, 2 Aug 2018 12:57:30 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36729 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732530AbeHBQ53 (ORCPT ); Thu, 2 Aug 2018 12:57:29 -0400 Received: by mail-wm0-f68.google.com with SMTP id w24-v6so2948860wmc.1 for ; Thu, 02 Aug 2018 08:05:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lsiz5N5rWCk8QDHzn/s6pltCN2LXL/Z1fx+4l7XaxPI=; b=P/zGrPpPpmqpTFPVTBM/mSy7EZXT43pljUdD2jqgxjmhfsSSPowp2RpRUzKIXAyG75 +UGOKpLyQv8Ytx/EAebr5snN/Zw6s3w+cANGsQuk2zMuZPigMKaBGas238loB0W3gJDP 5X2pdTDMHU2edAmfD6VeC7pavKT61hGgCwot4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lsiz5N5rWCk8QDHzn/s6pltCN2LXL/Z1fx+4l7XaxPI=; b=NK7Aw8zKfix6NoMaNWBLB0aMbWHdWDFYPUIV4xekwgk2vGU2rMuVgWzVlnIpT9YSs3 jiNgQbZ21WLMBzxZi6I+shkuRrUV5gMvAvdiLdBY/2lG6PzBXC2n2jtap5mk85PFPWvu RRWXzueDwOo7H1SK42Tvo6cZh32QzHYYMaExvBuPsEZuJoexX5LR0CntiBMoTrwOxRWS JVs9Bdw1q0RzJSp1Z7X+RL9ZWrluC36qWiLBTS58z4Tn0MzOSV7bRgZ5kqitRs6gJ5Pa qf7Xc89mVEUCwjrCV85UfKez8WcryzhACnKp9SYz41cGWJi8pUo+YsCUuOvEphl+QaH1 a1WQ== X-Gm-Message-State: AOUpUlFOV09AJ6y++fumjtUJaqYudIqZJ5KSAZcMPV7iXx+7TNitl3mi ScxSPBZV4MY7lf0aFGQvU0HfeQ== X-Received: by 2002:a1c:5b09:: with SMTP id p9-v6mr2486680wmb.0.1533222353634; Thu, 02 Aug 2018 08:05:53 -0700 (PDT) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id b126-v6sm2497517wmf.41.2018.08.02.08.05.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Aug 2018 08:05:53 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, lgirdwood@gmail.com, alsa-devel@alsa-project.org Cc: perex@perex.cz, tiwai@suse.com, vkoul@kernel.org, linux-kernel@vger.kernel.org, rohitkr@codeaurora.org, bgoswami@codeaurora.org, stefan.wahren@i2se.com, guillaume.tucker@collabora.com, Srinivas Kandagatla Subject: [PATCH 1/3] ASoC: apq8096: remove auto rebinding Date: Thu, 2 Aug 2018 16:03:36 +0100 Message-Id: <20180802150338.24538-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180802150338.24538-1-srinivas.kandagatla@linaro.org> References: <20180802150338.24538-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove auto rebinding support, as component framework can deadlock in few usecases if we are trying to add new/remove component within a bind/unbind callbacks. Card rebinding is ASoC core feature so all the previous component framework stuff in q6dsp remains removed. Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/apq8096.c | 2 -- 1 file changed, 2 deletions(-) -- 2.16.2 diff --git a/sound/soc/qcom/apq8096.c b/sound/soc/qcom/apq8096.c index 1e4a90d59228..6ee7e66cbaaa 100644 --- a/sound/soc/qcom/apq8096.c +++ b/sound/soc/qcom/apq8096.c @@ -48,7 +48,6 @@ static int apq8096_platform_probe(struct platform_device *pdev) return -ENOMEM; card->dev = dev; - card->auto_bind = true; dev_set_drvdata(dev, card); ret = qcom_snd_parse_of(card); if (ret) { @@ -74,7 +73,6 @@ static int apq8096_platform_remove(struct platform_device *pdev) { struct snd_soc_card *card = dev_get_drvdata(&pdev->dev); - card->auto_bind = false; snd_soc_unregister_card(card); kfree(card->dai_link); kfree(card); From patchwork Thu Aug 2 15:03:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 143350 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2277139ljj; Thu, 2 Aug 2018 08:06:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe8kL13toS0nIidtWr6v3eCPxJoqKYSkDMcoO3UKLb1C04n7DIiEezrOZC+0/MvbD5IwFLg X-Received: by 2002:a65:5c83:: with SMTP id a3-v6mr3246552pgt.164.1533222363225; Thu, 02 Aug 2018 08:06:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533222363; cv=none; d=google.com; s=arc-20160816; b=cZM4JUeNTwy2AAaIABpO1qDx545P1S6UtdT2tqr2Sc+ALwe1cruWX2vvDpu16DVoKX bsuYOTtEbbWmyY92eRGujBPbNKkyQpuH9iQ9r/QEZDBVdom+gpqBcgs+Wz0RyCYMXqrW qqXnkUAgfZTNPQ1ee01nUHjC49SO0WlB2mvm3KzdZ/jBgMNyglfzgfAQ9qwQKr0LcBmh eoS5AS+ASZpgXoCr1/W6ba2c0tAsYhR99M3EPge5XshaEV77agj57TYk//UgREEAToma OtJifjy0aQLogW9BOKhg9BZZBbIahJfBrYj13FQt66zb8TLyfpvpXIWg6//MBkQWjHzN yzqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=O2VBaKsaHVm856s9KjJ2JKojEQQJw+58cO+gZJ+RQTQ=; b=T3gh69LzdjGcLjwU4W/Y7C2WW1MwyJB0ck5/emyHMj8fYtj3mVi5AGsrZ8V2lwCASO EST8Dd9QwxTDnx7yFAL3vjKKfOgxVA+MTivrLlAZnA4zmJgUzVtSP/wMY9tU5m30Jtdd S9Lh16HfLbKP6icLf4neRVqHADIeCHtX7nx2mACYebMUS4smqr6+gxkfzUwghJ9GPIJ8 bFiGNRVFD145zEd/ssSTSBEwJZTsDZ3nW9HPC2tc6IuMz8938aduBObpIZDJo4tH2l6p iN5bAAimL/MKjTI4Drue0hEeqLpAqIhaXzit6ZZ7TKLww+HkvhbACprsLfGHJo+VmF0R I6rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N3sSoeZu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c4-v6si2147308pfd.344.2018.08.02.08.06.01; Thu, 02 Aug 2018 08:06:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N3sSoeZu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732628AbeHBQ5c (ORCPT + 31 others); Thu, 2 Aug 2018 12:57:32 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36729 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732426AbeHBQ5b (ORCPT ); Thu, 2 Aug 2018 12:57:31 -0400 Received: by mail-wm0-f66.google.com with SMTP id w24-v6so2948933wmc.1 for ; Thu, 02 Aug 2018 08:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=O2VBaKsaHVm856s9KjJ2JKojEQQJw+58cO+gZJ+RQTQ=; b=N3sSoeZu2e2XG3SgfC1QjkyZnH4vL0XZ5Q0mhzwqyCjhQempVcGMoxMSS04BRxyAZZ ppcenCMA72PbjoActe1U1139sBiRiH1XV7SQfGf6xW9Xo0YMvkwP4NzHpNBzBgxZSsKE LpEsL5IqVrACyWoDFUJ36lEXSVclUu6hnB4SE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=O2VBaKsaHVm856s9KjJ2JKojEQQJw+58cO+gZJ+RQTQ=; b=FvR794yRmXoksm7rWw2/hGTnfQcrMlqgR4mk2gqNf8zL63HV51mqPhgwUvERAlAKCt ojH/MwnBDtdiQ9hgWaL13Sg3WM+TXx1a5KJK1Rs/7ajffyAWzQrEq01lvS23FboMRanZ j5f1qazNi5TZxcuAbjBtNbru2q1gphi/YBTlTYyLQt0yRNMl1tTvxTf5POKMuic8BlHT 2YOpdsEyhSCnmumZDd3Re3VuaCGVFhrQJ2P35LaWsWtgiPr76WUw05PqZfHl6gMKBe8/ gFIboL1WnwB3PvGeUQY1BKVTyzKgZ7/mas06zxOHom1RA9ZNCZoLvsnkYVozZQ2bV0LH +BGA== X-Gm-Message-State: AOUpUlHvFO+DphWAAyUz9Q94Rf09IoWAcwyOEsqKDT9k97avY5QfRDs8 KC+zFDVd3Ggj6C4190Iyvw2CiA== X-Received: by 2002:a1c:1182:: with SMTP id 124-v6mr2260730wmr.75.1533222354706; Thu, 02 Aug 2018 08:05:54 -0700 (PDT) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id b126-v6sm2497517wmf.41.2018.08.02.08.05.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Aug 2018 08:05:54 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, lgirdwood@gmail.com, alsa-devel@alsa-project.org Cc: perex@perex.cz, tiwai@suse.com, vkoul@kernel.org, linux-kernel@vger.kernel.org, rohitkr@codeaurora.org, bgoswami@codeaurora.org, stefan.wahren@i2se.com, guillaume.tucker@collabora.com, Srinivas Kandagatla Subject: [PATCH 2/3] ASoC: smd845: remove auto rebinding Date: Thu, 2 Aug 2018 16:03:37 +0100 Message-Id: <20180802150338.24538-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180802150338.24538-1-srinivas.kandagatla@linaro.org> References: <20180802150338.24538-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove auto rebinding support, as component framework can deadlock in few usecases if we are trying to add new/remove component within a bind/unbind callbacks. Card rebinding is ASoC core feature so all the previous component framework stuff in q6dsp remains removed. Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/sdm845.c | 2 -- 1 file changed, 2 deletions(-) -- 2.16.2 diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c index bf4ec4646906..be0cb1122036 100644 --- a/sound/soc/qcom/sdm845.c +++ b/sound/soc/qcom/sdm845.c @@ -226,7 +226,6 @@ static int sdm845_snd_platform_probe(struct platform_device *pdev) return -ENOMEM; card->dev = dev; - card->auto_bind = true; dev_set_drvdata(dev, card); ret = qcom_snd_parse_of(card); if (ret) { @@ -258,7 +257,6 @@ static int sdm845_snd_platform_remove(struct platform_device *pdev) struct snd_soc_card *card = dev_get_drvdata(&pdev->dev); struct sdm845_snd_data *data = snd_soc_card_get_drvdata(card); - card->auto_bind = false; snd_soc_unregister_card(card); kfree(card->dai_link); kfree(data); From patchwork Thu Aug 2 15:03:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 143351 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2277214ljj; Thu, 2 Aug 2018 08:06:05 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeATVCb7zoEXk7v8YH7CGYeKV0XEkFqNf5x06gIdiIhTv6XIa+M0F2fo34iybz5UJWcLc/9 X-Received: by 2002:a63:1844:: with SMTP id 4-v6mr3222146pgy.313.1533222365519; Thu, 02 Aug 2018 08:06:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533222365; cv=none; d=google.com; s=arc-20160816; b=EgbJElEY6D9upQsOuYebrGxqCZjxhKTb2Ta1wXEYw6TFNSKO3eVA+Iq1KRYK4q0BV6 M3YiJvVJQg0VrZyv+HZ6vCjQL/8wEI3WbgHFA/+ukMAkvqgpLFxnv/pMpeMfTB52mxR+ a98edrzV2xN6qg8nmtsJpGGgjU7CzUGjsq08XE7/INU7auFJr4UIjMnkbogi4JBi7KA+ 6A4kmANW3c8C79wu6TM/J0p2jjl/AXM0CDChMrZ4fywwQn+gF43OiaXYtimzl1yQYZF3 pz9DfvMm7j/vNUwKMNG5R8UnQdwWuG4Pf0SH9C7qOWjYwK+DTsfG8PLKeja4JEXDeK0V 9Yqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=ibQFJG3ZrMvqqlB6/pzr09QcDU/5Fh8SilsQgMz4Vqc=; b=o5ED6UsbA4TAeEeGqCZOwx35GYa32o/QLUaZdxvaE/BtZjesBktPHyOndFVDzuWx3r 7BNTJS77nLddEVmFbh6z4Wl5LYoO58kFgvm8OGnCOpxHRRXzyX3oYjbepKyLopBbF3Lr voi2jCE5UCWg625RzOcDteiVYKsrtu7L+kgFphw+pYDJ43TcjaiIudkRkl7E6T6d5cFd WjhgLg9c2fa7XTNu6X5iz9url0HTbFzZQfIsgGJZgThoWLtfITyx/8mUunnENlOBPNk8 zClJsPKm74xUctKh763w97RkhZ1g2SX9DI9kKL+Ydu0Fbb+dgIeBUra+/3dlaHT6SynU X3Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fvZUFENR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c4-v6si2147308pfd.344.2018.08.02.08.06.03; Thu, 02 Aug 2018 08:06:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fvZUFENR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732642AbeHBQ5d (ORCPT + 31 others); Thu, 2 Aug 2018 12:57:33 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:40674 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732612AbeHBQ5c (ORCPT ); Thu, 2 Aug 2018 12:57:32 -0400 Received: by mail-wm0-f68.google.com with SMTP id y9-v6so2956253wma.5 for ; Thu, 02 Aug 2018 08:05:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ibQFJG3ZrMvqqlB6/pzr09QcDU/5Fh8SilsQgMz4Vqc=; b=fvZUFENRpFEdBSBRcFajd5iliwCGG0G9jYp3Tj54PFWZ6sObpcMPqfg6jQNQ8YZqNj HfbC3OfyHngQ9osrySLJ/zhFsL5gOIVZouEq+W+BfKkH/bQ2iivf+0yAB7vKXm2jDoik NDpfaLGe3p2+DNGEE5xgw/c4gkKgDFh1rjqPY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ibQFJG3ZrMvqqlB6/pzr09QcDU/5Fh8SilsQgMz4Vqc=; b=sHHmzPHRz4mHEdQrtg/Mg59OORewPjle79IFH7l8YtrfIatAyMFT1ym7OAbpGTCg4W ROxPhimdbUz19E8ddE9fcnGIb6Oy9/sw2bY9fOBB+pl5TN/ngUDiYkRxGrm3FkVIPnWI UaguoAj/w07qiz9b8t7COQlEHnqZDYYddKqy5DsVa8NfgjM3beluZzgE52aDeu3wgALU sISeD+BdL5NfrUAKqspvu9a1TGbTlGb15C5d4c74XGzHGkjqUBjUgRys3NgegtbRIMnZ kiM6yhIjD0vwYt3zv2/2DHGK1bgsCq3P4HNa+mD6druBN7/kCJMtvddN+BZmCRCd7ZWm fVFw== X-Gm-Message-State: AOUpUlEsRkkshiTyTz1KaFXV3yHwTFnwQ6s0AdOE1C23457v77bSzZY/ O3gYVCmj0SfAiohA/BoeX+6M/A== X-Received: by 2002:a1c:8406:: with SMTP id g6-v6mr2156993wmd.18.1533222355860; Thu, 02 Aug 2018 08:05:55 -0700 (PDT) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id b126-v6sm2497517wmf.41.2018.08.02.08.05.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Aug 2018 08:05:55 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, lgirdwood@gmail.com, alsa-devel@alsa-project.org Cc: perex@perex.cz, tiwai@suse.com, vkoul@kernel.org, linux-kernel@vger.kernel.org, rohitkr@codeaurora.org, bgoswami@codeaurora.org, stefan.wahren@i2se.com, guillaume.tucker@collabora.com, Srinivas Kandagatla Subject: [PATCH 3/3] ASoC: core: remove support for card rebind using component framework Date: Thu, 2 Aug 2018 16:03:38 +0100 Message-Id: <20180802150338.24538-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180802150338.24538-1-srinivas.kandagatla@linaro.org> References: <20180802150338.24538-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DRM based audio components get registered inside the component framework bind callback. However component framework has a big mutex lock taken for every call to component_add, component_del and bind, unbind callbacks. This can lead to deadlock situation if we are trying to add new/remove component within a bind/unbind callbacks. Which is what was happening with bcm2837 rpi 3. Revert this change till we sort out the mutex issue. Reported-by: Guillaume Tucker Reported-by: Stefan Wahren Signed-off-by: Srinivas Kandagatla --- include/sound/soc.h | 7 ------ sound/soc/soc-core.c | 62 ---------------------------------------------------- 2 files changed, 69 deletions(-) -- 2.16.2 diff --git a/include/sound/soc.h b/include/sound/soc.h index ace474e8649e..41cec42fb456 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -1091,12 +1090,6 @@ struct snd_soc_card { struct work_struct deferred_resume_work; - /* component framework related */ - bool components_added; - /* set in machine driver to enable/disable auto re-binding */ - bool auto_bind; - struct component_match *match; - /* lists of probed devices belonging to this card */ struct list_head component_dev_list; diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 81b27923303d..82eb3868be67 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -279,28 +279,11 @@ static inline void snd_soc_debugfs_exit(void) #endif -static int snd_soc_card_comp_compare(struct device *dev, void *data) -{ - struct snd_soc_component *component; - - lockdep_assert_held(&client_mutex); - list_for_each_entry(component, &component_list, list) { - if (dev == component->dev) { - if (!strcmp(component->name, data)) - return 1; - break; - } - } - - return 0; -} - static int snd_soc_rtdcom_add(struct snd_soc_pcm_runtime *rtd, struct snd_soc_component *component) { struct snd_soc_rtdcom_list *rtdcom; struct snd_soc_rtdcom_list *new_rtdcom; - char *cname; for_each_rtdcom(rtd, rtdcom) { /* already connected */ @@ -317,13 +300,6 @@ static int snd_soc_rtdcom_add(struct snd_soc_pcm_runtime *rtd, list_add_tail(&new_rtdcom->list, &rtd->component_list); - if (rtd->card->auto_bind && !rtd->card->components_added) { - cname = devm_kasprintf(rtd->card->dev, GFP_KERNEL, - "%s", component->name); - component_match_add(rtd->card->dev, &rtd->card->match, - snd_soc_card_comp_compare, cname); - } - return 0; } @@ -859,25 +835,6 @@ static bool soc_is_dai_link_bound(struct snd_soc_card *card, return false; } -static int snd_soc_card_comp_bind(struct device *dev) -{ - struct snd_soc_card *card = dev_get_drvdata(dev); - - if (card->instantiated) - return 0; - - return snd_soc_register_card(card); -} - -static void snd_soc_card_comp_unbind(struct device *dev) -{ -} - -static const struct component_master_ops snd_soc_card_comp_ops = { - .bind = snd_soc_card_comp_bind, - .unbind = snd_soc_card_comp_unbind, -}; - static int soc_bind_dai_link(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link) { @@ -2169,12 +2126,6 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card) card->instantiated = 1; snd_soc_dapm_sync(&card->dapm); - if (card->auto_bind && !card->components_added) { - component_master_add_with_match(card->dev, - &snd_soc_card_comp_ops, - card->match); - card->components_added = true; - } mutex_unlock(&card->mutex); mutex_unlock(&client_mutex); @@ -2820,9 +2771,6 @@ int snd_soc_unregister_card(struct snd_soc_card *card) dev_dbg(card->dev, "ASoC: Unregistered card '%s'\n", card->name); } - if (!card->auto_bind && card->components_added) - component_master_del(card->dev, &snd_soc_card_comp_ops); - return 0; } EXPORT_SYMBOL_GPL(snd_soc_unregister_card); @@ -3235,17 +3183,8 @@ int snd_soc_add_component(struct device *dev, snd_soc_component_add(component); - ret = component_add(dev, NULL); - if (ret < 0) { - dev_err(dev, "ASoC: Failed to add Component: %d\n", ret); - goto err_comp; - } - return 0; -err_comp: - soc_remove_component(component); - snd_soc_unregister_dais(component); err_cleanup: snd_soc_component_cleanup(component); err_free: @@ -3293,7 +3232,6 @@ static int __snd_soc_unregister_component(struct device *dev) mutex_unlock(&client_mutex); if (found) { - component_del(dev, NULL); snd_soc_component_cleanup(component); }