diff options
author | Cezary Rojewski <cezary.rojewski@intel.com> | 2022-03-11 16:35:32 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-03-11 16:23:56 +0000 |
commit | cb1eb6b5be42799d23f81ffde84ee3537365b0ed (patch) | |
tree | 9882034afc13a040a3a2514f6f45148d6c04fda8 /sound/soc/intel/avs/messages.h | |
parent | 2879516fcd6d7ec5972762dbd94859d9221e70d8 (diff) | |
download | lwn-cb1eb6b5be42799d23f81ffde84ee3537365b0ed.tar.gz lwn-cb1eb6b5be42799d23f81ffde84ee3537365b0ed.zip |
ASoC: Intel: avs: Add code loading requests
Before firmware and its modules can be used, they have to be loaded.
Code loading process is complex and is a combination of DMA and IPC
operations. Here, IPC part is being added and accounts for CLDMA and HDA
mechanisms both.
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/20220311153544.136854-6-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/avs/messages.h')
-rw-r--r-- | sound/soc/intel/avs/messages.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sound/soc/intel/avs/messages.h b/sound/soc/intel/avs/messages.h index becf336578d7..5e16aabfb6f4 100644 --- a/sound/soc/intel/avs/messages.h +++ b/sound/soc/intel/avs/messages.h @@ -24,6 +24,9 @@ enum avs_msg_direction { }; enum avs_global_msg_type { + AVS_GLB_LOAD_MULTIPLE_MODULES = 15, + AVS_GLB_UNLOAD_MULTIPLE_MODULES = 16, + AVS_GLB_LOAD_LIBRARY = 24, AVS_GLB_NOTIFICATION = 27, }; @@ -38,6 +41,16 @@ union avs_global_msg { u32 msg_direction:1; u32 msg_target:1; }; + /* module loading */ + struct { + u32 mod_cnt:8; + } load_multi_mods; + /* library loading */ + struct { + u32 dma_id:5; + u32 rsvd:11; + u32 lib_id:4; + } load_lib; }; union { u32 val; @@ -84,6 +97,10 @@ union avs_reply_msg { }; union { u32 val; + /* module loading */ + struct { + u32 err_mod_id:16; + } load_multi_mods; } ext; }; } __packed; @@ -167,4 +184,9 @@ struct avs_notify_mod_data { u32 data[]; } __packed; +/* Code loading messages */ +int avs_ipc_load_modules(struct avs_dev *adev, u16 *mod_ids, u32 num_mod_ids); +int avs_ipc_unload_modules(struct avs_dev *adev, u16 *mod_ids, u32 num_mod_ids); +int avs_ipc_load_library(struct avs_dev *adev, u32 dma_id, u32 lib_id); + #endif /* __SOUND_SOC_INTEL_AVS_MSGS_H */ |