summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2010-05-26 04:51:24 +0000
committerMichael Sevakis <jethead71@rockbox.org>2010-05-26 04:51:24 +0000
commita8d9a03cfb3c72d36933f3a1867ada00dff0d1d5 (patch)
tree8893e8f1da225b23e7b8ba2c47aac7f0de45b55f /apps
parenteeef8f6c39e0fb3c7dc97d7e7ca2a034f79395da (diff)
downloadrockbox-a8d9a03cfb3c72d36933f3a1867ada00dff0d1d5.tar.gz
rockbox-a8d9a03cfb3c72d36933f3a1867ada00dff0d1d5.zip
SWCODEC: Wait for audio init to complete before starting radio or recording; hardware init might not be finished yet if those are the start screens.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26298 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/radio/radio.c4
-rw-r--r--apps/recorder/recording.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/apps/radio/radio.c b/apps/radio/radio.c
index 403d1ae36f..51c8982b07 100644
--- a/apps/radio/radio.c
+++ b/apps/radio/radio.c
@@ -464,6 +464,10 @@ int radio_screen(void)
464 464
465 /* turn on radio */ 465 /* turn on radio */
466#if CONFIG_CODEC == SWCODEC 466#if CONFIG_CODEC == SWCODEC
467 /* This should be done before touching audio settings */
468 while (!audio_is_thread_ready())
469 sleep(0);
470
467 audio_set_input_source(AUDIO_SRC_FMRADIO, 471 audio_set_input_source(AUDIO_SRC_FMRADIO,
468 (radio_status == FMRADIO_PAUSED) ? 472 (radio_status == FMRADIO_PAUSED) ?
469 SRCF_FMRADIO_PAUSED : SRCF_FMRADIO_PLAYING); 473 SRCF_FMRADIO_PAUSED : SRCF_FMRADIO_PLAYING);
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index 21db298184..c30098277d 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -1093,6 +1093,10 @@ bool recording_screen(bool no_source)
1093#endif 1093#endif
1094 1094
1095#if CONFIG_CODEC == SWCODEC 1095#if CONFIG_CODEC == SWCODEC
1096 /* This should be done before touching audio settings */
1097 while (!audio_is_thread_ready())
1098 sleep(0);
1099
1096 /* recording_menu gets messed up: so prevent manus talking */ 1100 /* recording_menu gets messed up: so prevent manus talking */
1097 talk_disable(true); 1101 talk_disable(true);
1098 /* audio_init_recording stops anything playing when it takes the audio 1102 /* audio_init_recording stops anything playing when it takes the audio