summaryrefslogtreecommitdiffstats
path: root/apps/recorder
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 /apps/recorder
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
Diffstat (limited to 'apps/recorder')
-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)
bool radio_hardware_present(void)
{
+#ifdef HAVE_TUNER_PWR_CTRL
+ bool ret;
+ int fmstatus = radio_get_status(); /* get current state */
+ radio_set_status(FMRADIO_PLAYING); /* power it up */
+ ret = radio_get(RADIO_PRESENT);
+ radio_set_status(fmstatus); /* restore previous state */
+ return ret;
+#else
return radio_get(RADIO_PRESENT);
+#endif
}
static int find_preset(int freq)