summaryrefslogtreecommitdiffstats
path: root/apps/codec_thread.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-09-01 07:32:07 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-09-01 07:32:07 +0000
commit6d3a6f71d1f8bce9ab5e7b90ceab6a17271174b8 (patch)
tree3769e0c1036de254182761c48d25d9a079d36295 /apps/codec_thread.c
parent67f52495593ea66660bd3b63c1bb7bfbe7e5cef1 (diff)
downloadrockbox-6d3a6f71d1f8bce9ab5e7b90ceab6a17271174b8.tar.gz
rockbox-6d3a6f71d1f8bce9ab5e7b90ceab6a17271174b8.tar.bz2
rockbox-6d3a6f71d1f8bce9ab5e7b90ceab6a17271174b8.zip
Remove obsolete init cruft from audio system because of diminished dependencies. All talk/voice dependency in playback.c should be imminently removable.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30401 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codec_thread.c')
-rw-r--r--apps/codec_thread.c51
1 files changed, 21 insertions, 30 deletions
diff --git a/apps/codec_thread.c b/apps/codec_thread.c
index 90cf07be9f..0498858be2 100644
--- a/apps/codec_thread.c
+++ b/apps/codec_thread.c
@@ -411,25 +411,6 @@ static bool codec_loop_track_callback(void)
return global_settings.repeat_mode == REPEAT_ONE;
}
-/* Initialize codec API */
-void codec_init_codec_api(void)
-{
- ci.dsp = (struct dsp_config *)dsp_configure(NULL, DSP_MYDSP,
- CODEC_IDX_AUDIO);
- ci.codec_get_buffer = codec_get_buffer_callback;
- ci.pcmbuf_insert = codec_pcmbuf_insert_callback;
- ci.set_elapsed = audio_codec_update_elapsed;
- ci.read_filebuf = codec_filebuf_callback;
- ci.request_buffer = codec_request_buffer_callback;
- ci.advance_buffer = codec_advance_buffer_callback;
- ci.seek_buffer = codec_seek_buffer_callback;
- ci.seek_complete = codec_seek_complete_callback;
- ci.set_offset = audio_codec_update_offset;
- ci.configure = codec_configure_callback;
- ci.get_command = codec_get_command_callback;
- ci.loop_track = codec_loop_track_callback;
-}
-
/** --- CODEC THREAD --- **/
@@ -626,25 +607,35 @@ static void NORETURN_ATTR codec_thread(void)
/** --- Miscellaneous external interfaces -- **/
-/* Create the codec thread and init kernel objects */
-void make_codec_thread(void)
-{
+/* Initialize playback's codec interface */
+void codec_thread_init(void)
+{
+ /* Init API */
+ ci.dsp = (struct dsp_config *)dsp_configure(NULL, DSP_MYDSP,
+ CODEC_IDX_AUDIO);
+ ci.codec_get_buffer = codec_get_buffer_callback;
+ ci.pcmbuf_insert = codec_pcmbuf_insert_callback;
+ ci.set_elapsed = audio_codec_update_elapsed;
+ ci.read_filebuf = codec_filebuf_callback;
+ ci.request_buffer = codec_request_buffer_callback;
+ ci.advance_buffer = codec_advance_buffer_callback;
+ ci.seek_buffer = codec_seek_buffer_callback;
+ ci.seek_complete = codec_seek_complete_callback;
+ ci.set_offset = audio_codec_update_offset;
+ ci.configure = codec_configure_callback;
+ ci.get_command = codec_get_command_callback;
+ ci.loop_track = codec_loop_track_callback;
+
+ /* Init threading */
queue_init(&codec_queue, false);
codec_thread_id = create_thread(
- codec_thread, codec_stack, sizeof(codec_stack),
- CREATE_THREAD_FROZEN,
+ codec_thread, codec_stack, sizeof(codec_stack), 0,
codec_thread_name IF_PRIO(, PRIORITY_PLAYBACK)
IF_COP(, CPU));
queue_enable_queue_send(&codec_queue, &codec_queue_sender_list,
codec_thread_id);
}
-/* Unfreeze the codec thread */
-void codec_thread_resume(void)
-{
- thread_thaw(codec_thread_id);
-}
-
#ifdef HAVE_PRIORITY_SCHEDULING
/* Obtain codec thread's current priority */
int codec_thread_get_priority(void)