summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2018-12-22 20:10:52 -0500
committerSolomon Peachy <pizza@shaftnet.org>2018-12-22 20:12:10 -0500
commiteee3f0ce79eb0b2ae2f272e814e10e6e9524c381 (patch)
treec51bf7d9c97e28dcea57f05369fd682b72d1445a /firmware
parent6416c22b45a6cd0a86b6e6a27573b2c263d83353 (diff)
downloadrockbox-eee3f0ce79eb0b2ae2f272e814e10e6e9524c381.tar.gz
rockbox-eee3f0ce79eb0b2ae2f272e814e10e6e9524c381.tar.bz2
rockbox-eee3f0ce79eb0b2ae2f272e814e10e6e9524c381.zip
FS#12610 - Clip+ Ticking Noise Fixed in Radio
Patch taken from Igor Poretsky's tree. Original clip-radio-tick.patch modified to acts only when screen is deemed, or when recording, in order to preserve indicators functionality. Change-Id: I62afb24a0dad7ad2ecc9272c24810b37f032408d
Diffstat (limited to 'firmware')
-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: