From patchwork Mon Jun 18 12:00:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 138917 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp3869594lji; Mon, 18 Jun 2018 05:04:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKnTioXD1E82JFm7u0wHOIkaD+IF9IkQNaxm4O849WMtmzmvX5/ybcH0xwaKIsvBhCQ71jA X-Received: by 2002:adf:9561:: with SMTP id 88-v6mr9666553wrs.223.1529323462725; Mon, 18 Jun 2018 05:04:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529323462; cv=none; d=google.com; s=arc-20160816; b=AmRpovk/497pyP6NHnIqx47Vh65Sr+43CsR/I8PcKubjpwvCZ4gKPIyUlxzwUTouwC lULC82LGx1O0+d51kd3Y2TSqnW6Bll3nmqDRtwMcKr6gbCyqxbORtPb+CRA8jvhbhGri Ei2e4byjT3OUWEOqvTLXXRIdVcsrxVJcjMG8uHOFBJfQpg44f6UEHgmjmrvobEku/63T zTxCCUDV0i1f51/KFu82IKlVVmD6tFegxUxxnkZMo/Y0TRE51g8qQn9iddWtuHuAxB3B QRQTk3zP7UhMpI1KYTC5LQGoi5igkQngngK7hAPQjVtxjvIMzN83RPswXeuF3kMJBJhH M7aw== 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=xazt1UUAK/aKM899/qhwL2ceTSs+LDWxWDFOkRQe2B4=; b=kG4t12tEmhxvOsEK9I+8CXQfZbUoztkfgRRDYBXky7ZgpUZt2CX+FwZDwJ3mnZlod2 C6HFl3xBD0K+P6lGP/E+Se2nT5GxOeK2RzNspU1yorNo+z6hKymW6or8wM5rL2EzwPqO ktjj2YAYOAOd6yCXxbqJbjS/LgNXNNsNmJwCvOIXeaB4jknQwHkmP9MQVUZ50CtbUxHF zaHhAVlw6VSJf2XWQXQnuYBo9/BEbsHqFbeW69lQCnXja0XzkOD7O5jqmM9/phA22gh7 wLzzQOcTgoYwqtiLFNE/qmRaWtbi6GCSE9eAwoFwN+dsJ754ryfBd0zhQQXzB7O43KA9 UZHA== 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=v20yWItL; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id e20-v6si13433370wrg.246.2018.06.18.05.04.22; Mon, 18 Jun 2018 05:04:22 -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=v20yWItL; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9A4122677A2; Mon, 18 Jun 2018 14:01:13 +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 3D78E26779B; Mon, 18 Jun 2018 14:01:09 +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 0B320267707 for ; Mon, 18 Jun 2018 14:00:52 +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=avvG0f9W7ioDAC7YqVwfEFzwGWEBY2BHJCyrxKQAlHs=; b=v20yWItL100a 5+FX2Uyl+YoZjbzvq2tm2xShEFWTZkufqh0aKQd8Sar/chxWFTm+z1vdK9AOWRpG8/ymE67D514/y zEQxduYux4LMt2V68qrxxMMm4vtU098Fdc9Snv9wTpfwsswWTssrRh3CHH0fXCLqSLDmccbZvBnPz Kq+n8=; 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 1fUsq2-00080c-Nh; Mon, 18 Jun 2018 12:00:50 +0000 Received: from broonie by debutante with local (Exim 4.91) (envelope-from ) id 1fUsq2-0000S5-AU; Mon, 18 Jun 2018 13:00:50 +0100 From: Mark Brown To: Liam Girdwood In-Reply-To: <20180327133045.29351-5-liam.r.girdwood@linux.intel.com> Message-Id: Date: Mon, 18 Jun 2018 13:00:50 +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 503e79b793fea5de626db73accf8e8994bc4289d Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Thu, 14 Jun 2018 20:53:59 +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.1 _______________________________________________ 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 9b33260fd537..05d177d689e2 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -1105,6 +1105,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) { @@ -1153,6 +1164,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); }