diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2008-03-25 02:34:12 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2008-03-25 02:34:12 +0000 |
| commit | 27cf67733936abd75fcb1f8da765977cd75906ee (patch) | |
| tree | f894211a8a0c77b402dd3250b2bee2d17dcfe13f /apps/playback.c | |
| parent | bc2f8fd8f38a3e010cd67bbac358f6e9991153c6 (diff) | |
| download | rockbox-27cf67733936abd75fcb1f8da765977cd75906ee.zip rockbox-27cf67733936abd75fcb1f8da765977cd75906ee.tar.gz rockbox-27cf67733936abd75fcb1f8da765977cd75906ee.tar.bz2 rockbox-27cf67733936abd75fcb1f8da765977cd75906ee.tar.xz | |
Add a complete priority inheritance implementation to the scheduler (all mutex ownership and queue_send calls are inheritable). Priorities are differential so that dispatch depends on the runnable range of priorities. Codec priority can therefore be raised in small steps (pcmbuf updated to enable). Simplify the kernel functions to ease implementation and use the same kernel.c for both sim and target (I'm tired of maintaining two ;_). 1) Not sure if a minor audio break at first buffering issue will exist on large-sector disks (the main mutex speed issue was genuinely resolved earlier). At this point it's best dealt with at the buffering level. It seems a larger filechunk could be used again. 2) Perhaps 64-bit sims will have some minor issues (finicky) but a backroll of the code of concern there is a 5-minute job. All kernel objects become incompatible so a full rebuild and update is needed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16791 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
| -rw-r--r-- | apps/playback.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/playback.c b/apps/playback.c index 7eecd23..9005b34 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -2549,9 +2549,7 @@ void audio_init(void) to send messages. Thread creation will be delayed however so nothing starts running until ready if something yields such as talk_init. */ queue_init(&audio_queue, true); - queue_enable_queue_send(&audio_queue, &audio_queue_sender_list); queue_init(&codec_queue, false); - queue_enable_queue_send(&codec_queue, &codec_queue_sender_list); queue_init(&pcmbuf_queue, false); pcm_init(); @@ -2587,11 +2585,17 @@ void audio_init(void) codec_thread_name IF_PRIO(, PRIORITY_PLAYBACK) IF_COP(, CPU)); + queue_enable_queue_send(&codec_queue, &codec_queue_sender_list, + codec_thread_p); + audio_thread_p = create_thread(audio_thread, audio_stack, sizeof(audio_stack), CREATE_THREAD_FROZEN, - audio_thread_name IF_PRIO(, PRIORITY_SYSTEM) + audio_thread_name IF_PRIO(, PRIORITY_USER_INTERFACE) IF_COP(, CPU)); + queue_enable_queue_send(&audio_queue, &audio_queue_sender_list, + audio_thread_p); + #ifdef PLAYBACK_VOICE voice_thread_init(); #endif |