From patchwork Thu Sep 21 10:02:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Henderson X-Patchwork-Id: 9963653 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CFE826020C for ; Thu, 21 Sep 2017 10:02:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBFDD287B3 for ; Thu, 21 Sep 2017 10:02:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B08C52888A; Thu, 21 Sep 2017 10:02:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RDNS_NONE autolearn=no version=3.3.1 Received: from alsa0.perex.cz (unknown [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0936287B3 for ; Thu, 21 Sep 2017 10:02:30 +0000 (UTC) Received: from alsa.alsa-project.org (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A66992675B8; Thu, 21 Sep 2017 12:02:27 +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 C49CF2675BD; Thu, 21 Sep 2017 12:02:08 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by alsa0.perex.cz (Postfix) with ESMTP id 631602675AC for ; Thu, 21 Sep 2017 12:02:05 +0200 (CEST) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v8L9xRMu014344; Thu, 21 Sep 2017 05:02:04 -0500 Authentication-Results: ppops.net; spf=none smtp.mailfrom=stuarth@opensource.cirrus.com Received: from mail1.cirrus.com (mail1.cirrus.com [141.131.3.20]) by mx0a-001ae601.pphosted.com with ESMTP id 2d11c1k9ek-1; Thu, 21 Sep 2017 05:02:04 -0500 Received: from EX17.ad.cirrus.com (unknown [172.20.9.81]) by mail1.cirrus.com (Postfix) with ESMTP id BC9626121AD0; Thu, 21 Sep 2017 05:02:03 -0500 (CDT) Received: from imbe.wolfsonmicro.main (198.61.95.81) by EX17.ad.cirrus.com (172.20.9.81) with Microsoft SMTP Server id 14.3.301.0; Thu, 21 Sep 2017 11:02:03 +0100 Received: from edi-sw-dsktp002.ad.cirrus.com (edi-sw-dsktp002.ad.cirrus.com [198.90.223.26]) by imbe.wolfsonmicro.main (8.14.4/8.14.4) with ESMTP id v8LA22tm015784; Thu, 21 Sep 2017 11:02:02 +0100 From: Stuart Henderson To: , , Date: Thu, 21 Sep 2017 11:02:12 +0100 Message-ID: <1505988132-9511-1-git-send-email-stuarth@opensource.cirrus.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709210137 Cc: Stuart Henderson Subject: [alsa-devel] [PATCH] ASoC: dapm: Make snd_soc_dapm_add/del_routes use runtime mutex subclass 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 Make snd_soc_dapm_add_routes and snd_soc_dapm_del_routes use the SND_SOC_DAPM_CLASS_RUNTIME dapm subclass to allow dynamic dapm route updates. Signed-off-by: Stuart Henderson --- sound/soc/soc-dapm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index dcef67a..e6b6011 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -2884,7 +2884,7 @@ int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm, { int i, r, ret = 0; - mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT); + mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); for (i = 0; i < num; i++) { r = snd_soc_dapm_add_route(dapm, route); if (r < 0) { @@ -2915,7 +2915,7 @@ int snd_soc_dapm_del_routes(struct snd_soc_dapm_context *dapm, { int i; - mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT); + mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); for (i = 0; i < num; i++) { snd_soc_dapm_del_route(dapm, route); route++;