diff options
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/config.h | 1 | ||||
-rw-r--r-- | firmware/export/config/sansaclipplus.h | 2 | ||||
-rw-r--r-- | firmware/export/fmclipplus.h | 54 | ||||
-rw-r--r-- | firmware/export/si4700.h | 1 | ||||
-rw-r--r-- | firmware/export/tuner.h | 6 |
5 files changed, 63 insertions, 1 deletions
diff --git a/firmware/export/config.h b/firmware/export/config.h index a2ba3f9f98..7f77514116 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -41,6 +41,7 @@ | |||
41 | #define TEA5760 0x10 /* Philips */ | 41 | #define TEA5760 0x10 /* Philips */ |
42 | #define LV240000 0x20 /* Sanyo */ | 42 | #define LV240000 0x20 /* Sanyo */ |
43 | #define IPOD_REMOTE_TUNER 0x40 /* Apple */ | 43 | #define IPOD_REMOTE_TUNER 0x40 /* Apple */ |
44 | #define FMCLIPPLUS 0x80 /* Mystery SiLabs FM tuner in some clip+ */ | ||
44 | 45 | ||
45 | /* CONFIG_CODEC */ | 46 | /* CONFIG_CODEC */ |
46 | #define MAS3587F 3587 | 47 | #define MAS3587F 3587 |
diff --git a/firmware/export/config/sansaclipplus.h b/firmware/export/config/sansaclipplus.h index 9382b22cbd..883a71ea21 100644 --- a/firmware/export/config/sansaclipplus.h +++ b/firmware/export/config/sansaclipplus.h | |||
@@ -123,7 +123,7 @@ | |||
123 | #define AB_REPEAT_ENABLE 1 | 123 | #define AB_REPEAT_ENABLE 1 |
124 | 124 | ||
125 | /* FM Tuner */ | 125 | /* FM Tuner */ |
126 | #define CONFIG_TUNER SI4700 /* in fact SI4702 */ | 126 | #define CONFIG_TUNER (SI4700|FMCLIPPLUS) /* in fact SI4702 */ |
127 | //#define HAVE_TUNER_PWR_CTRL | 127 | //#define HAVE_TUNER_PWR_CTRL |
128 | 128 | ||
129 | /* Define this for LCD backlight available */ | 129 | /* Define this for LCD backlight available */ |
diff --git a/firmware/export/fmclipplus.h b/firmware/export/fmclipplus.h new file mode 100644 index 0000000000..20961f47be --- /dev/null +++ b/firmware/export/fmclipplus.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * $Id$ | ||
10 | * | ||
11 | * Tuner header for the Silicon Labs Mystery radio chip in some Sansa Clip+ | ||
12 | * | ||
13 | * Copyright (C) 2010 Bertrik Sikken | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or | ||
16 | * modify it under the terms of the GNU General Public License | ||
17 | * as published by the Free Software Foundation; either version 2 | ||
18 | * of the License, or (at your option) any later version. | ||
19 | * | ||
20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
21 | * KIND, either express or implied. | ||
22 | * | ||
23 | ****************************************************************************/ | ||
24 | |||
25 | #ifndef _FMCLIPPLUS_H_ | ||
26 | #define _FMCLIPPLUS_H_ | ||
27 | |||
28 | #define HAVE_RADIO_REGION | ||
29 | |||
30 | struct fmclipplus_region_data | ||
31 | { | ||
32 | unsigned char deemphasis; /* 0: 75us, 1: 50us */ | ||
33 | unsigned char band; /* 0: us/europe, 1: japan */ | ||
34 | } __attribute__((packed)); | ||
35 | |||
36 | extern const struct fmclipplus_region_data fmclipplus_region_data[TUNER_NUM_REGIONS]; | ||
37 | |||
38 | struct fmclipplus_dbg_info | ||
39 | { | ||
40 | uint16_t regs[32]; /* Read registers */ | ||
41 | }; | ||
42 | |||
43 | bool fmclipplus_detect(void); | ||
44 | void fmclipplus_init(void); | ||
45 | int fmclipplus_set(int setting, int value); | ||
46 | int fmclipplus_get(int setting); | ||
47 | void fmclipplus_dbg_info(struct fmclipplus_dbg_info *nfo); | ||
48 | |||
49 | #ifndef CONFIG_TUNER_MULTI | ||
50 | #define tuner_set fmclipplus_set | ||
51 | #define tuner_get fmclipplus_get | ||
52 | #endif | ||
53 | |||
54 | #endif /* _FMCLIPPLUS_H_ */ | ||
diff --git a/firmware/export/si4700.h b/firmware/export/si4700.h index fcc71cb282..d6c4e73b6e 100644 --- a/firmware/export/si4700.h +++ b/firmware/export/si4700.h | |||
@@ -41,6 +41,7 @@ struct si4700_dbg_info | |||
41 | uint16_t regs[16]; /* Read registers */ | 41 | uint16_t regs[16]; /* Read registers */ |
42 | }; | 42 | }; |
43 | 43 | ||
44 | bool si4700_detect(void); | ||
44 | void si4700_init(void); | 45 | void si4700_init(void); |
45 | int si4700_set(int setting, int value); | 46 | int si4700_set(int setting, int value); |
46 | int si4700_get(int setting); | 47 | int si4700_get(int setting); |
diff --git a/firmware/export/tuner.h b/firmware/export/tuner.h index 03b6bd79d1..9101bb9241 100644 --- a/firmware/export/tuner.h +++ b/firmware/export/tuner.h | |||
@@ -99,6 +99,7 @@ char* tuner_get_rds_info(int setting); | |||
99 | #else | 99 | #else |
100 | 100 | ||
101 | #ifdef CONFIG_TUNER_MULTI | 101 | #ifdef CONFIG_TUNER_MULTI |
102 | extern int tuner_detect_type(void); | ||
102 | extern int (*tuner_set)(int setting, int value); | 103 | extern int (*tuner_set)(int setting, int value); |
103 | extern int (*tuner_get)(int setting); | 104 | extern int (*tuner_get)(int setting); |
104 | #endif /* CONFIG_TUNER_MULTI */ | 105 | #endif /* CONFIG_TUNER_MULTI */ |
@@ -131,6 +132,11 @@ extern int (*tuner_get)(int setting); | |||
131 | #include "si4700.h" | 132 | #include "si4700.h" |
132 | #endif | 133 | #endif |
133 | 134 | ||
135 | /* Silicon Labs mystery radio chip in some Sansa Clip+ */ | ||
136 | #if (CONFIG_TUNER & FMCLIPPLUS) | ||
137 | #include "fmclipplus.h" | ||
138 | #endif | ||
139 | |||
134 | /* Apple remote tuner */ | 140 | /* Apple remote tuner */ |
135 | #if (CONFIG_TUNER & IPOD_REMOTE_TUNER) | 141 | #if (CONFIG_TUNER & IPOD_REMOTE_TUNER) |
136 | #include "ipod_remote_tuner.h" | 142 | #include "ipod_remote_tuner.h" |