Skip to content

Commit f9e6adf

Browse files
authored
Merge pull request #73 from tlauda/topic/hda-bf
hda-dma: wait for buffer full after starting render
2 parents fa48c42 + 9a37637 commit f9e6adf

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/drivers/hda-dma.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,14 @@ static int hda_dma_start(struct dma *dma, int channel)
212212

213213
/* full buffer is copied at startup */
214214
p->chan[channel].desc_avail = p->chan[channel].desc_count;
215+
216+
/* for render let's wait for buffer full */
217+
if (p->chan[channel].direction == DMA_DIR_HMEM_TO_LMEM) {
218+
do {
219+
idelay(PLATFORM_DEFAULT_DELAY);
220+
dgcs = host_dma_reg_read(dma, channel, DGCS);
221+
} while (!(dgcs & DGCS_BF));
222+
}
215223
out:
216224
spin_unlock_irq(&dma->lock, flags);
217225
return ret;

0 commit comments

Comments
 (0)