diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2009-01-21 20:51:43 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2009-01-21 20:51:43 +0000 |
commit | ae351903a65393477f061a2eb934c8d8a6a605a6 (patch) | |
tree | 277902c37c9e5ab652f4b3e4b0db3d5e692f4f55 | |
parent | f1c6c3a754a60227019d1b3e38eb721f2d696dc5 (diff) | |
download | rockbox-ae351903a65393477f061a2eb934c8d8a6a605a6.tar.gz rockbox-ae351903a65393477f061a2eb934c8d8a6a605a6.zip |
Commit stable parts of FS#9611 - Sansa Clip radio code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19813 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/keymaps/keymap-clip.c | 19 | ||||
-rw-r--r-- | firmware/export/config-clip.h | 5 | ||||
-rw-r--r-- | firmware/export/config-e200v2.h | 4 | ||||
-rw-r--r-- | firmware/export/config-fuze.h | 4 | ||||
-rw-r--r-- | firmware/target/arm/as3525/system-as3525.c | 5 |
5 files changed, 23 insertions, 14 deletions
diff --git a/apps/keymaps/keymap-clip.c b/apps/keymaps/keymap-clip.c index 5a4c990fe7..d7970a7984 100644 --- a/apps/keymaps/keymap-clip.c +++ b/apps/keymaps/keymap-clip.c | |||
@@ -218,12 +218,19 @@ static const struct button_mapping button_context_recscreen[] = { | |||
218 | 218 | ||
219 | /** FM Radio Screen **/ | 219 | /** FM Radio Screen **/ |
220 | static const struct button_mapping button_context_radio[] = { | 220 | static const struct button_mapping button_context_radio[] = { |
221 | { ACTION_FM_MENU, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE }, | 221 | /* Copied from keymap-c200.c 20081207. Feel free to suggest a better one.*/ |
222 | { ACTION_FM_PRESET, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE }, | 222 | { ACTION_NONE, BUTTON_UP, BUTTON_NONE }, |
223 | { ACTION_FM_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_NONE }, | 223 | { ACTION_FM_MENU, BUTTON_DOWN, BUTTON_NONE }, |
224 | { ACTION_FM_MODE, BUTTON_UP|BUTTON_REPEAT, BUTTON_UP }, | 224 | { ACTION_FM_PRESET, BUTTON_SELECT, BUTTON_NONE }, |
225 | { ACTION_FM_EXIT, BUTTON_DOWN|BUTTON_REL, BUTTON_NONE }, | 225 | { ACTION_FM_STOP, BUTTON_UP|BUTTON_REPEAT, BUTTON_UP }, |
226 | { ACTION_FM_PLAY, BUTTON_UP|BUTTON_REL, BUTTON_UP }, | 226 | { ACTION_FM_MODE, BUTTON_HOME, BUTTON_NONE }, |
227 | { ACTION_FM_EXIT, BUTTON_POWER|BUTTON_REL, BUTTON_POWER }, | ||
228 | { ACTION_FM_PLAY, BUTTON_UP|BUTTON_REL, BUTTON_UP }, | ||
229 | { ACTION_SETTINGS_INC, BUTTON_VOL_UP, BUTTON_NONE }, | ||
230 | { ACTION_SETTINGS_INCREPEAT,BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, | ||
231 | { ACTION_SETTINGS_DEC, BUTTON_VOL_DOWN, BUTTON_NONE }, | ||
232 | { ACTION_SETTINGS_DECREPEAT,BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, | ||
233 | |||
227 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) | 234 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) |
228 | }; /* button_context_radio */ | 235 | }; /* button_context_radio */ |
229 | 236 | ||
diff --git a/firmware/export/config-clip.h b/firmware/export/config-clip.h index 63b4fd8617..da8acf2fdf 100644 --- a/firmware/export/config-clip.h +++ b/firmware/export/config-clip.h | |||
@@ -20,13 +20,12 @@ | |||
20 | #define REC_FREQ_DEFAULT REC_FREQ_22 /* Default is not 44.1kHz */ | 20 | #define REC_FREQ_DEFAULT REC_FREQ_22 /* Default is not 44.1kHz */ |
21 | #define REC_SAMPR_DEFAULT SAMPR_22 | 21 | #define REC_SAMPR_DEFAULT SAMPR_22 |
22 | 22 | ||
23 | #endif | ||
23 | 24 | ||
24 | /* Define bitmask of input sources - recordable bitmask can be defined | 25 | /* Define bitmask of input sources - recordable bitmask can be defined |
25 | explicitly if different */ | 26 | explicitly if different */ |
26 | #define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO) | 27 | #define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO) |
27 | 28 | ||
28 | #endif | ||
29 | |||
30 | /* define this if you have a bitmap LCD display */ | 29 | /* define this if you have a bitmap LCD display */ |
31 | #define HAVE_LCD_BITMAP | 30 | #define HAVE_LCD_BITMAP |
32 | 31 | ||
@@ -106,10 +105,8 @@ | |||
106 | #define AB_REPEAT_ENABLE 1 | 105 | #define AB_REPEAT_ENABLE 1 |
107 | 106 | ||
108 | /* FM Tuner */ | 107 | /* FM Tuner */ |
109 | #if 0 /* disabled since there is no driver (yet) */ | ||
110 | #define CONFIG_TUNER SI4700 /* in fact SI4702 but let's hope it's compatible */ | 108 | #define CONFIG_TUNER SI4700 /* in fact SI4702 but let's hope it's compatible */ |
111 | //#define HAVE_TUNER_PWR_CTRL | 109 | //#define HAVE_TUNER_PWR_CTRL |
112 | #endif | ||
113 | 110 | ||
114 | /* Define this for LCD backlight available */ | 111 | /* Define this for LCD backlight available */ |
115 | #define HAVE_BACKLIGHT | 112 | #define HAVE_BACKLIGHT |
diff --git a/firmware/export/config-e200v2.h b/firmware/export/config-e200v2.h index 5b6ac5ff48..564916aea0 100644 --- a/firmware/export/config-e200v2.h +++ b/firmware/export/config-e200v2.h | |||
@@ -17,10 +17,10 @@ | |||
17 | #define REC_FREQ_DEFAULT REC_FREQ_22 /* Default is not 44.1kHz */ | 17 | #define REC_FREQ_DEFAULT REC_FREQ_22 /* Default is not 44.1kHz */ |
18 | #define REC_SAMPR_DEFAULT SAMPR_22 | 18 | #define REC_SAMPR_DEFAULT SAMPR_22 |
19 | 19 | ||
20 | #endif | ||
20 | /* Define bitmask of input sources - recordable bitmask can be defined | 21 | /* Define bitmask of input sources - recordable bitmask can be defined |
21 | explicitly if different */ | 22 | explicitly if different */ |
22 | #define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO) | 23 | #define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO) |
23 | #endif | ||
24 | 24 | ||
25 | /* define this if you have a bitmap LCD display */ | 25 | /* define this if you have a bitmap LCD display */ |
26 | #define HAVE_LCD_BITMAP | 26 | #define HAVE_LCD_BITMAP |
@@ -99,7 +99,7 @@ | |||
99 | #define AB_REPEAT_ENABLE 1 | 99 | #define AB_REPEAT_ENABLE 1 |
100 | 100 | ||
101 | /* FM Tuner - suspected to be the SI4702 */ | 101 | /* FM Tuner - suspected to be the SI4702 */ |
102 | //#define CONFIG_TUNER SI4700 | 102 | #define CONFIG_TUNER SI4700 |
103 | /* #define HAVE_TUNER_PWR_CTRL */ | 103 | /* #define HAVE_TUNER_PWR_CTRL */ |
104 | 104 | ||
105 | /* Define this for LCD backlight available */ | 105 | /* Define this for LCD backlight available */ |
diff --git a/firmware/export/config-fuze.h b/firmware/export/config-fuze.h index e79abb19f2..3e5880775b 100644 --- a/firmware/export/config-fuze.h +++ b/firmware/export/config-fuze.h | |||
@@ -19,8 +19,8 @@ | |||
19 | 19 | ||
20 | /* Define bitmask of input sources - recordable bitmask can be defined | 20 | /* Define bitmask of input sources - recordable bitmask can be defined |
21 | explicitly if different */ | 21 | explicitly if different */ |
22 | #define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO) | ||
23 | #endif | 22 | #endif |
23 | #define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO) | ||
24 | 24 | ||
25 | /* define this if you have a bitmap LCD display */ | 25 | /* define this if you have a bitmap LCD display */ |
26 | #define HAVE_LCD_BITMAP | 26 | #define HAVE_LCD_BITMAP |
@@ -99,7 +99,7 @@ | |||
99 | #define AB_REPEAT_ENABLE 1 | 99 | #define AB_REPEAT_ENABLE 1 |
100 | 100 | ||
101 | /* FM Tuner - suspected to be the SI4702 */ | 101 | /* FM Tuner - suspected to be the SI4702 */ |
102 | //#define CONFIG_TUNER SI4700 | 102 | #define CONFIG_TUNER SI4700 |
103 | /* #define HAVE_TUNER_PWR_CTRL */ | 103 | /* #define HAVE_TUNER_PWR_CTRL */ |
104 | 104 | ||
105 | /* Define this for LCD backlight available */ | 105 | /* Define this for LCD backlight available */ |
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c index 9b075feb8f..26c806efc7 100644 --- a/firmware/target/arm/as3525/system-as3525.c +++ b/firmware/target/arm/as3525/system-as3525.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "ascodec-target.h" | 26 | #include "ascodec-target.h" |
27 | #include "dma-target.h" | 27 | #include "dma-target.h" |
28 | #include "clock-target.h" | 28 | #include "clock-target.h" |
29 | #include "fmradio_i2c.h" | ||
29 | 30 | ||
30 | #define default_interrupt(name) \ | 31 | #define default_interrupt(name) \ |
31 | extern __attribute__((weak,alias("UIRQ"))) void name (void) | 32 | extern __attribute__((weak,alias("UIRQ"))) void name (void) |
@@ -263,6 +264,10 @@ void system_init(void) | |||
263 | * We don't need the power button in the bootloader. */ | 264 | * We don't need the power button in the bootloader. */ |
264 | ascodec_init(); | 265 | ascodec_init(); |
265 | ascodec_write(AS3514_CVDD_DCDC3, ascodec_read(AS3514_CVDD_DCDC3) & (1<<2)); | 266 | ascodec_write(AS3514_CVDD_DCDC3, ascodec_read(AS3514_CVDD_DCDC3) & (1<<2)); |
267 | |||
268 | #ifdef CONFIG_TUNER | ||
269 | fmradio_i2c_init(); | ||
270 | #endif | ||
266 | #endif /* !BOOTLOADER */ | 271 | #endif /* !BOOTLOADER */ |
267 | 272 | ||
268 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | 273 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ |