diff options
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r-- | sound/soc/fsl/mpc5200_dma.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c index f0a2d4071998..9ff62e3a9b1d 100644 --- a/sound/soc/fsl/mpc5200_dma.c +++ b/sound/soc/fsl/mpc5200_dma.c | |||
@@ -69,6 +69,23 @@ static void psc_dma_bcom_enqueue_next_buffer(struct psc_dma_stream *s) | |||
69 | 69 | ||
70 | static void psc_dma_bcom_enqueue_tx(struct psc_dma_stream *s) | 70 | static void psc_dma_bcom_enqueue_tx(struct psc_dma_stream *s) |
71 | { | 71 | { |
72 | if (s->appl_ptr > s->runtime->control->appl_ptr) { | ||
73 | /* | ||
74 | * In this case s->runtime->control->appl_ptr has wrapped around. | ||
75 | * Play the data to the end of the boundary, then wrap our own | ||
76 | * appl_ptr back around. | ||
77 | */ | ||
78 | while (s->appl_ptr < s->runtime->boundary) { | ||
79 | if (bcom_queue_full(s->bcom_task)) | ||
80 | return; | ||
81 | |||
82 | s->appl_ptr += s->period_size; | ||
83 | |||
84 | psc_dma_bcom_enqueue_next_buffer(s); | ||
85 | } | ||
86 | s->appl_ptr -= s->runtime->boundary; | ||
87 | } | ||
88 | |||
72 | while (s->appl_ptr < s->runtime->control->appl_ptr) { | 89 | while (s->appl_ptr < s->runtime->control->appl_ptr) { |
73 | 90 | ||
74 | if (bcom_queue_full(s->bcom_task)) | 91 | if (bcom_queue_full(s->bcom_task)) |