summaryrefslogtreecommitdiffstats
path: root/apps/radio/radio.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2018-12-22 22:07:19 -0500
committerSolomon Peachy <pizza@shaftnet.org>2018-12-24 00:01:02 +0100
commit7a718fc27dfea78bb212b4fd492334f4f142594e (patch)
treef53f3c16a2815f65aca00408cab67f27b6fc27eb /apps/radio/radio.c
parentd636c5e8233c7f0a71a38f9e92546675e171b282 (diff)
downloadrockbox-7a718fc27dfea78bb212b4fd492334f4f142594e.tar.gz
rockbox-7a718fc27dfea78bb212b4fd492334f4f142594e.tar.bz2
rockbox-7a718fc27dfea78bb212b4fd492334f4f142594e.zip
Do not touch FM tuner when it is turned off
Credit to Igor Poretsky Change-Id: Ie9e61740f87f3b56d0b602cd431757262a6ed808
Diffstat (limited to 'apps/radio/radio.c')
-rw-r--r--apps/radio/radio.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/apps/radio/radio.c b/apps/radio/radio.c
index 49534ee3dc..6055f645eb 100644
--- a/apps/radio/radio.c
+++ b/apps/radio/radio.c
@@ -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