diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2013-05-31 02:41:02 -0400 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2013-05-31 03:20:35 -0400 |
commit | 5857c44017a1641fce7f00da7f16c143daacbaf6 (patch) | |
tree | b8a7ff134977ee8dd6b25b5591f4eb81172f74ab /apps/main.c | |
parent | df6e1bcce5071e02b5cd46736bff87ca0dcceffe (diff) | |
download | rockbox-5857c44017a1641fce7f00da7f16c143daacbaf6.tar.gz rockbox-5857c44017a1641fce7f00da7f16c143daacbaf6.zip |
Refactor audio thread to run both recording and playback.
Eliminates the pcmrec thread and keeps playback and recording engine
operation mutually-exclusive.
audio_thread.c contains the audio thread which branches to the
correct engine depending upon the request. It also handles the main
audio initialization.
Moves pcm_init into main.c just before dsp_init because I don't want
that one in audio_init in the new file.
(Also makes revision df6e1bc pointless ;)
Change-Id: Ifc1db24404e6d8dd9ac42d9f4dfbc207aa9a26e1
Diffstat (limited to 'apps/main.c')
-rw-r--r-- | apps/main.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/apps/main.c b/apps/main.c index 6b6566c7ca..57257aff66 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -87,6 +87,7 @@ | |||
87 | #endif | 87 | #endif |
88 | 88 | ||
89 | #if (CONFIG_CODEC == SWCODEC) | 89 | #if (CONFIG_CODEC == SWCODEC) |
90 | #include "audio_thread.h" | ||
90 | #include "playback.h" | 91 | #include "playback.h" |
91 | #include "tdspeed.h" | 92 | #include "tdspeed.h" |
92 | #endif | 93 | #endif |
@@ -386,6 +387,7 @@ static void init(void) | |||
386 | 387 | ||
387 | storage_init(); | 388 | storage_init(); |
388 | #if CONFIG_CODEC == SWCODEC | 389 | #if CONFIG_CODEC == SWCODEC |
390 | pcm_init(); | ||
389 | dsp_init(); | 391 | dsp_init(); |
390 | #endif | 392 | #endif |
391 | settings_reset(); | 393 | settings_reset(); |
@@ -422,10 +424,6 @@ static void init(void) | |||
422 | 424 | ||
423 | audio_init(); | 425 | audio_init(); |
424 | 426 | ||
425 | #if (CONFIG_CODEC == SWCODEC) && defined(HAVE_RECORDING) | ||
426 | pcm_rec_init(); | ||
427 | #endif | ||
428 | |||
429 | settings_apply_skins(); | 427 | settings_apply_skins(); |
430 | } | 428 | } |
431 | 429 | ||
@@ -641,6 +639,7 @@ static void init(void) | |||
641 | } | 639 | } |
642 | 640 | ||
643 | #if CONFIG_CODEC == SWCODEC | 641 | #if CONFIG_CODEC == SWCODEC |
642 | pcm_init(); | ||
644 | dsp_init(); | 643 | dsp_init(); |
645 | #endif | 644 | #endif |
646 | 645 | ||
@@ -727,10 +726,6 @@ static void init(void) | |||
727 | audio_init(); | 726 | audio_init(); |
728 | CHART("<audio_init"); | 727 | CHART("<audio_init"); |
729 | 728 | ||
730 | #if (CONFIG_CODEC == SWCODEC) && defined(HAVE_RECORDING) | ||
731 | pcm_rec_init(); | ||
732 | #endif | ||
733 | |||
734 | /* runtime database has to be initialized after audio_init() */ | 729 | /* runtime database has to be initialized after audio_init() */ |
735 | cpu_boost(false); | 730 | cpu_boost(false); |
736 | 731 | ||