diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playback.c | 13 | ||||
-rw-r--r-- | apps/playback.h | 1 | ||||
-rw-r--r-- | apps/radio/radio.c | 2 | ||||
-rw-r--r-- | apps/recorder/recording.c | 2 |
4 files changed, 4 insertions, 14 deletions
diff --git a/apps/playback.c b/apps/playback.c index 9fd25b975d..dbe28dd1c4 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -183,8 +183,7 @@ static struct albumart_slot | |||
183 | /* Buffer and thread state tracking */ | 183 | /* Buffer and thread state tracking */ |
184 | static enum filling_state | 184 | static enum filling_state |
185 | { | 185 | { |
186 | STATE_BOOT = 0, /* audio thread is not ready yet */ | 186 | STATE_IDLE = 0, /* audio is stopped: nothing to do */ |
187 | STATE_IDLE, /* audio is stopped: nothing to do */ | ||
188 | STATE_FILLING, /* adding tracks to the buffer */ | 187 | STATE_FILLING, /* adding tracks to the buffer */ |
189 | STATE_FULL, /* can't add any more tracks */ | 188 | STATE_FULL, /* can't add any more tracks */ |
190 | STATE_END_OF_PLAYLIST, /* all remaining tracks have been added */ | 189 | STATE_END_OF_PLAYLIST, /* all remaining tracks have been added */ |
@@ -194,7 +193,7 @@ static enum filling_state | |||
194 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | 193 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
195 | STATE_USB, /* USB mode, ignore most messages */ | 194 | STATE_USB, /* USB mode, ignore most messages */ |
196 | #endif | 195 | #endif |
197 | } filling = STATE_BOOT; | 196 | } filling = STATE_IDLE; |
198 | 197 | ||
199 | /* Track info - holds information about each track in the buffer */ | 198 | /* Track info - holds information about each track in the buffer */ |
200 | struct track_info | 199 | struct track_info |
@@ -2917,8 +2916,6 @@ static void audio_thread(void) | |||
2917 | 2916 | ||
2918 | pcm_postinit(); | 2917 | pcm_postinit(); |
2919 | 2918 | ||
2920 | filling = STATE_IDLE; | ||
2921 | |||
2922 | while (1) | 2919 | while (1) |
2923 | { | 2920 | { |
2924 | switch (filling) | 2921 | switch (filling) |
@@ -3717,12 +3714,6 @@ unsigned long audio_prev_elapsed(void) | |||
3717 | return prev_track_elapsed; | 3714 | return prev_track_elapsed; |
3718 | } | 3715 | } |
3719 | 3716 | ||
3720 | /* Is the audio thread ready to accept commands? */ | ||
3721 | bool audio_is_thread_ready(void) | ||
3722 | { | ||
3723 | return filling != STATE_BOOT; | ||
3724 | } | ||
3725 | |||
3726 | /* Return total file buffer length after accounting for the talk buf */ | 3717 | /* Return total file buffer length after accounting for the talk buf */ |
3727 | size_t audio_get_filebuflen(void) | 3718 | size_t audio_get_filebuflen(void) |
3728 | { | 3719 | { |
diff --git a/apps/playback.h b/apps/playback.h index 793055f98c..6e57c03fad 100644 --- a/apps/playback.h +++ b/apps/playback.h | |||
@@ -70,7 +70,6 @@ struct bufopen_bitmap_data { | |||
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | /* Functions */ | 72 | /* Functions */ |
73 | bool audio_is_thread_ready(void); | ||
74 | int audio_track_count(void); | 73 | int audio_track_count(void); |
75 | long audio_filebufused(void); | 74 | long audio_filebufused(void); |
76 | void audio_pre_ff_rewind(void); | 75 | void audio_pre_ff_rewind(void); |
diff --git a/apps/radio/radio.c b/apps/radio/radio.c index 1a77709f9c..4524707289 100644 --- a/apps/radio/radio.c +++ b/apps/radio/radio.c | |||
@@ -418,7 +418,7 @@ void radio_screen(void) | |||
418 | /* turn on radio */ | 418 | /* turn on radio */ |
419 | #if CONFIG_CODEC == SWCODEC | 419 | #if CONFIG_CODEC == SWCODEC |
420 | /* This should be done before touching audio settings */ | 420 | /* This should be done before touching audio settings */ |
421 | while (!audio_is_thread_ready()) | 421 | while (!pcm_is_initialized()) |
422 | sleep(0); | 422 | sleep(0); |
423 | 423 | ||
424 | audio_set_input_source(AUDIO_SRC_FMRADIO, | 424 | audio_set_input_source(AUDIO_SRC_FMRADIO, |
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 453b2fc42d..d706899b1c 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -1074,7 +1074,7 @@ bool recording_screen(bool no_source) | |||
1074 | 1074 | ||
1075 | #if CONFIG_CODEC == SWCODEC | 1075 | #if CONFIG_CODEC == SWCODEC |
1076 | /* This should be done before touching audio settings */ | 1076 | /* This should be done before touching audio settings */ |
1077 | while (!audio_is_thread_ready()) | 1077 | while (!pcm_is_initialized()) |
1078 | sleep(0); | 1078 | sleep(0); |
1079 | 1079 | ||
1080 | /* recording_menu gets messed up: so prevent manus talking */ | 1080 | /* recording_menu gets messed up: so prevent manus talking */ |