diff options
Diffstat (limited to 'sound/soc/fsl/mpc5200_dma.c')
-rw-r--r-- | sound/soc/fsl/mpc5200_dma.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c index 4e475861f5db..658e3fa14663 100644 --- a/sound/soc/fsl/mpc5200_dma.c +++ b/sound/soc/fsl/mpc5200_dma.c | |||
@@ -77,6 +77,7 @@ static irqreturn_t psc_dma_bcom_irq_tx(int irq, void *_psc_dma_stream) | |||
77 | bcom_retrieve_buffer(s->bcom_task, NULL, NULL); | 77 | bcom_retrieve_buffer(s->bcom_task, NULL, NULL); |
78 | 78 | ||
79 | s->period_current = (s->period_current+1) % s->runtime->periods; | 79 | s->period_current = (s->period_current+1) % s->runtime->periods; |
80 | s->period_count++; | ||
80 | 81 | ||
81 | psc_dma_bcom_enqueue_next_buffer(s); | 82 | psc_dma_bcom_enqueue_next_buffer(s); |
82 | } | 83 | } |
@@ -101,6 +102,7 @@ static irqreturn_t psc_dma_bcom_irq_rx(int irq, void *_psc_dma_stream) | |||
101 | bcom_retrieve_buffer(s->bcom_task, NULL, NULL); | 102 | bcom_retrieve_buffer(s->bcom_task, NULL, NULL); |
102 | 103 | ||
103 | s->period_current = (s->period_current+1) % s->runtime->periods; | 104 | s->period_current = (s->period_current+1) % s->runtime->periods; |
105 | s->period_count++; | ||
104 | 106 | ||
105 | psc_dma_bcom_enqueue_next_buffer(s); | 107 | psc_dma_bcom_enqueue_next_buffer(s); |
106 | } | 108 | } |
@@ -142,17 +144,17 @@ static int psc_dma_trigger(struct snd_pcm_substream *substream, int cmd) | |||
142 | else | 144 | else |
143 | s = &psc_dma->playback; | 145 | s = &psc_dma->playback; |
144 | 146 | ||
145 | dev_dbg(psc_dma->dev, "psc_dma_trigger(substream=%p, cmd=%i)" | ||
146 | " stream_id=%i\n", | ||
147 | substream, cmd, substream->pstr->stream); | ||
148 | |||
149 | switch (cmd) { | 147 | switch (cmd) { |
150 | case SNDRV_PCM_TRIGGER_START: | 148 | case SNDRV_PCM_TRIGGER_START: |
149 | dev_dbg(psc_dma->dev, "START: stream=%i fbits=%u ps=%u #p=%u\n", | ||
150 | substream->pstr->stream, runtime->frame_bits, | ||
151 | (int)runtime->period_size, runtime->periods); | ||
151 | s->period_bytes = frames_to_bytes(runtime, | 152 | s->period_bytes = frames_to_bytes(runtime, |
152 | runtime->period_size); | 153 | runtime->period_size); |
153 | s->period_next = 0; | 154 | s->period_next = 0; |
154 | s->period_current = 0; | 155 | s->period_current = 0; |
155 | s->active = 1; | 156 | s->active = 1; |
157 | s->period_count = 0; | ||
156 | s->runtime = runtime; | 158 | s->runtime = runtime; |
157 | 159 | ||
158 | /* Fill up the bestcomm bd queue and enable DMA. | 160 | /* Fill up the bestcomm bd queue and enable DMA. |
@@ -177,6 +179,8 @@ static int psc_dma_trigger(struct snd_pcm_substream *substream, int cmd) | |||
177 | break; | 179 | break; |
178 | 180 | ||
179 | case SNDRV_PCM_TRIGGER_STOP: | 181 | case SNDRV_PCM_TRIGGER_STOP: |
182 | dev_dbg(psc_dma->dev, "STOP: stream=%i periods_count=%i\n", | ||
183 | substream->pstr->stream, s->period_count); | ||
180 | s->active = 0; | 184 | s->active = 0; |
181 | 185 | ||
182 | spin_lock_irqsave(&psc_dma->lock, flags); | 186 | spin_lock_irqsave(&psc_dma->lock, flags); |
@@ -190,7 +194,8 @@ static int psc_dma_trigger(struct snd_pcm_substream *substream, int cmd) | |||
190 | break; | 194 | break; |
191 | 195 | ||
192 | default: | 196 | default: |
193 | dev_dbg(psc_dma->dev, "invalid command\n"); | 197 | dev_dbg(psc_dma->dev, "unhandled trigger: stream=%i cmd=%i\n", |
198 | substream->pstr->stream, cmd); | ||
194 | return -EINVAL; | 199 | return -EINVAL; |
195 | } | 200 | } |
196 | 201 | ||