diff options
author | Bard Liao <yung-chuan.liao@linux.intel.com> | 2023-02-09 16:21:23 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-02-09 14:31:17 +0000 |
commit | 11f605633b33cdffd4ffe3b8e1e89590e8f521e7 (patch) | |
tree | 2fba01a456af99bc6be601da2e626b084aed6fb1 /sound/soc/sof/ipc4-topology.h | |
parent | b796ff3bf03fd8c838ddd2709ded15865e4af4a4 (diff) |
ASoC: SOF: ipc4-topology: set copier sink format
MOD_INIT_INSTANCE IPC for a copier only contains the sink format for
output pin 0. Any additional output pins that are used need to have their
sink format set using the LARGE_CONFIG_SET IPC message.
Otherwise, firmware will report error or crash due to NULL format is used.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230209142123.17193-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/ipc4-topology.h')
-rw-r--r-- | sound/soc/sof/ipc4-topology.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/sound/soc/sof/ipc4-topology.h b/sound/soc/sof/ipc4-topology.h index ee5d31e68a77..72529179ac22 100644 --- a/sound/soc/sof/ipc4-topology.h +++ b/sound/soc/sof/ipc4-topology.h @@ -66,6 +66,52 @@ /* A magic number from FW */ #define ALH_MULTI_GTW_COUNT 8 +enum sof_ipc4_copier_module_config_params { +/* + * Use LARGE_CONFIG_SET to initialize timestamp event. Ipc mailbox must + * contain properly built CopierConfigTimestampInitData struct. + */ + SOF_IPC4_COPIER_MODULE_CFG_PARAM_TIMESTAMP_INIT = 1, +/* + * Use LARGE_CONFIG_SET to initialize copier sink. Ipc mailbox must contain + * properly built CopierConfigSetSinkFormat struct. + */ + SOF_IPC4_COPIER_MODULE_CFG_PARAM_SET_SINK_FORMAT, +/* + * Use LARGE_CONFIG_SET to initialize and enable on Copier data segment + * event. Ipc mailbox must contain properly built DataSegmentEnabled struct. + */ + SOF_IPC4_COPIER_MODULE_CFG_PARAM_DATA_SEGMENT_ENABLED, +/* + * Use LARGE_CONFIG_GET to retrieve Linear Link Position (LLP) value for non + * HD-A gateways. + */ + SOF_IPC4_COPIER_MODULE_CFG_PARAM_LLP_READING, +/* + * Use LARGE_CONFIG_GET to retrieve Linear Link Position (LLP) value for non + * HD-A gateways and corresponding total processed data + */ + SOF_IPC4_COPIER_MODULE_CFG_PARAM_LLP_READING_EXTENDED, +/* + * Use LARGE_CONFIG_SET to setup attenuation on output pins. Data is just uint32_t. + * note Config is only allowed when output pin is set up for 32bit and source + * is connected to Gateway + */ + SOF_IPC4_COPIER_MODULE_CFG_ATTENUATION, +}; + +struct sof_ipc4_copier_config_set_sink_format { +/* Id of sink */ + u32 sink_id; +/* + * Input format used by the source + * attention must be the same as present if already initialized. + */ + struct sof_ipc4_audio_format source_fmt; +/* Output format used by the sink */ + struct sof_ipc4_audio_format sink_fmt; +} __packed __aligned(4); + /** * struct sof_ipc4_pipeline - pipeline config data * @priority: Priority of this pipeline |