summaryrefslogtreecommitdiffstats
path: root/firmware/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/tuner/rda5802.c8
-rw-r--r--firmware/drivers/tuner/si4700.c10
2 files changed, 11 insertions, 7 deletions
diff --git a/firmware/drivers/tuner/rda5802.c b/firmware/drivers/tuner/rda5802.c
index 7b9bea721d..377bdd1e6f 100644
--- a/firmware/drivers/tuner/rda5802.c
+++ b/firmware/drivers/tuner/rda5802.c
@@ -30,6 +30,8 @@
#include "tuner.h" /* tuner abstraction interface */
#include "fmradio.h"
#include "fmradio_i2c.h" /* physical interface driver */
+#include "audio.h"
+#include "backlight.h"
#define SEEK_THRESHOLD 0x16
@@ -328,15 +330,15 @@ int rda5802_get(int setting)
break;
case RADIO_TUNED:
- val = rda5802_tuned();
+ val = ((audio_status() & AUDIO_STATUS_RECORD) || !is_backlight_on(true)) ? 1 : rda5802_tuned();
break;
case RADIO_STEREO:
- val = rda5802_st();
+ val = ((audio_status() & AUDIO_STATUS_RECORD) || !is_backlight_on(true)) ? 1 : rda5802_st();
break;
case RADIO_RSSI:
- val = rda5802_rssi();
+ val = ((audio_status() & AUDIO_STATUS_RECORD) || !is_backlight_on(true)) ? RSSI_MAX : rda5802_rssi();
break;
case RADIO_RSSI_MIN:
diff --git a/firmware/drivers/tuner/si4700.c b/firmware/drivers/tuner/si4700.c
index af5795a83f..88ff6c69f7 100644
--- a/firmware/drivers/tuner/si4700.c
+++ b/firmware/drivers/tuner/si4700.c
@@ -31,6 +31,8 @@
#ifdef HAVE_RDS_CAP
#include "rds.h"
#endif
+#include "audio.h"
+#include "backlight.h"
#if defined(SANSA_CLIP) || defined(SANSA_E200V2) || defined(SANSA_FUZE) || defined(SANSA_C200V2) \
|| defined(SANSA_FUZEPLUS)
@@ -510,15 +512,15 @@ int si4700_get(int setting)
break;
case RADIO_TUNED:
- val = si4700_tuned();
+ val = ((audio_status() & AUDIO_STATUS_RECORD) || !is_backlight_on(true)) ? 1 : si4700_tuned();
break;
case RADIO_STEREO:
- val = si4700_st();
+ val = ((audio_status() & AUDIO_STATUS_RECORD) || !is_backlight_on(true)) ? 1 : si4700_st();
break;
-
+
case RADIO_RSSI:
- val = STATUSRSSI_RSSIr(si4700_read_reg(STATUSRSSI));
+ val = ((audio_status() & AUDIO_STATUS_RECORD) || !is_backlight_on(true)) ? RADIO_RSSI_MAX : STATUSRSSI_RSSIr(si4700_read_reg(STATUSRSSI));
break;
case RADIO_RSSI_MIN: