Commit ba91d091 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: SOF: ops: add new 'is_chain_dma_supported' callback

IPC4 introduced a 'chain-dma' mode when host and link DMA are
connected by firmware without using a regular pipeline or the ability
to add intermediate connections. This mode is not available on all
platforms and all links, so add a platform-specific callback to help
the SOF ipc4-topology core handle different hardware+firmware
configurations.
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarRander Wang <rander.wang@intel.com>
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://msgid.link/r/20240213101247.28887-3-peter.ujfalusi@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 3858464d
...@@ -567,6 +567,15 @@ snd_sof_set_mach_params(struct snd_soc_acpi_mach *mach, ...@@ -567,6 +567,15 @@ snd_sof_set_mach_params(struct snd_soc_acpi_mach *mach,
sof_ops(sdev)->set_mach_params(mach, sdev); sof_ops(sdev)->set_mach_params(mach, sdev);
} }
static inline bool
snd_sof_is_chain_dma_supported(struct snd_sof_dev *sdev, u32 dai_type)
{
if (sof_ops(sdev) && sof_ops(sdev)->is_chain_dma_supported)
return sof_ops(sdev)->is_chain_dma_supported(sdev, dai_type);
return false;
}
/** /**
* snd_sof_dsp_register_poll_timeout - Periodically poll an address * snd_sof_dsp_register_poll_timeout - Periodically poll an address
* until a condition is met or a timeout occurs * until a condition is met or a timeout occurs
......
...@@ -338,6 +338,8 @@ struct snd_sof_dsp_ops { ...@@ -338,6 +338,8 @@ struct snd_sof_dsp_ops {
struct snd_soc_dai_driver *drv; struct snd_soc_dai_driver *drv;
int num_drv; int num_drv;
bool (*is_chain_dma_supported)(struct snd_sof_dev *sdev, u32 dai_type); /* optional */
/* ALSA HW info flags, will be stored in snd_pcm_runtime.hw.info */ /* ALSA HW info flags, will be stored in snd_pcm_runtime.hw.info */
u32 hw_info; u32 hw_info;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment