mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-07-10 13:29:52 -04:00
[Bugfix] Autoscan when radio off hangs player, record static
Clipzip, ClipPlus other devices may be similar Autoscan from the main menu and the device hangs at scanning 88.1 try to record with no station set and it just records static Change-Id: I59fe17dde80736e4fae8445c0aea7fcf5e476317
This commit is contained in:
parent
81962808a2
commit
ad64336e69
2 changed files with 14 additions and 0 deletions
|
|
@ -39,6 +39,9 @@ static int fm_recording_screen(void)
|
|||
{
|
||||
bool ret;
|
||||
|
||||
if (radio_get_current_frequency() == 0)
|
||||
return 0;
|
||||
|
||||
/* switch recording source to FMRADIO for the duration */
|
||||
int rec_source = global_settings.rec_source;
|
||||
global_settings.rec_source = AUDIO_SRC_FMRADIO;
|
||||
|
|
|
|||
|
|
@ -679,6 +679,17 @@ int presets_scan(void *viewports)
|
|||
struct fmstation_buf *presets = presets_get();
|
||||
if (presets == NULL)
|
||||
return 1;
|
||||
if(get_radio_status() == FMRADIO_OFF)
|
||||
{
|
||||
audio_stop();
|
||||
/* turn on radio */
|
||||
/* This should be done before touching audio settings */
|
||||
while (!pcm_is_initialized())
|
||||
sleep(0);
|
||||
|
||||
audio_set_input_source(AUDIO_SRC_FMRADIO, SRCF_FMRADIO_PLAYING);
|
||||
}
|
||||
|
||||
const struct fm_region_data * const fmr =
|
||||
&fm_region_data[global_settings.fm_region];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue