Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions sound/soc/sof/intel/hda-dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,23 @@ static int __maybe_unused hda_dai_trigger(struct snd_pcm_substream *substream, i
return 0;
}

/*
* The link DMA is reset on STOP and it is expected to be configured
* again in the BE prepare before the next START.
* When the BE is shared by multiple FEs, DPCM can start the BE again
* without preparing it: the BE prepare is skipped while another FE
* using the BE is in PREPARED state, and that FE can also start the BE
* directly. Run the prepare of the DAI here to configure the link DMA.
*/
if (cmd == SNDRV_PCM_TRIGGER_START && !hext_stream->link_prepared &&
dai->driver->ops && dai->driver->ops->prepare) {
dev_dbg(dai->dev, "link DMA not prepared, preparing it for START\n");

ret = dai->driver->ops->prepare(substream, dai);
if (ret < 0)
return ret;
}

if (ops->pre_trigger) {
ret = ops->pre_trigger(sdev, dai, substream, cmd);
if (ret < 0)
Expand Down
Loading