diff options
Diffstat (limited to 'firmware/mpeg.c')
-rw-r--r-- | firmware/mpeg.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index df0cbbad12..61b0a22d87 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c | |||
@@ -761,7 +761,6 @@ void rec_tick(void) | |||
761 | { | 761 | { |
762 | prerecord_timeout = current_tick + HZ; | 762 | prerecord_timeout = current_tick + HZ; |
763 | queue_post(&mpeg_queue, MPEG_PRERECORDING_TICK, 0); | 763 | queue_post(&mpeg_queue, MPEG_PRERECORDING_TICK, 0); |
764 | wake_up_thread(); | ||
765 | } | 764 | } |
766 | } | 765 | } |
767 | else | 766 | else |
@@ -773,7 +772,6 @@ void rec_tick(void) | |||
773 | { | 772 | { |
774 | saving_status = BUFFER_FULL; | 773 | saving_status = BUFFER_FULL; |
775 | queue_post(&mpeg_queue, MPEG_SAVE_DATA, 0); | 774 | queue_post(&mpeg_queue, MPEG_SAVE_DATA, 0); |
776 | wake_up_thread(); | ||
777 | } | 775 | } |
778 | } | 776 | } |
779 | } | 777 | } |
@@ -894,8 +892,6 @@ static void transfer_end(unsigned char** ppbuf, int* psize) | |||
894 | *psize = 0; /* no more transfer */ | 892 | *psize = 0; /* no more transfer */ |
895 | } | 893 | } |
896 | } | 894 | } |
897 | |||
898 | wake_up_thread(); | ||
899 | } | 895 | } |
900 | 896 | ||
901 | static struct trackdata *add_track_to_tag_list(const char *filename) | 897 | static struct trackdata *add_track_to_tag_list(const char *filename) |
@@ -2119,8 +2115,7 @@ void audio_init_playback(void) | |||
2119 | queue_post(&mpeg_queue, MPEG_INIT_PLAYBACK, NULL); | 2115 | queue_post(&mpeg_queue, MPEG_INIT_PLAYBACK, NULL); |
2120 | 2116 | ||
2121 | while(!init_playback_done) | 2117 | while(!init_playback_done) |
2122 | sleep_thread(); | 2118 | sleep_thread(1); |
2123 | wake_up_thread(); | ||
2124 | } | 2119 | } |
2125 | 2120 | ||
2126 | 2121 | ||
@@ -2134,8 +2129,7 @@ void audio_init_recording(unsigned int buffer_offset) | |||
2134 | queue_post(&mpeg_queue, MPEG_INIT_RECORDING, NULL); | 2129 | queue_post(&mpeg_queue, MPEG_INIT_RECORDING, NULL); |
2135 | 2130 | ||
2136 | while(!init_recording_done) | 2131 | while(!init_recording_done) |
2137 | sleep_thread(); | 2132 | sleep_thread(1); |
2138 | wake_up_thread(); | ||
2139 | } | 2133 | } |
2140 | 2134 | ||
2141 | static void init_recording(void) | 2135 | static void init_recording(void) |
@@ -2886,10 +2880,10 @@ void audio_init(void) | |||
2886 | 2880 | ||
2887 | #ifndef SIMULATOR | 2881 | #ifndef SIMULATOR |
2888 | audiobuflen = audiobufend - audiobuf; | 2882 | audiobuflen = audiobufend - audiobuf; |
2889 | queue_init(&mpeg_queue); | 2883 | queue_init(&mpeg_queue, true); |
2890 | #endif /* !SIMULATOR */ | 2884 | #endif /* !SIMULATOR */ |
2891 | create_thread(mpeg_thread, mpeg_stack, | 2885 | create_thread(mpeg_thread, mpeg_stack, |
2892 | sizeof(mpeg_stack), mpeg_thread_name); | 2886 | sizeof(mpeg_stack), mpeg_thread_name IF_PRIO(, PRIORITY_SYSTEM)); |
2893 | 2887 | ||
2894 | memset(trackdata, sizeof(trackdata), 0); | 2888 | memset(trackdata, sizeof(trackdata), 0); |
2895 | 2889 | ||