From patchwork Tue Apr 17 17:11:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 133563 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp4951430ljb; Tue, 17 Apr 2018 10:11:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/1DS2YjSQ9FK4ulBcKHt/TgWIbZlv7fQS6MS5oTY5Tl8kBdLW71+MTgq4N7KoJgVxxmzxl X-Received: by 10.223.150.7 with SMTP id b7mr2145317wra.129.1523985106149; Tue, 17 Apr 2018 10:11:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523985106; cv=none; d=google.com; s=arc-20160816; b=ljSh2fhDepNJsMkRTigeoc3D/hdKOE2D0bME75oL5FdJ2QcR/rZu3duZXflA1C6Izv 8KVSWBBYDRLv3lf3XU2soGQc/hRdWWgGEGwG+hiZMn2GFHcgXqEF4yn9QfZ/RvPYuV74 OmOg82QAiMFYE8BFc6vrUiDfHVUreWMdKjSViZqRzhSNIKQrn8MajNqOZoZjJc7/6+1p P9dGAw5OItq+9vonJdCvmYhSEJy3vT5L5qUM2oJ0f01VdGsCd2GKJTnHLdzvztgaUFaa pQe/GWFdg3HoY4kbBDEf5wu+/gGDQFFgBjfgoLwDuTCAY6F5srpuZ7XEBTJarHfHa97V UwXg== 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=pdebs2PmSLnRRbUUiwyeO82rGrf3BrxTROfJE2FRzxkjRUJzs2mkVHxjj09YJpjm/2 8rpvMDETBl6iCO0+nIZRuGCV8IIgvJzoOsmRPxsPd3XmG6Pvpqq5GG7KfXz+uyTvqWXu id6CY2SDWSqem46HSj6FubwQzmitL5Ei3IHABQiL4TLbWEH344BW1q226VhFaOkvqH9z d1HMgawoEypml2itKFtwfmu4bt45IweUj9LrAULq1WlgXY7nCQ825EkgR7GVTT7vOsoT P/iLso9Bv+xq4vmhvHxlexsbNOseIlHs+kXmzm06xMVrCtfrabUt0cZZ/PH0TBfzo2wQ J7ZA== 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=DDN4WQ8S; 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 u136si8211056wmf.119.2018.04.17.10.11.45; Tue, 17 Apr 2018 10:11:46 -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=DDN4WQ8S; 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 CF7EC267641; Tue, 17 Apr 2018 19:11:42 +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 993C5267641; Tue, 17 Apr 2018 19:11:40 +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 18296267636 for ; Tue, 17 Apr 2018 19:11:38 +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=DDN4WQ8S1j8T hFqYrEL8ol7E7v9ApdopeAU9r7PA2a2TtPdLt0yqqqYYuEnbAAL8BKXiDr40nc1PW/CSE2kSwyhYu yotVzGn2cbkDVJEFreguH2HKhJB/UgO0zdSWyICHfACD5aYgCkRdshikWXNUevDZ++AyAhTXuXB91 vY4vc=; 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 1f8U8n-0007v2-65; Tue, 17 Apr 2018 17:11:37 +0000 Received: from broonie by debutante with local (Exim 4.90_1) (envelope-from ) id 1f8U8m-0001tO-OK; Tue, 17 Apr 2018 18:11:36 +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:11:36 +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); }