Skip to content
Merged
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
15 changes: 9 additions & 6 deletions src/drivers/intel/hda/hda-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ static int hda_dma_release(struct dma_chan_data *channel)

static int hda_dma_stop_common(struct dma_chan_data *channel)
{
struct dai_data *dd = channel->dev_data;
struct hda_chan_data *hda_chan;
uint32_t flags, dgcs;

Expand All @@ -668,12 +669,14 @@ static int hda_dma_stop_common(struct dma_chan_data *channel)
}

/* check if channel is idle. No need to wait after clearing the GEN bit */
dgcs = dma_chan_reg_read(channel, DGCS);
if (dgcs & DGCS_GBUSY) {
tr_err(&hdma_tr, "hda-dmac: %d channel %d not idle after stop",
channel->dma->plat_data.id, channel->index);
irq_local_enable(flags);
return -EBUSY;
if (dd && dd->delayed_dma_stop) {
dgcs = dma_chan_reg_read(channel, DGCS);
if (dgcs & DGCS_GBUSY) {
tr_err(&hdma_tr, "hda-dmac: %d channel %d not idle after stop",
channel->dma->plat_data.id, channel->index);
irq_local_enable(flags);
return -EBUSY;
}
}
channel->status = COMP_STATE_PREPARE;
hda_chan = dma_chan_get_data(channel);
Expand Down