Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: SOF: sof-audio: Add a new op in struct sof_ipc_tplg_ops

Add a new host_config op in struct sof_ipc_tplg_ops and define it for
IPC4. This will be used to configure the host widget during prepare
after a suspend/resume or after an xrun.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260204081833.16630-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Ranjani Sridharan and committed by
Mark Brown
236d5e66 dcf0470a

+23
+20
sound/soc/sof/ipc4-topology.c
··· 2004 2004 return ret; 2005 2005 } 2006 2006 2007 + static void sof_ipc4_host_config(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget, 2008 + struct snd_sof_platform_stream_params *platform_params) 2009 + { 2010 + struct sof_ipc4_copier *ipc4_copier = (struct sof_ipc4_copier *)swidget->private; 2011 + struct snd_sof_widget *pipe_widget = swidget->spipe->pipe_widget; 2012 + struct sof_ipc4_copier_data *copier_data = &ipc4_copier->data; 2013 + struct sof_ipc4_pipeline *pipeline = pipe_widget->private; 2014 + u32 host_dma_id = platform_params->stream_tag - 1; 2015 + 2016 + if (pipeline->use_chain_dma) { 2017 + pipeline->msg.primary &= ~SOF_IPC4_GLB_CHAIN_DMA_HOST_ID_MASK; 2018 + pipeline->msg.primary |= SOF_IPC4_GLB_CHAIN_DMA_HOST_ID(host_dma_id); 2019 + return; 2020 + } 2021 + 2022 + copier_data->gtw_cfg.node_id &= ~SOF_IPC4_NODE_INDEX_MASK; 2023 + copier_data->gtw_cfg.node_id |= SOF_IPC4_NODE_INDEX(host_dma_id); 2024 + } 2025 + 2007 2026 static int 2008 2027 sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget, 2009 2028 struct snd_pcm_hw_params *fe_params, ··· 3948 3929 .dai_get_param = sof_ipc4_dai_get_param, 3949 3930 .tear_down_all_pipelines = sof_ipc4_tear_down_all_pipelines, 3950 3931 .link_setup = sof_ipc4_link_setup, 3932 + .host_config = sof_ipc4_host_config, 3951 3933 };
+3
sound/soc/sof/sof-audio.h
··· 209 209 * @widget_setup: Function pointer for setting up setup in the DSP 210 210 * @widget_free: Function pointer for freeing widget in the DSP 211 211 * @dai_config: Function pointer for sending DAI config IPC to the DSP 212 + * @host_config: Function pointer for setting the DMA ID for host widgets 212 213 * @dai_get_param: Function pointer for getting the DAI parameter 213 214 * @set_up_all_pipelines: Function pointer for setting up all topology pipelines 214 215 * @tear_down_all_pipelines: Function pointer for tearing down all topology pipelines ··· 231 230 int (*widget_free)(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget); 232 231 int (*dai_config)(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget, 233 232 unsigned int flags, struct snd_sof_dai_config_data *data); 233 + void (*host_config)(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget, 234 + struct snd_sof_platform_stream_params *platform_params); 234 235 int (*dai_get_param)(struct snd_sof_dev *sdev, struct snd_sof_dai *dai, int param_type); 235 236 int (*set_up_all_pipelines)(struct snd_sof_dev *sdev, bool verify); 236 237 int (*tear_down_all_pipelines)(struct snd_sof_dev *sdev, bool verify);