1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
diff --git a/firmware/drivers/tuner/rda5802.c b/firmware/drivers/tuner/rda5802.c
index 7b9bea7..30ea6a8 100644
--- a/firmware/drivers/tuner/rda5802.c
+++ b/firmware/drivers/tuner/rda5802.c
@@ -30,6 +30,7 @@
 #include "tuner.h" /* tuner abstraction interface */
 #include "fmradio.h"
 #include "fmradio_i2c.h" /* physical interface driver */
+#include "as3525.h"
 
 #define SEEK_THRESHOLD 0x16
 
@@ -206,6 +207,8 @@ void rda5802_init(void)
         rda5802_write(8);
         sleep(HZ * 70 / 1000);
     }
+    
+    GPIOA_DIR &= ~(1 << 4);
 }
 
 static void rda5802_set_frequency(int freq)
@@ -305,6 +308,13 @@ int rda5802_set(int setting, int value)
         break;
 
     case RADIO_FORCE_MONO:
+// hack
+        if (value) {
+            rda5802_write_masked(SYSCONFIG1, 3 << 2, 0x3F);
+        } else {
+            rda5802_write_masked(SYSCONFIG1, 2 << 2, 0x3F);
+        }
+// hack end
         rda5802_write_masked(POWERCFG, value ? POWERCFG_MONO : 0,
                             POWERCFG_MONO);
         rda5802_write_cache();