Skip to content

Commit ad29504

Browse files
committed
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>
1 parent 931e1e4 commit ad29504

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

sound/soc/sof/ipc4-topology.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,7 @@ static int sof_ipc4_widget_setup_comp_dai(struct snd_sof_widget *swidget)
487487
{
488488
struct sof_ipc4_available_audio_format *available_fmt;
489489
struct snd_soc_component *scomp = swidget->scomp;
490+
struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
490491
struct snd_sof_dai *dai = swidget->private;
491492
struct sof_ipc4_copier *ipc4_copier;
492493
struct snd_sof_widget *pipe_widget;
@@ -530,10 +531,11 @@ static int sof_ipc4_widget_setup_comp_dai(struct snd_sof_widget *swidget)
530531

531532
pipe_widget = swidget->spipe->pipe_widget;
532533
pipeline = pipe_widget->private;
533-
if (pipeline->use_chain_dma && ipc4_copier->dai_type != SOF_DAI_INTEL_HDA) {
534-
dev_err(scomp->dev,
535-
"Bad DAI type '%d', Chained DMA is only supported by HDA DAIs (%d).\n",
536-
ipc4_copier->dai_type, SOF_DAI_INTEL_HDA);
534+
535+
if (pipeline->use_chain_dma &&
536+
!snd_sof_is_chain_dma_supported(sdev, ipc4_copier->dai_type)) {
537+
dev_err(scomp->dev, "Bad DAI type '%d', Chain DMA is not supported\n",
538+
ipc4_copier->dai_type);
537539
ret = -ENODEV;
538540
goto free_available_fmt;
539541
}

0 commit comments

Comments
 (0)