diff options
| author | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-10-17 17:49:30 +0000 |
|---|---|---|
| committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-10-17 17:49:30 +0000 |
| commit | ca45869a8866756c5c11cba307a7ff62566afb22 (patch) | |
| tree | 13d334fe9750b8021befccdc1fa354c75f7033c3 | |
| parent | 1120ef50c72920bdcd20ccd42477473b98fda452 (diff) | |
| download | rockbox-ca45869a8866756c5c11cba307a7ff62566afb22.zip rockbox-ca45869a8866756c5c11cba307a7ff62566afb22.tar.gz rockbox-ca45869a8866756c5c11cba307a7ff62566afb22.tar.bz2 rockbox-ca45869a8866756c5c11cba307a7ff62566afb22.tar.xz | |
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.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c index 45a02d5..9eac63a 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) |