summaryrefslogtreecommitdiff
path: root/sound/soc/intel/avs/avs.h
diff options
context:
space:
mode:
authorCezary Rojewski <cezary.rojewski@intel.com>2022-03-31 16:52:42 +0300
committerMark Brown <broonie@kernel.org>2022-04-19 14:03:59 +0300
commit0ef882074eb1fee25083387ea6bc6669d0e24a85 (patch)
treebdbb439204fc66a457bba3a3c2c3533f5ece22de /sound/soc/intel/avs/avs.h
parentf61ad1e9568c854ea49a2f58cf2a0b2877cfad33 (diff)
downloadlinux-0ef882074eb1fee25083387ea6bc6669d0e24a85.tar.xz
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>
Diffstat (limited to 'sound/soc/intel/avs/avs.h')
-rw-r--r--sound/soc/intel/avs/avs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/intel/avs/avs.h b/sound/soc/intel/avs/avs.h
index dcdd3d92a158..45372b394862 100644
--- a/sound/soc/intel/avs/avs.h
+++ b/sound/soc/intel/avs/avs.h
@@ -105,6 +105,12 @@ struct avs_dev {
char **lib_names;
struct completion fw_ready;
+
+ struct list_head comp_list;
+ struct mutex comp_list_mutex;
+ struct list_head path_list;
+ spinlock_t path_list_lock;
+ struct mutex path_mutex;
};
/* from hda_bus to avs_dev */