From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
bjorn.andersson@linaro.org, broonie@kernel.org, robh@kernel.org
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
bgoswami@codeaurora.org, tiwai@suse.de, plai@codeaurora.org,
lgirdwood@gmail.com
Subject: Re: [PATCH v6 18/22] ASoC: qdsp6: audioreach: add topology support
Date: Wed, 15 Sep 2021 11:22:23 -0500 [thread overview]
Message-ID: <bc93c17e-b65d-5885-f151-243d259f40ff@linux.intel.com> (raw)
In-Reply-To: <20210915131333.19047-19-srinivas.kandagatla@linaro.org>
> +static int audioreach_widget_load_buffer(struct snd_soc_component *component,
> + int index, struct snd_soc_dapm_widget *w,
> + struct snd_soc_tplg_dapm_widget *tplg_w)
> +{
> + struct snd_soc_tplg_vendor_array *mod_array;
> + struct audioreach_module *mod;
> + struct snd_soc_dobj *dobj;
> + int ret;
> +
> + ret = audioreach_widget_load_module_common(component, index, w, tplg_w);
> + if (ret)
> + return ret;
> +
> + dobj = &w->dobj;
> + mod = dobj->private;
> +
> + mod_array = audioreach_get_module_array(&tplg_w->priv);
> +
> + switch (mod->module_id) {
> + case MODULE_ID_CODEC_DMA_SINK:
> + case MODULE_ID_CODEC_DMA_SOURCE:
> + audioreach_widget_dma_module_load(mod, mod_array);
> + break;
> + case MODULE_ID_DATA_LOGGING:
> + audioreach_widget_log_module_load(mod, mod_array);
> + break;
> + case MODULE_ID_I2S_SINK:
> + case MODULE_ID_I2S_SOURCE:
> + audioreach_widget_i2s_module_load(mod, mod_array);
> + break;
no default case?
> + }
> +
> + return 0;
> +}
> +
> +int audioreach_tplg_init(struct snd_soc_component *component)
> +{
> + struct device *dev = component->dev;
> + const struct firmware *fw;
> + int ret;
> +
> + ret = request_firmware(&fw, "audioreach.bin", dev);
> + if (ret < 0) {
> + dev_err(dev, "tplg fw audioreach.bin load failed with %d\n", ret);
> + return ret;
> + }
How does this work if you want to change the topology, which will happen
rather frequently if you have a framework precisely to change the DSP
graph? You need to override a file in userspace?
Shouldn't you have a means to identify what topology file you want on a
platform-basis?
Or at the very least a means to change the file name with a kernel
parameter or something.
> +
> + ret = snd_soc_tplg_component_load(component, &audioreach_tplg_ops, fw);
> + if (ret < 0) {
> + dev_err(dev, "tplg component load failed%d\n", ret);
> + ret = -EINVAL;
> + }
> +
> + release_firmware(fw);
> + return ret;
> +}
> +EXPORT_SYMBOL_GPL(audioreach_tplg_init);
>
WARNING: multiple messages have this Message-ID (diff)
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
bjorn.andersson@linaro.org, broonie@kernel.org, robh@kernel.org
Cc: plai@codeaurora.org, tiwai@suse.de, devicetree@vger.kernel.org,
perex@perex.cz, alsa-devel@alsa-project.org, lgirdwood@gmail.com,
bgoswami@codeaurora.org
Subject: Re: [PATCH v6 18/22] ASoC: qdsp6: audioreach: add topology support
Date: Wed, 15 Sep 2021 11:22:23 -0500 [thread overview]
Message-ID: <bc93c17e-b65d-5885-f151-243d259f40ff@linux.intel.com> (raw)
In-Reply-To: <20210915131333.19047-19-srinivas.kandagatla@linaro.org>
> +static int audioreach_widget_load_buffer(struct snd_soc_component *component,
> + int index, struct snd_soc_dapm_widget *w,
> + struct snd_soc_tplg_dapm_widget *tplg_w)
> +{
> + struct snd_soc_tplg_vendor_array *mod_array;
> + struct audioreach_module *mod;
> + struct snd_soc_dobj *dobj;
> + int ret;
> +
> + ret = audioreach_widget_load_module_common(component, index, w, tplg_w);
> + if (ret)
> + return ret;
> +
> + dobj = &w->dobj;
> + mod = dobj->private;
> +
> + mod_array = audioreach_get_module_array(&tplg_w->priv);
> +
> + switch (mod->module_id) {
> + case MODULE_ID_CODEC_DMA_SINK:
> + case MODULE_ID_CODEC_DMA_SOURCE:
> + audioreach_widget_dma_module_load(mod, mod_array);
> + break;
> + case MODULE_ID_DATA_LOGGING:
> + audioreach_widget_log_module_load(mod, mod_array);
> + break;
> + case MODULE_ID_I2S_SINK:
> + case MODULE_ID_I2S_SOURCE:
> + audioreach_widget_i2s_module_load(mod, mod_array);
> + break;
no default case?
> + }
> +
> + return 0;
> +}
> +
> +int audioreach_tplg_init(struct snd_soc_component *component)
> +{
> + struct device *dev = component->dev;
> + const struct firmware *fw;
> + int ret;
> +
> + ret = request_firmware(&fw, "audioreach.bin", dev);
> + if (ret < 0) {
> + dev_err(dev, "tplg fw audioreach.bin load failed with %d\n", ret);
> + return ret;
> + }
How does this work if you want to change the topology, which will happen
rather frequently if you have a framework precisely to change the DSP
graph? You need to override a file in userspace?
Shouldn't you have a means to identify what topology file you want on a
platform-basis?
Or at the very least a means to change the file name with a kernel
parameter or something.
> +
> + ret = snd_soc_tplg_component_load(component, &audioreach_tplg_ops, fw);
> + if (ret < 0) {
> + dev_err(dev, "tplg component load failed%d\n", ret);
> + ret = -EINVAL;
> + }
> +
> + release_firmware(fw);
> + return ret;
> +}
> +EXPORT_SYMBOL_GPL(audioreach_tplg_init);
>
next prev parent reply other threads:[~2021-09-15 16:36 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-15 13:13 [PATCH v6 00/22] ASoC: qcom: Add AudioReach support Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 01/22] soc: dt-bindings: qcom: apr: convert to yaml Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 02/22] soc: dt-bindings: qcom: apr: deprecate qcom, apr-domain property Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 02/22] soc: dt-bindings: qcom: apr: deprecate qcom,apr-domain property Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 03/22] soc: qcom: apr: make code more reuseable Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 04/22] soc: dt-bindings: qcom: add gpr bindings Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-16 20:03 ` Rob Herring
2021-09-16 20:03 ` Rob Herring
2021-09-15 13:13 ` [PATCH v6 05/22] soc: qcom: apr: Add GPR support Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 15:47 ` Pierre-Louis Bossart
2021-09-15 15:47 ` Pierre-Louis Bossart
2021-09-16 15:02 ` Srinivas Kandagatla
2021-09-16 15:02 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 06/22] ASoC: dt-bindings: move LPASS dai related bindings out of q6afe Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 07/22] ASoC: dt-bindings: move LPASS clocks " Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 08/22] ASoC: dt-bindings: rename q6afe.h to q6dsp-lpass-ports.h Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 09/22] ASoC: qdsp6: q6afe-dai: move lpass audio ports to common file Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 10/22] ASoC: qdsp6: q6afe-clocks: move audio-clocks " Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 11/22] ASoC: dt-bindings: q6dsp: add q6apm-lpass-dai compatible Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 12/22] ASoC: dt-bindings: lpass-clocks: add q6prm clocks compatible Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 13/22] ASoC: dt-bindings: add q6apm digital audio stream bindings Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-16 20:05 ` Rob Herring
2021-09-16 20:05 ` Rob Herring
2021-09-15 13:13 ` [PATCH v6 14/22] ASoC: qdsp6: audioreach: add basic pkt alloc support Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 15:54 ` Pierre-Louis Bossart
2021-09-15 15:54 ` Pierre-Louis Bossart
2021-09-16 15:02 ` Srinivas Kandagatla
2021-09-16 15:02 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 15/22] ASoC: qdsp6: audioreach: add q6apm support Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 16:02 ` Pierre-Louis Bossart
2021-09-15 16:02 ` Pierre-Louis Bossart
2021-09-16 15:02 ` Srinivas Kandagatla
2021-09-16 15:02 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 16/22] ASoC: qdsp6: audioreach: add module configuration command helpers Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 16:11 ` Pierre-Louis Bossart
2021-09-15 16:11 ` Pierre-Louis Bossart
2021-09-16 15:02 ` Srinivas Kandagatla
2021-09-16 15:02 ` Srinivas Kandagatla
2021-09-16 15:40 ` Pierre-Louis Bossart
2021-09-16 15:40 ` Pierre-Louis Bossart
2021-09-15 13:13 ` [PATCH v6 17/22] ASoC: qdsp6: audioreach: add Kconfig and Makefile Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 18/22] ASoC: qdsp6: audioreach: add topology support Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 16:22 ` Pierre-Louis Bossart [this message]
2021-09-15 16:22 ` Pierre-Louis Bossart
2021-09-16 15:02 ` Srinivas Kandagatla
2021-09-16 15:02 ` Srinivas Kandagatla
2021-09-16 16:28 ` Pierre-Louis Bossart
2021-09-16 16:28 ` Pierre-Louis Bossart
2021-09-15 13:13 ` [PATCH v6 19/22] ASoC: qdsp6: audioreach: add q6apm-dai support Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 20/22] ASoC: qdsp6: audioreach: add q6apm lpass dai support Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 21/22] ASoC: qdsp6: audioreach: add q6prm support Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 13:13 ` [PATCH v6 22/22] ASoC: qdsp6: audioreach: add support for q6prm-clocks Srinivas Kandagatla
2021-09-15 13:13 ` Srinivas Kandagatla
2021-09-15 16:32 ` [PATCH v6 00/22] ASoC: qcom: Add AudioReach support Pierre-Louis Bossart
2021-09-15 16:32 ` Pierre-Louis Bossart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bc93c17e-b65d-5885-f151-243d259f40ff@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=bgoswami@codeaurora.org \
--cc=bjorn.andersson@linaro.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=plai@codeaurora.org \
--cc=robh@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.