summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/talk.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/talk.c b/apps/talk.c
index 13f323f4b6..910f355ff9 100644
--- a/apps/talk.c
+++ b/apps/talk.c
@@ -207,6 +207,14 @@ static void sync_callback(int handle, bool sync_on)
207 mutex_lock(&read_buffer_mutex); 207 mutex_lock(&read_buffer_mutex);
208 else 208 else
209 mutex_unlock(&read_buffer_mutex); 209 mutex_unlock(&read_buffer_mutex);
210#if CONFIG_CPU == SH7034
211 /* DMA must not interrupt during buffer move or commit_buffer copies
212 * from inconsistent buflib buffer */
213 if (sync_on)
214 CHCR3 &= ~0x0001; /* disable the DMA (and therefore the interrupt also) */
215 else
216 CHCR3 |= 0x0001; /* re-enable the DMA */
217#endif
210} 218}
211 219
212static ssize_t read_to_handle_ex(int fd, struct buflib_context *ctx, int handle, 220static ssize_t read_to_handle_ex(int fd, struct buflib_context *ctx, int handle,
@@ -641,7 +649,7 @@ static bool load_voicefile_data(int fd)
641/* Use a static buffer to avoid difficulties with buflib during DMA 649/* Use a static buffer to avoid difficulties with buflib during DMA
642 * (hwcodec)/buffer passing to the voice_thread (swcodec). Clips 650 * (hwcodec)/buffer passing to the voice_thread (swcodec). Clips
643 * can be played in chunks so the size is not that important */ 651 * can be played in chunks so the size is not that important */
644static unsigned char commit_buffer[1<<10]; 652static unsigned char commit_buffer[2<<10];
645 653
646static void* commit_transfer(struct queue_entry *qe, size_t *size) 654static void* commit_transfer(struct queue_entry *qe, size_t *size)
647{ 655{