Skip to content

Commit

Permalink
ASoC: dmaengine_pcm: Reset pointer position when starting a stream
Browse files Browse the repository at this point in the history
Otherwise a wrong position will be reported after restarting a stream and the
first few samples might be skipped.

Signed-off-by: Mika Westerberg <[email protected]>
Signed-off-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Mika Westerberg authored and broonie committed Mar 12, 2012
1 parent c986564 commit 7a08cf7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound/soc/soc-dmaengine-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ static int dmaengine_pcm_prepare_and_submit(struct snd_pcm_substream *substream)

direction = snd_pcm_substream_to_dma_direction(substream);

prtd->pos = 0;
desc = chan->device->device_prep_dma_cyclic(chan,
substream->runtime->dma_addr,
snd_pcm_lib_buffer_bytes(substream),
Expand Down

0 comments on commit 7a08cf7

Please sign in to comment.