Skip to content

Commit a512b86

Browse files
ujfalusiplbossart
authored andcommitted
fixup! ASoC: SOF: ipc4: fixup dailink based on copier format
There is really no need to do fixup in case of ChainDMA, just return. The 'ASoC: SOF: ipc4: fixup dailink based on copier format` causes 16bit audio to be broken. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent 925a9e7 commit a512b86

1 file changed

Lines changed: 9 additions & 12 deletions

File tree

‎sound/soc/sof/ipc4-pcm.c‎

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,9 @@ static int sof_ipc4_pcm_dai_link_fixup(struct snd_soc_pcm_runtime *rtd,
522522
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
523523
struct sof_ipc4_audio_format *ipc4_fmt;
524524
struct sof_ipc4_copier *ipc4_copier;
525-
bool use_chain_dma = false;
526525
bool single_fmt = false;
527526
u32 valid_bits = 0;
528-
int dir;
527+
int dir, ret;
529528

530529
if (!dai) {
531530
dev_err(component->dev, "%s: No DAI found with name %s\n", __func__,
@@ -549,6 +548,11 @@ static int sof_ipc4_pcm_dai_link_fixup(struct snd_soc_pcm_runtime *rtd,
549548
struct snd_sof_widget *swidget = w->dobj.private;
550549
struct snd_sof_widget *pipe_widget = swidget->spipe->pipe_widget;
551550
struct sof_ipc4_pipeline *pipeline = pipe_widget->private;
551+
552+
/* Chain DMA does not use copiers, so no fixup needed */
553+
if (pipeline->use_chain_dma)
554+
return 0;
555+
552556
if (dir == SNDRV_PCM_STREAM_PLAYBACK) {
553557
if (sof_ipc4_copier_is_single_format(sdev,
554558
available_fmt->output_pin_fmts,
@@ -564,19 +568,12 @@ static int sof_ipc4_pcm_dai_link_fixup(struct snd_soc_pcm_runtime *rtd,
564568
single_fmt = true;
565569
}
566570
}
567-
568-
if (pipeline->use_chain_dma)
569-
use_chain_dma = true;
570571
}
571572
}
572573

573-
/* Chain DMA does not use copiers, so no fixup needed */
574-
if (!use_chain_dma) {
575-
int ret = sof_ipc4_pcm_dai_link_fixup_rate(sdev, params, ipc4_copier);
576-
577-
if (ret)
578-
return ret;
579-
}
574+
ret = sof_ipc4_pcm_dai_link_fixup_rate(sdev, params, ipc4_copier);
575+
if (ret)
576+
return ret;
580577

581578
if (single_fmt) {
582579
snd_mask_none(fmt);

0 commit comments

Comments
 (0)