mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 05:35:20 -05:00
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
This commit is contained in:
parent
f1c6c3a754
commit
ae351903a6
5 changed files with 23 additions and 14 deletions
|
|
@ -218,12 +218,19 @@ static const struct button_mapping button_context_recscreen[] = {
|
||||||
|
|
||||||
/** FM Radio Screen **/
|
/** FM Radio Screen **/
|
||||||
static const struct button_mapping button_context_radio[] = {
|
static const struct button_mapping button_context_radio[] = {
|
||||||
{ ACTION_FM_MENU, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE },
|
/* Copied from keymap-c200.c 20081207. Feel free to suggest a better one.*/
|
||||||
{ ACTION_FM_PRESET, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_NONE, BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_FM_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_FM_MENU, BUTTON_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_FM_MODE, BUTTON_UP|BUTTON_REPEAT, BUTTON_UP },
|
{ ACTION_FM_PRESET, BUTTON_SELECT, BUTTON_NONE },
|
||||||
{ ACTION_FM_EXIT, BUTTON_DOWN|BUTTON_REL, BUTTON_NONE },
|
{ ACTION_FM_STOP, BUTTON_UP|BUTTON_REPEAT, BUTTON_UP },
|
||||||
|
{ ACTION_FM_MODE, BUTTON_HOME, BUTTON_NONE },
|
||||||
|
{ ACTION_FM_EXIT, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
|
||||||
{ ACTION_FM_PLAY, BUTTON_UP|BUTTON_REL, BUTTON_UP },
|
{ ACTION_FM_PLAY, BUTTON_UP|BUTTON_REL, BUTTON_UP },
|
||||||
|
{ ACTION_SETTINGS_INC, BUTTON_VOL_UP, BUTTON_NONE },
|
||||||
|
{ ACTION_SETTINGS_INCREPEAT,BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_SETTINGS_DEC, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||||
|
{ ACTION_SETTINGS_DECREPEAT,BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
|
||||||
}; /* button_context_radio */
|
}; /* button_context_radio */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,13 +20,12 @@
|
||||||
#define REC_FREQ_DEFAULT REC_FREQ_22 /* Default is not 44.1kHz */
|
#define REC_FREQ_DEFAULT REC_FREQ_22 /* Default is not 44.1kHz */
|
||||||
#define REC_SAMPR_DEFAULT SAMPR_22
|
#define REC_SAMPR_DEFAULT SAMPR_22
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define bitmask of input sources - recordable bitmask can be defined
|
/* Define bitmask of input sources - recordable bitmask can be defined
|
||||||
explicitly if different */
|
explicitly if different */
|
||||||
#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO)
|
#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO)
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* define this if you have a bitmap LCD display */
|
/* define this if you have a bitmap LCD display */
|
||||||
#define HAVE_LCD_BITMAP
|
#define HAVE_LCD_BITMAP
|
||||||
|
|
||||||
|
|
@ -106,10 +105,8 @@
|
||||||
#define AB_REPEAT_ENABLE 1
|
#define AB_REPEAT_ENABLE 1
|
||||||
|
|
||||||
/* FM Tuner */
|
/* FM Tuner */
|
||||||
#if 0 /* disabled since there is no driver (yet) */
|
|
||||||
#define CONFIG_TUNER SI4700 /* in fact SI4702 but let's hope it's compatible */
|
#define CONFIG_TUNER SI4700 /* in fact SI4702 but let's hope it's compatible */
|
||||||
//#define HAVE_TUNER_PWR_CTRL
|
//#define HAVE_TUNER_PWR_CTRL
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define this for LCD backlight available */
|
/* Define this for LCD backlight available */
|
||||||
#define HAVE_BACKLIGHT
|
#define HAVE_BACKLIGHT
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,10 @@
|
||||||
#define REC_FREQ_DEFAULT REC_FREQ_22 /* Default is not 44.1kHz */
|
#define REC_FREQ_DEFAULT REC_FREQ_22 /* Default is not 44.1kHz */
|
||||||
#define REC_SAMPR_DEFAULT SAMPR_22
|
#define REC_SAMPR_DEFAULT SAMPR_22
|
||||||
|
|
||||||
|
#endif
|
||||||
/* Define bitmask of input sources - recordable bitmask can be defined
|
/* Define bitmask of input sources - recordable bitmask can be defined
|
||||||
explicitly if different */
|
explicitly if different */
|
||||||
#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO)
|
#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* define this if you have a bitmap LCD display */
|
/* define this if you have a bitmap LCD display */
|
||||||
#define HAVE_LCD_BITMAP
|
#define HAVE_LCD_BITMAP
|
||||||
|
|
@ -99,7 +99,7 @@
|
||||||
#define AB_REPEAT_ENABLE 1
|
#define AB_REPEAT_ENABLE 1
|
||||||
|
|
||||||
/* FM Tuner - suspected to be the SI4702 */
|
/* FM Tuner - suspected to be the SI4702 */
|
||||||
//#define CONFIG_TUNER SI4700
|
#define CONFIG_TUNER SI4700
|
||||||
/* #define HAVE_TUNER_PWR_CTRL */
|
/* #define HAVE_TUNER_PWR_CTRL */
|
||||||
|
|
||||||
/* Define this for LCD backlight available */
|
/* Define this for LCD backlight available */
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@
|
||||||
|
|
||||||
/* Define bitmask of input sources - recordable bitmask can be defined
|
/* Define bitmask of input sources - recordable bitmask can be defined
|
||||||
explicitly if different */
|
explicitly if different */
|
||||||
#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO)
|
|
||||||
#endif
|
#endif
|
||||||
|
#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO)
|
||||||
|
|
||||||
/* define this if you have a bitmap LCD display */
|
/* define this if you have a bitmap LCD display */
|
||||||
#define HAVE_LCD_BITMAP
|
#define HAVE_LCD_BITMAP
|
||||||
|
|
@ -99,7 +99,7 @@
|
||||||
#define AB_REPEAT_ENABLE 1
|
#define AB_REPEAT_ENABLE 1
|
||||||
|
|
||||||
/* FM Tuner - suspected to be the SI4702 */
|
/* FM Tuner - suspected to be the SI4702 */
|
||||||
//#define CONFIG_TUNER SI4700
|
#define CONFIG_TUNER SI4700
|
||||||
/* #define HAVE_TUNER_PWR_CTRL */
|
/* #define HAVE_TUNER_PWR_CTRL */
|
||||||
|
|
||||||
/* Define this for LCD backlight available */
|
/* Define this for LCD backlight available */
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
#include "ascodec-target.h"
|
#include "ascodec-target.h"
|
||||||
#include "dma-target.h"
|
#include "dma-target.h"
|
||||||
#include "clock-target.h"
|
#include "clock-target.h"
|
||||||
|
#include "fmradio_i2c.h"
|
||||||
|
|
||||||
#define default_interrupt(name) \
|
#define default_interrupt(name) \
|
||||||
extern __attribute__((weak,alias("UIRQ"))) void name (void)
|
extern __attribute__((weak,alias("UIRQ"))) void name (void)
|
||||||
|
|
@ -263,6 +264,10 @@ void system_init(void)
|
||||||
* We don't need the power button in the bootloader. */
|
* We don't need the power button in the bootloader. */
|
||||||
ascodec_init();
|
ascodec_init();
|
||||||
ascodec_write(AS3514_CVDD_DCDC3, ascodec_read(AS3514_CVDD_DCDC3) & (1<<2));
|
ascodec_write(AS3514_CVDD_DCDC3, ascodec_read(AS3514_CVDD_DCDC3) & (1<<2));
|
||||||
|
|
||||||
|
#ifdef CONFIG_TUNER
|
||||||
|
fmradio_i2c_init();
|
||||||
|
#endif
|
||||||
#endif /* !BOOTLOADER */
|
#endif /* !BOOTLOADER */
|
||||||
|
|
||||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue