]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Intel: avs: Path creation and freeing
authorCezary Rojewski <cezary.rojewski@intel.com>
Thu, 31 Mar 2022 13:52:42 +0000 (15:52 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 19 Apr 2022 11:03:59 +0000 (12:03 +0100)
commit2568cc5961bdff25d3e1014d225a32a8aa6efe10
treebdbb439204fc66a457bba3a3c2c3533f5ece22de
parentc87c4f55487834b52711061a0384757e5736be11
ASoC: Intel: avs: Path creation and freeing

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
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.

Paths are created on ->hw_params() and are freed on ->hw_free() ALSA PCM
operations. This choice is based on firmware expectations - need for
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 goal is to reserve
resources and prepare DSP for upcoming audio streaming.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220331135246.993089-11-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/avs/Makefile
sound/soc/intel/avs/avs.h
sound/soc/intel/avs/path.c [new file with mode: 0644]
sound/soc/intel/avs/path.h