summaryrefslogtreecommitdiff
path: root/sound/soc/intel/avs/messages.c
diff options
context:
space:
mode:
authorCezary Rojewski <cezary.rojewski@intel.com>2022-03-11 16:35:39 +0100
committerMark Brown <broonie@kernel.org>2022-03-11 16:24:04 +0000
commit580a5912d1fe774f9902b614fa33e1add92ca749 (patch)
tree9cbb40f9d94580c0ce90ba1064ac83ce7ef3af95 /sound/soc/intel/avs/messages.c
parentc1a427e8da9332a5832fd4a5429adede34bfa85f (diff)
ASoC: Intel: avs: Declare module configuration types
Declare structures and constants for all modules being part of basefw binary. These are used in streaming operations to communicate the needs of software to firmware side. While adding module types, append handler for SET_SINK_FORMAT runtime for COPIER module which allows for configuration of output pin other than the default one (0). 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-13-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/avs/messages.c')
-rw-r--r--sound/soc/intel/avs/messages.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/soc/intel/avs/messages.c b/sound/soc/intel/avs/messages.c
index d260b5d30c87..004da166a943 100644
--- a/sound/soc/intel/avs/messages.c
+++ b/sound/soc/intel/avs/messages.c
@@ -676,3 +676,20 @@ int avs_ipc_get_modules_info(struct avs_dev *adev, struct avs_mods_info **info)
*info = (struct avs_mods_info *)payload;
return 0;
}
+
+int avs_ipc_copier_set_sink_format(struct avs_dev *adev, u16 module_id,
+ u8 instance_id, u32 sink_id,
+ const struct avs_audio_format *src_fmt,
+ const struct avs_audio_format *sink_fmt)
+{
+ struct avs_copier_sink_format cpr_fmt;
+
+ cpr_fmt.sink_id = sink_id;
+ /* Firmware expects driver to resend copier's input format. */
+ cpr_fmt.src_fmt = *src_fmt;
+ cpr_fmt.sink_fmt = *sink_fmt;
+
+ return avs_ipc_set_large_config(adev, module_id, instance_id,
+ AVS_COPIER_SET_SINK_FORMAT,
+ (u8 *)&cpr_fmt, sizeof(cpr_fmt));
+}