diff options
Diffstat (limited to 'apps/codecs')
-rw-r--r-- | apps/codecs/mpa.c | 8 | ||||
-rw-r--r-- | apps/codecs/spc.c | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c index 7732622383..37a1afadfa 100644 --- a/apps/codecs/mpa.c +++ b/apps/codecs/mpa.c | |||
@@ -200,7 +200,7 @@ static void set_elapsed(struct mp3entry* id3) | |||
200 | static int mad_synth_thread_stack[DEFAULT_STACK_SIZE/sizeof(int)/2] IBSS_ATTR; | 200 | static int mad_synth_thread_stack[DEFAULT_STACK_SIZE/sizeof(int)/2] IBSS_ATTR; |
201 | 201 | ||
202 | static const unsigned char * const mad_synth_thread_name = "mp3dec"; | 202 | static const unsigned char * const mad_synth_thread_name = "mp3dec"; |
203 | static struct thread_entry *mad_synth_thread_p; | 203 | static unsigned int mad_synth_thread_id = 0; |
204 | 204 | ||
205 | 205 | ||
206 | static void mad_synth_thread(void) | 206 | static void mad_synth_thread(void) |
@@ -249,14 +249,14 @@ static bool mad_synth_thread_create(void) | |||
249 | ci->semaphore_init(&synth_done_sem, 1, 0); | 249 | ci->semaphore_init(&synth_done_sem, 1, 0); |
250 | ci->semaphore_init(&synth_pending_sem, 1, 0); | 250 | ci->semaphore_init(&synth_pending_sem, 1, 0); |
251 | 251 | ||
252 | mad_synth_thread_p = ci->create_thread(mad_synth_thread, | 252 | mad_synth_thread_id = ci->create_thread(mad_synth_thread, |
253 | mad_synth_thread_stack, | 253 | mad_synth_thread_stack, |
254 | sizeof(mad_synth_thread_stack), 0, | 254 | sizeof(mad_synth_thread_stack), 0, |
255 | mad_synth_thread_name | 255 | mad_synth_thread_name |
256 | IF_PRIO(, PRIORITY_PLAYBACK) | 256 | IF_PRIO(, PRIORITY_PLAYBACK) |
257 | IF_COP(, COP)); | 257 | IF_COP(, COP)); |
258 | 258 | ||
259 | if (mad_synth_thread_p == NULL) | 259 | if (mad_synth_thread_id == 0) |
260 | return false; | 260 | return false; |
261 | 261 | ||
262 | return true; | 262 | return true; |
@@ -267,7 +267,7 @@ static void mad_synth_thread_quit(void) | |||
267 | /*mop up COP thread*/ | 267 | /*mop up COP thread*/ |
268 | die=1; | 268 | die=1; |
269 | ci->semaphore_release(&synth_pending_sem); | 269 | ci->semaphore_release(&synth_pending_sem); |
270 | ci->thread_wait(mad_synth_thread_p); | 270 | ci->thread_wait(mad_synth_thread_id); |
271 | invalidate_icache(); | 271 | invalidate_icache(); |
272 | } | 272 | } |
273 | #else | 273 | #else |
diff --git a/apps/codecs/spc.c b/apps/codecs/spc.c index 380cfbdb8b..14d28dfca8 100644 --- a/apps/codecs/spc.c +++ b/apps/codecs/spc.c | |||
@@ -197,7 +197,7 @@ static int spc_emu_thread_stack[DEFAULT_STACK_SIZE/sizeof(int)] | |||
197 | CACHEALIGN_ATTR; | 197 | CACHEALIGN_ATTR; |
198 | 198 | ||
199 | static const unsigned char * const spc_emu_thread_name = "spc emu"; | 199 | static const unsigned char * const spc_emu_thread_name = "spc emu"; |
200 | static struct thread_entry *emu_thread_p; | 200 | static unsigned int emu_thread_id = 0; |
201 | 201 | ||
202 | enum | 202 | enum |
203 | { | 203 | { |
@@ -352,11 +352,11 @@ static void spc_emu_thread(void) | |||
352 | 352 | ||
353 | static bool spc_emu_start(void) | 353 | static bool spc_emu_start(void) |
354 | { | 354 | { |
355 | emu_thread_p = ci->create_thread(spc_emu_thread, spc_emu_thread_stack, | 355 | emu_thread_id = ci->create_thread(spc_emu_thread, spc_emu_thread_stack, |
356 | sizeof(spc_emu_thread_stack), CREATE_THREAD_FROZEN, | 356 | sizeof(spc_emu_thread_stack), CREATE_THREAD_FROZEN, |
357 | spc_emu_thread_name IF_PRIO(, PRIORITY_PLAYBACK), COP); | 357 | spc_emu_thread_name IF_PRIO(, PRIORITY_PLAYBACK), COP); |
358 | 358 | ||
359 | if (emu_thread_p == NULL) | 359 | if (emu_thread_id == 0) |
360 | return false; | 360 | return false; |
361 | 361 | ||
362 | /* Initialize audio queue as full to prevent emu thread from trying to run the | 362 | /* Initialize audio queue as full to prevent emu thread from trying to run the |
@@ -368,7 +368,7 @@ static bool spc_emu_start(void) | |||
368 | sample_queue.tail = 2; | 368 | sample_queue.tail = 2; |
369 | 369 | ||
370 | /* Start it running */ | 370 | /* Start it running */ |
371 | ci->thread_thaw(emu_thread_p); | 371 | ci->thread_thaw(emu_thread_id); |
372 | return true; | 372 | return true; |
373 | } | 373 | } |
374 | 374 | ||
@@ -382,10 +382,10 @@ static inline int load_spc_buffer(uint8_t *buf, size_t size) | |||
382 | 382 | ||
383 | static inline void spc_emu_quit(void) | 383 | static inline void spc_emu_quit(void) |
384 | { | 384 | { |
385 | if (emu_thread_p != NULL) { | 385 | if (emu_thread_id != 0) { |
386 | emu_thread_send_msg(SPC_EMU_QUIT, 0); | 386 | emu_thread_send_msg(SPC_EMU_QUIT, 0); |
387 | /* Wait for emu thread to be killed */ | 387 | /* Wait for emu thread to be killed */ |
388 | ci->thread_wait(emu_thread_p); | 388 | ci->thread_wait(emu_thread_id); |
389 | invalidate_icache(); | 389 | invalidate_icache(); |
390 | } | 390 | } |
391 | } | 391 | } |