summaryrefslogtreecommitdiff
path: root/apps/recorder/pcm_record.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/recorder/pcm_record.c')
-rw-r--r--apps/recorder/pcm_record.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/recorder/pcm_record.c b/apps/recorder/pcm_record.c
index 2567b56ef3..687a70664d 100644
--- a/apps/recorder/pcm_record.c
+++ b/apps/recorder/pcm_record.c
@@ -256,7 +256,7 @@ enum
256/*******************************************************************/ 256/*******************************************************************/
257 257
258/* Callback for when more data is ready - called in interrupt context */ 258/* Callback for when more data is ready - called in interrupt context */
259static int pcm_rec_have_more(int status) 259static void pcm_rec_have_more(int status, void **start, size_t *size)
260{ 260{
261 if (status < 0) 261 if (status < 0)
262 { 262 {
@@ -265,9 +265,9 @@ static int pcm_rec_have_more(int status)
265 { 265 {
266 /* Flush recorded data to disk and stop recording */ 266 /* Flush recorded data to disk and stop recording */
267 queue_post(&pcmrec_queue, PCMREC_STOP, 0); 267 queue_post(&pcmrec_queue, PCMREC_STOP, 0);
268 return -1; 268 return;
269 } 269 }
270 /* else try again next transmission */ 270 /* else try again next transmission - frame is invalid */
271 } 271 }
272 else if (!dma_lock) 272 else if (!dma_lock)
273 { 273 {
@@ -282,8 +282,8 @@ static int pcm_rec_have_more(int status)
282 dma_wr_pos = next_pos; 282 dma_wr_pos = next_pos;
283 } 283 }
284 284
285 pcm_record_more(GET_PCM_CHUNK(dma_wr_pos), PCM_CHUNK_SIZE); 285 *start = GET_PCM_CHUNK(dma_wr_pos);
286 return 0; 286 *size = PCM_CHUNK_SIZE;
287} /* pcm_rec_have_more */ 287} /* pcm_rec_have_more */
288 288
289static void reset_hardware(void) 289static void reset_hardware(void)