From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Cezary Rojewski <cezary.rojewski@intel.com>, alsa-devel@alsa-project.org
Cc: upstream@semihalf.com, harshapriya.n@intel.com, rad@semihalf.com,
tiwai@suse.com, hdegoede@redhat.com, broonie@kernel.org,
amadeuszx.slawinski@linux.intel.com, cujomalainey@chromium.org,
lma@semihalf.com
Subject: Re: [RFC 09/13] ASoC: Intel: avs: Path creation and freeing
Date: Fri, 25 Feb 2022 13:36:46 -0600 [thread overview]
Message-ID: <2b6bc0f7-1e04-77b3-95d2-ff561b006ccb@linux.intel.com> (raw)
In-Reply-To: <20220207132532.3782412-10-cezary.rojewski@intel.com>
On 2/7/22 07:25, Cezary Rojewski wrote:
> To implement ASoC PCM operations, DSP path handling is needed. With path
> template concept present, information carried by topology file can be
> converted into runtime path representation. Each may be composed of
> several pipelines and each pipeline can contain a number of processing
it's not quite clear how you can have different pipelines with a single
dma_is per path?
> modules inside. Number of templates and variants found within topology
> may vastly outnumber the total amount of pipelines and modules supported
> by AudioDSP firmware simultaneously (in runtime) so none of the IDs are
> specified in the topology. These are assigned dynamically when needed
> and account for limitations described by FIRMWARE_CONFIG and
> HARDWARE_CONFIG basefw parameters.
It's already quite hard to create a topology using static IDs that will
work, this dynamic creation adds an element of risk and validation,
doesn't it?
Can you clarify how you validated this dynamic capability?
> Paths are created on ->hw_params() and are freed on ->hw_free() ALSA PCM
> operations. This choice is based on firmware expectations - need for
So a path seems to be completely tied to an FE then?
That would mean that a 'dai pipeline' with 'mixin-dai-copier' would not
be managed by an avs-path, and would somehow need to be autonomously
created?
You really need to clarify how basic topologies with
mixers/demux/loopbacks are handled.
> complete set of information when attempting to instantiate pipelines and
> modules on AudioDSP side. With DMA and audio format provided, search
> mechanism tests all path variants available in given path template until
> a matching variant is found. Once found, information already available
> is combined with all avs_tplg_* pieces pointed by matching path variant.
> This finally allows to begin a cascade of IPCs which goes is to reserve
this sentence makes no sense.
did you mean 'which goals'?
> resources and prepare DSP for upcoming audio streaming.
> +static struct avs_tplg_path *
> +avs_path_find_variant(struct avs_dev *adev,
> + struct avs_tplg_path_template *template,
> + struct snd_pcm_hw_params *fe_params,
> + struct snd_pcm_hw_params *be_params)
> +{
> + struct avs_tplg_path *variant;
> +
> + list_for_each_entry(variant, &template->path_list, node) {
> + dev_dbg(adev->dev, "check FE rate %d chn %d vbd %d bd %d\n",
> + variant->fe_fmt->sampling_freq, variant->fe_fmt->num_channels,
> + variant->fe_fmt->valid_bit_depth, variant->fe_fmt->bit_depth);
> + dev_dbg(adev->dev, "check BE rate %d chn %d vbd %d bd %d\n",
> + variant->be_fmt->sampling_freq, variant->be_fmt->num_channels,
> + variant->be_fmt->valid_bit_depth, variant->be_fmt->bit_depth);
> +
> + if (variant->fe_fmt && avs_test_hw_params(fe_params, variant->fe_fmt) &&
> + variant->be_fmt && avs_test_hw_params(be_params, variant->be_fmt))
> + return variant;
> + }
This matching between FE and BE formats is the key problem with this
patchset IMHO.
We need the ability to reconfigure the BE based on constraint matching,
not exact match with a fixed value!
> +
> + return NULL;
> +}
> +
> +static void avs_path_module_free(struct avs_dev *adev, struct avs_path_module *mod)
> +{
> + kfree(mod);
> +}
> +
> +static struct avs_path_module *
> +avs_path_module_create(struct avs_dev *adev,
> + struct avs_path_pipeline *owner,
> + struct avs_tplg_module *template)
so you have templates for paths AND modules?
Completely lost...
I'll skip the rest of this patch.
next prev parent reply other threads:[~2022-02-25 20:55 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-07 13:25 [RFC 00/13] ASoC: Intel: avs: Topology and path management Cezary Rojewski
2022-02-07 13:25 ` [RFC 01/13] ASoC: Intel: avs: Declare vendor tokens Cezary Rojewski
2022-02-07 13:25 ` [RFC 02/13] ASoC: Intel: avs: Add topology parsing infrastructure Cezary Rojewski
2022-02-25 17:20 ` Pierre-Louis Bossart
2022-03-21 10:25 ` Cezary Rojewski
2022-02-07 13:25 ` [RFC 03/13] ASoC: Intel: avs: Parse module-extension tuples Cezary Rojewski
2022-02-25 17:24 ` Pierre-Louis Bossart
2022-03-21 10:33 ` Cezary Rojewski
2022-02-07 13:25 ` [RFC 04/13] ASoC: Intel: avs: Parse pplcfg and binding tuples Cezary Rojewski
2022-02-25 17:40 ` Pierre-Louis Bossart
2022-03-21 10:53 ` Cezary Rojewski
2022-02-07 13:25 ` [RFC 05/13] ASoC: Intel: avs: Parse pipeline and module tuples Cezary Rojewski
2022-02-25 18:51 ` Pierre-Louis Bossart
2022-03-21 15:14 ` Cezary Rojewski
2022-02-07 13:25 ` [RFC 06/13] ASoC: Intel: avs: Parse path and path templates tuples Cezary Rojewski
2022-02-25 19:09 ` Pierre-Louis Bossart
2022-03-21 16:15 ` Cezary Rojewski
2022-02-07 13:25 ` [RFC 07/13] ASoC: Intel: avs: Add topology loading operations Cezary Rojewski
2022-02-25 19:17 ` Pierre-Louis Bossart
2022-03-21 16:28 ` Cezary Rojewski
2022-02-07 13:25 ` [RFC 08/13] ASoC: Intel: avs: Declare path and its components Cezary Rojewski
2022-02-25 19:25 ` Pierre-Louis Bossart
2022-03-21 17:01 ` Cezary Rojewski
2022-03-21 18:14 ` Pierre-Louis Bossart
2022-02-07 13:25 ` [RFC 09/13] ASoC: Intel: avs: Path creation and freeing Cezary Rojewski
2022-02-25 19:36 ` Pierre-Louis Bossart [this message]
2022-03-21 17:19 ` Cezary Rojewski
2022-03-21 17:53 ` Cezary Rojewski
2022-02-07 13:25 ` [RFC 10/13] ASoC: Intel: avs: Path state management Cezary Rojewski
2022-02-25 19:42 ` Pierre-Louis Bossart
2022-03-21 17:31 ` Cezary Rojewski
2022-02-07 13:25 ` [RFC 11/13] ASoC: Intel: avs: Arm paths after creating them Cezary Rojewski
2022-02-07 13:25 ` [RFC 12/13] ASoC: Intel: avs: Prepare modules before bindings them Cezary Rojewski
2022-02-07 13:25 ` [RFC 13/13] ASoC: Intel: avs: Configure modules according to their type Cezary Rojewski
2022-02-25 21:35 ` [RFC 00/13] ASoC: Intel: avs: Topology and path management Pierre-Louis Bossart
2022-02-26 0:22 ` Mark Brown
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=2b6bc0f7-1e04-77b3-95d2-ff561b006ccb@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=cujomalainey@chromium.org \
--cc=harshapriya.n@intel.com \
--cc=hdegoede@redhat.com \
--cc=lma@semihalf.com \
--cc=rad@semihalf.com \
--cc=tiwai@suse.com \
--cc=upstream@semihalf.com \
/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.