From patchwork Tue Apr 17 17:09:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 133555 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp4948821ljb; Tue, 17 Apr 2018 10:09:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+e8MPmqDTWM+kp/du4Eb4Bj/IE3kpD4jD/vlQyjsEyepoyKuyVX+kw0h/tIT1a+j1y0HLN X-Received: by 10.28.55.129 with SMTP id e123mr1533110wma.141.1523984963161; Tue, 17 Apr 2018 10:09:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523984963; cv=none; d=google.com; s=arc-20160816; b=VOkX12oe/YNgIuMveXjE2wtHPs9caIVimFw3lGIpBJH+39k24XtmDdY6d6Oa2tVdq8 SVa9ACDoEcfzXsV2YxsstRcb/+bjMWGuDBP5vZ+QT8zkPPRvgdOo6MUlImqDi69Shs4D kwOxknZsuENOfNKXCYkrmvBfzGsy6pIuMUFBRZeXS/ogpFIR4dVO8OA6BUXMMpMxry9z iL5qmrHyLfeku0WJKMZobLEYM6YIsIycbmWDH/0Q7S9Z/lSS3fOaIB1nHPNnEOzbTD6Y tkCU63PXK2kYLut60nh/iEHVfMkn//rXC7hS/emi6DyfOQ2g/g4DSUcEgfITmFHFf0gP fgJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=uRJe3IkgG6EANk6f669JE+q4WXJqauglhib3YZRPZo8=; b=AzWdJJp6fgRVBjaU53sAEysV05c4x8DdLgFCqCVYvZgou9O0iR5rzk4hTd/KPbN2ix aJ6XJIS4v2jXUKjQCGOTxcZZ+BFG8FIYvcb/A6netuegwsDtksJB3wjp4zUwwmklikHI tebWPs0wCZHjc9BcR9CIIxMpABv1zKV8jVSQMT54iznG0kmZ7TBGWQ57OjvTa6opgXN9 gexQ91WiFUa67/cDQU5rxJ762oPGrmQzEGFphqFb/nFSI5KpPZ1l0ubfrUOEdlLGfVb1 UdUGLH1732z/tpg6+GlgGkwIwX/hfmRrw5ev0eaPv8nYg9SA+HYHhNNp1+/s/TnZ4nTp FqWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=DXknq4+n; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id o80si1190919wrb.45.2018.04.17.10.09.22; Tue, 17 Apr 2018 10:09:23 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=DXknq4+n; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id AC16F2675FC; Tue, 17 Apr 2018 19:09:21 +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 77AF826760E; Tue, 17 Apr 2018 19:09:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id F304E266C99 for ; Tue, 17 Apr 2018 19:09:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=hKfFB99sKtXX1nGC+Zh4ZZLR6NpQdJBd1i9q9HzX/qM=; b=DXknq4+nvZ1l HAOkErM/Z+aP/6jTHkX5LdAZf+olgdXWwvS9pSeBJImSHs51cze0dPVTonvOUplxdWXasBmslR0+x jxbb5hv4Q3JBMJ4G3H9XP8DXmp0fPKlX7VedVr1Xl7k1tw+bTSkhDl8KhPQdeqRrwq4RwxaKphP+E QPhl0=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1f8U6R-0007tT-ID; Tue, 17 Apr 2018 17:09:11 +0000 Received: from broonie by debutante with local (Exim 4.90_1) (envelope-from ) id 1f8U6R-0001ar-0Z; Tue, 17 Apr 2018 18:09:11 +0100 From: Mark Brown To: Liam Girdwood In-Reply-To: <20180327133045.29351-5-liam.r.girdwood@linux.intel.com> Message-Id: Date: Tue, 17 Apr 2018 18:09:11 +0100 Cc: alsa-devel@alsa-project.org, Mark Brown Subject: [alsa-devel] Applied "ASoC: topology: Add callback for DAPM route load/unload" to the asoc tree 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: topology: Add callback for DAPM route load/unload has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 28aa6f7779f77a863a08c1b9db4b654a94c86dd0 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Tue, 27 Mar 2018 14:30:43 +0100 Subject: [PATCH] ASoC: topology: Add callback for DAPM route load/unload Add a callback fro clients for notification about DAPM route loading and unloading. Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown --- include/sound/soc-topology.h | 7 +++++++ sound/soc/soc-topology.c | 13 +++++++++++++ 2 files changed, 20 insertions(+) -- 2.17.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/include/sound/soc-topology.h b/include/sound/soc-topology.h index e1f265e21ee1..401ef2c45d6c 100644 --- a/include/sound/soc-topology.h +++ b/include/sound/soc-topology.h @@ -32,6 +32,7 @@ struct snd_kcontrol_new; struct snd_soc_dai_link; struct snd_soc_dai_driver; struct snd_soc_dai; +struct snd_soc_dapm_route; /* object scan be loaded and unloaded in groups with identfying indexes */ #define SND_SOC_TPLG_INDEX_ALL 0 /* ID that matches all FW objects */ @@ -116,6 +117,12 @@ struct snd_soc_tplg_ops { int (*control_unload)(struct snd_soc_component *, struct snd_soc_dobj *); + /* DAPM graph route element loading and unloading */ + int (*dapm_route_load)(struct snd_soc_component *, int index, + struct snd_soc_dapm_route *route); + int (*dapm_route_unload)(struct snd_soc_component *, + struct snd_soc_dobj *); + /* external widget init - used for any driver specific init */ int (*widget_load)(struct snd_soc_component *, int index, struct snd_soc_dapm_widget *, diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 028bcaa0eda5..b9370ae31907 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -1161,6 +1161,17 @@ static int soc_tplg_kcontrol_elems_load(struct soc_tplg *tplg, return 0; } +/* optionally pass new dynamic kcontrol to component driver. */ +static int soc_tplg_add_route(struct soc_tplg *tplg, + struct snd_soc_dapm_route *route) +{ + if (tplg->comp && tplg->ops && tplg->ops->dapm_route_load) + return tplg->ops->dapm_route_load(tplg->comp, tplg->index, + route); + + return 0; +} + static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg, struct snd_soc_tplg_hdr *hdr) { @@ -1209,6 +1220,8 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg, else route.control = elem->control; + soc_tplg_add_route(tplg, &route); + /* add route, but keep going if some fail */ snd_soc_dapm_add_routes(dapm, &route, 1); }