summaryrefslogtreecommitdiffstats
path: root/apps/talk.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-15 19:40:55 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-24 21:20:13 +0000
commit092c340a2062fa98b7387fc5fd63578ddae7d0b6 (patch)
tree98ec96946eeb2ae709cb0528cc6998e21bb9b290 /apps/talk.c
parent17f7cc92c258bc456a27c3e7c5a19c9409851879 (diff)
downloadrockbox-092c340a2062fa98b7387fc5fd63578ddae7d0b6.tar.gz
rockbox-092c340a2062fa98b7387fc5fd63578ddae7d0b6.tar.bz2
rockbox-092c340a2062fa98b7387fc5fd63578ddae7d0b6.zip
[1/4] Remove SH support and all archos targets
This removes all code specific to SH targets Change-Id: I7980523785d2596e65c06430f4638eec74a06061
Diffstat (limited to 'apps/talk.c')
-rw-r--r--apps/talk.c33
1 files changed, 2 insertions, 31 deletions
diff --git a/apps/talk.c b/apps/talk.c
index 72b9a2eb30..3aedaf34ec 100644
--- a/apps/talk.c
+++ b/apps/talk.c
@@ -107,17 +107,13 @@ struct voicefile_header /* file format of our voice file */
/***************** Globals *****************/
-#if (CONFIG_CODEC == SWCODEC && MEMORYSIZE <= 2) || defined(ONDIO_SERIES)
+#if (CONFIG_CODEC == SWCODEC && MEMORYSIZE <= 2)
/* On low memory swcodec targets the entire voice file wouldn't fit in memory
- * together with codecs, so we load clips each time they are accessed.
- * The Ondios have slow storage access and loading the entire voice file would
- * take several seconds, so we use the same mechanism. */
+ * together with codecs, so we load clips each time they are accessed. */
#define TALK_PROGRESSIVE_LOAD
-#if !defined(ONDIO_SERIES)
/* 70+ clips should fit into 100k */
#define MAX_CLIP_BUFFER_SIZE (100000)
#endif
-#endif
#ifndef MAX_CLIP_BUFFER_SIZE
/* 1GB should be enough for everybody; will be capped to voicefile size */
@@ -212,14 +208,6 @@ static void sync_callback(int handle, bool sync_on)
mutex_lock(&read_buffer_mutex);
else
mutex_unlock(&read_buffer_mutex);
-#if CONFIG_CPU == SH7034
- /* DMA must not interrupt during buffer move or commit_buffer copies
- * from inconsistent buflib buffer */
- if (sync_on)
- CHCR3 &= ~0x0001; /* disable the DMA (and therefore the interrupt also) */
- else
- CHCR3 |= 0x0001; /* re-enable the DMA */
-#endif
}
static ssize_t read_to_handle_ex(int fd, struct buflib_context *ctx, int handle,
@@ -781,9 +769,6 @@ void talk_force_shutup(void)
if (QUEUE_LEVEL == 0) /* has ended anyway */
return;
-#if CONFIG_CPU == SH7034
- CHCR3 &= ~0x0001; /* disable the DMA (and therefore the interrupt also) */
-#endif /* CONFIG_CPU == SH7034 */
/* search next frame boundary and continue up to there */
pos = search = mp3_get_pos();
end = buflib_get_data(&clip_ctx, queue[queue_read].handle);
@@ -814,10 +799,6 @@ void talk_force_shutup(void)
queue_write = (queue_read + 1) & QUEUE_MASK; /* will be empty after next callback */
queue[queue_read].length = sent; /* current one ends after this */
-#if CONFIG_CPU == SH7034
- DTCR3 = sent; /* let the DMA finish this frame */
- CHCR3 |= 0x0001; /* re-enable DMA */
-#endif /* CONFIG_CPU == SH7034 */
thumbnail_buf_used = 0;
return;
}
@@ -854,10 +835,6 @@ static void queue_clip(struct queue_entry *clip, bool enqueue)
if (!clip->length)
return; /* safety check */
-#if CONFIG_CPU == SH7034
- /* disable the DMA temporarily, to be safe of race condition */
- CHCR3 &= ~0x0001;
-#endif
talk_queue_lock();
queue_level = QUEUE_LEVEL; /* check old level */
qe = &queue[queue_write];
@@ -880,12 +857,6 @@ static void queue_clip(struct queue_entry *clip, bool enqueue)
curr_hd[2] = commit_buffer[3];
mp3_play_pause(true); /* kickoff audio */
}
- else
- {
-#if CONFIG_CPU == SH7034
- CHCR3 |= 0x0001; /* re-enable DMA */
-#endif
- }
need_shutup = true;