ASoC: SOF: ipc4-topology: allow chain_dma for all supported DAIs
Now that we have a 'is_chain_dma_supported' callback we can use it to double-check possible disconnects between a topology file enabling chain-dma for a DAI and the hardware/firmware capabilities. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://msgid.link/r/20240213101247.28887-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
8722d245a7
commit
df82dbb5fb
@ -509,6 +509,7 @@ static int sof_ipc4_widget_setup_comp_dai(struct snd_sof_widget *swidget)
|
||||
{
|
||||
struct sof_ipc4_available_audio_format *available_fmt;
|
||||
struct snd_soc_component *scomp = swidget->scomp;
|
||||
struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
|
||||
struct snd_sof_dai *dai = swidget->private;
|
||||
struct sof_ipc4_copier *ipc4_copier;
|
||||
struct snd_sof_widget *pipe_widget;
|
||||
@ -552,10 +553,11 @@ static int sof_ipc4_widget_setup_comp_dai(struct snd_sof_widget *swidget)
|
||||
|
||||
pipe_widget = swidget->spipe->pipe_widget;
|
||||
pipeline = pipe_widget->private;
|
||||
if (pipeline->use_chain_dma && ipc4_copier->dai_type != SOF_DAI_INTEL_HDA) {
|
||||
dev_err(scomp->dev,
|
||||
"Bad DAI type '%d', Chained DMA is only supported by HDA DAIs (%d).\n",
|
||||
ipc4_copier->dai_type, SOF_DAI_INTEL_HDA);
|
||||
|
||||
if (pipeline->use_chain_dma &&
|
||||
!snd_sof_is_chain_dma_supported(sdev, ipc4_copier->dai_type)) {
|
||||
dev_err(scomp->dev, "Bad DAI type '%d', Chain DMA is not supported\n",
|
||||
ipc4_copier->dai_type);
|
||||
ret = -ENODEV;
|
||||
goto free_available_fmt;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user