summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2004-10-17 17:49:30 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2004-10-17 17:49:30 +0000
commitca45869a8866756c5c11cba307a7ff62566afb22 (patch)
tree13d334fe9750b8021befccdc1fa354c75f7033c3
parent1120ef50c72920bdcd20ccd42477473b98fda452 (diff)
downloadrockbox-ca45869a8866756c5c11cba307a7ff62566afb22.tar.gz
rockbox-ca45869a8866756c5c11cba307a7ff62566afb22.zip
fix: the presence detection needs to power up the tuner first
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5299 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/recorder/radio.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c
index 45a02d5332..9eac63a520 100644
--- a/apps/recorder/radio.c
+++ b/apps/recorder/radio.c
@@ -124,7 +124,16 @@ void radio_stop(void)
124 124
125bool radio_hardware_present(void) 125bool radio_hardware_present(void)
126{ 126{
127#ifdef HAVE_TUNER_PWR_CTRL
128 bool ret;
129 int fmstatus = radio_get_status(); /* get current state */
130 radio_set_status(FMRADIO_PLAYING); /* power it up */
131 ret = radio_get(RADIO_PRESENT);
132 radio_set_status(fmstatus); /* restore previous state */
133 return ret;
134#else
127 return radio_get(RADIO_PRESENT); 135 return radio_get(RADIO_PRESENT);
136#endif
128} 137}
129 138
130static int find_preset(int freq) 139static int find_preset(int freq)