mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
Move radio power handling from apps/ to drivers.
Remove direct calls to tuner_power(...) in apps/ and let the driver manage tuner power with the RADIO_SLEEP setting. Change-Id: I37cd0472e60db5d666dae1b9fe4755dd65c03edd Reviewed-on: http://gerrit.rockbox.org/84 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
This commit is contained in:
parent
58b226edc5
commit
906e90eb7b
8 changed files with 39 additions and 41 deletions
|
|
@ -192,9 +192,6 @@ void radio_start(void)
|
|||
/* clear flag before any yielding */
|
||||
radio_status &= ~FMRADIO_START_PAUSED;
|
||||
|
||||
if(radio_status == FMRADIO_OFF)
|
||||
tuner_power(true);
|
||||
|
||||
curr_freq = global_status.last_frequency * fmr->freq_step + fmr->freq_min;
|
||||
|
||||
tuner_set(RADIO_SLEEP, 0); /* wake up the tuner */
|
||||
|
|
@ -246,9 +243,6 @@ void radio_pause(void)
|
|||
}
|
||||
|
||||
tuner_set(RADIO_MUTE, 1);
|
||||
/* For si4700: 2==this is really 'pause'. other tuners treat it
|
||||
* like 'bool'. */
|
||||
tuner_set(RADIO_SLEEP, 2);
|
||||
|
||||
radio_status = FMRADIO_PAUSED;
|
||||
} /* radio_pause */
|
||||
|
|
@ -258,7 +252,6 @@ static void radio_off(void)
|
|||
tuner_set(RADIO_MUTE, 1);
|
||||
tuner_set(RADIO_SLEEP, 1); /* low power mode, if available */
|
||||
radio_status = FMRADIO_OFF;
|
||||
tuner_power(false); /* status update, power off if avail. */
|
||||
}
|
||||
|
||||
void radio_stop(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue