summaryrefslogtreecommitdiff
path: root/firmware/mpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/mpeg.c')
-rw-r--r--firmware/mpeg.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index 0518dd24e0..6fe60c99c9 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -845,6 +845,7 @@ static void dma_tick(void)
845 { 845 {
846 saving = true; 846 saving = true;
847 queue_post(&mpeg_queue, MPEG_SAVE_DATA, 0); 847 queue_post(&mpeg_queue, MPEG_SAVE_DATA, 0);
848 wake_up_thread();
848 } 849 }
849 } 850 }
850 } 851 }
@@ -948,6 +949,7 @@ void DEI3(void)
948 } 949 }
949 950
950 CHCR3 &= ~0x0002; /* Clear DMA interrupt */ 951 CHCR3 &= ~0x0002; /* Clear DMA interrupt */
952 wake_up_thread();
951} 953}
952 954
953#ifdef HAVE_MAS3587F 955#ifdef HAVE_MAS3587F
@@ -1791,9 +1793,10 @@ static void mpeg_thread(void)
1791 } 1793 }
1792 else 1794 else
1793 { 1795 {
1796 /* This doesn't look neccessary...
1794 yield(); 1797 yield();
1795 if(!queue_empty(&mpeg_queue)) 1798 if(!queue_empty(&mpeg_queue))
1796 { 1799 {*/
1797 queue_wait(&mpeg_queue, &ev); 1800 queue_wait(&mpeg_queue, &ev);
1798 switch(ev.id) 1801 switch(ev.id)
1799 { 1802 {
@@ -1897,7 +1900,7 @@ static void mpeg_thread(void)
1897 init_playback_done = true; 1900 init_playback_done = true;
1898 break; 1901 break;
1899 } 1902 }
1900 } 1903 /*}*/
1901 } 1904 }
1902#endif 1905#endif
1903 } 1906 }
@@ -1974,7 +1977,8 @@ void mpeg_init_recording(void)
1974 queue_post(&mpeg_queue, MPEG_INIT_RECORDING, NULL); 1977 queue_post(&mpeg_queue, MPEG_INIT_RECORDING, NULL);
1975 1978
1976 while(!init_recording_done) 1979 while(!init_recording_done)
1977 yield(); 1980 sleep_thread();
1981 wake_up_thread();
1978} 1982}
1979 1983
1980void mpeg_init_playback(void) 1984void mpeg_init_playback(void)
@@ -1983,7 +1987,8 @@ void mpeg_init_playback(void)
1983 queue_post(&mpeg_queue, MPEG_INIT_PLAYBACK, NULL); 1987 queue_post(&mpeg_queue, MPEG_INIT_PLAYBACK, NULL);
1984 1988
1985 while(!init_playback_done) 1989 while(!init_playback_done)
1986 yield(); 1990 sleep_thread();
1991 wake_up_thread();
1987} 1992}
1988 1993
1989static void init_recording(void) 1994static void init_recording(void)