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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
diff --git a/firmware/drivers/tuner/si4700.c b/firmware/drivers/tuner/si4700.c
index be9b6a4..3a49d6e 100644
--- a/firmware/drivers/tuner/si4700.c
+++ b/firmware/drivers/tuner/si4700.c
@@ -282,29 +282,6 @@ static inline int si4700_st(void)
 }
 #endif

-void si4700_init(void)
-{
-    tuner_power(true);
-
-    /* read all registers */
-    si4700_read(16);
-    
-    /* check device id */
-    if (cache[DEVICEID] == 0x1242)
-    {
-        tuner_present = true;
-
-#ifdef USE_INTERNAL_OSCILLATOR
-        /* Enable the internal oscillator
-          (Si4702-16 needs this register to be initialised to 0x100) */
-        si4700_write_set(TEST1, TEST1_XOSCEN | 0x100);
-        sleep(HZ/2);
-#endif    
-    }
-
-    tuner_power(false);
-}
-
 static void si4700_sleep(int snooze)
 {
     if (snooze)
@@ -339,6 +316,32 @@ static void si4700_sleep(int snooze)
     }
 }

+void si4700_init(void)
+{
+    tuner_power(true);
+
+    /* read all registers */
+    si4700_read(16);
+    si4700_sleep(0);
+
+    /* check device id */
+    if (cache[DEVICEID] == 0x1242)
+    {
+        tuner_present = true;
+
+#ifdef USE_INTERNAL_OSCILLATOR
+        /* Enable the internal oscillator
+          (Si4702-16 needs this register to be initialised to 0x100) */
+        si4700_write_set(TEST1, TEST1_XOSCEN | 0x100);
+        sleep(HZ/2);
+#endif
+    }
+
+    si4700_sleep(1);
+
+    tuner_power(false);
+}
+
 static void si4700_set_frequency(int freq)
 {
     static const unsigned int spacings[3] =