mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Do not touch FM tuner when it is turned off
Credit to Igor Poretsky Change-Id: Ie9e61740f87f3b56d0b602cd431757262a6ed808
This commit is contained in:
parent
d636c5e823
commit
7a718fc27d
2 changed files with 8 additions and 6 deletions
|
@ -516,7 +516,6 @@ int handle_radio_presets(void)
|
|||
curr_preset = gui_synclist_get_sel_pos(&lists);
|
||||
curr_freq = presets[curr_preset].frequency;
|
||||
next_station(0);
|
||||
remember_frequency();
|
||||
result = 1;
|
||||
break;
|
||||
case ACTION_F3:
|
||||
|
|
|
@ -333,7 +333,8 @@ void next_station(int direction)
|
|||
if (radio_status == FMRADIO_PLAYING)
|
||||
tuner_set(RADIO_MUTE, 1);
|
||||
|
||||
tuner_set(RADIO_FREQUENCY, curr_freq);
|
||||
if(radio_status != FMRADIO_OFF)
|
||||
tuner_set(RADIO_FREQUENCY, curr_freq);
|
||||
|
||||
if (radio_status == FMRADIO_PLAYING)
|
||||
tuner_set(RADIO_MUTE, 0);
|
||||
|
@ -853,17 +854,19 @@ void radio_screen(void)
|
|||
|
||||
void toggle_mono_mode(bool mono)
|
||||
{
|
||||
tuner_set(RADIO_FORCE_MONO, mono);
|
||||
if(radio_status != FMRADIO_OFF)
|
||||
tuner_set(RADIO_FORCE_MONO, mono);
|
||||
}
|
||||
|
||||
void set_radio_region(int region)
|
||||
{
|
||||
#ifdef HAVE_RADIO_REGION
|
||||
tuner_set(RADIO_REGION, region);
|
||||
if(radio_status != FMRADIO_OFF)
|
||||
tuner_set(RADIO_REGION, region);
|
||||
#else
|
||||
(void)region;
|
||||
#endif
|
||||
next_station(0);
|
||||
remember_frequency();
|
||||
(void)region;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue