forked from len0rd/rockbox
Commit FS #7881 by Mark Arigo - enable radio on the Sansa c200. It seems that many (if not all) c200s have the radio hardware even if you can't use it with the original firmware...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14963 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
51a8a1e3f3
commit
af97e9369a
4 changed files with 23 additions and 8 deletions
|
@ -87,12 +87,12 @@ static const struct button_mapping button_context_wps[] = {
|
||||||
static const struct button_mapping button_context_settings[] = {
|
static const struct button_mapping button_context_settings[] = {
|
||||||
{ ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
|
{ ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
|
||||||
{ ACTION_SETTINGS_RESET, BUTTON_SELECT, BUTTON_NONE },
|
{ ACTION_SETTINGS_RESET, BUTTON_SELECT, BUTTON_NONE },
|
||||||
|
|
||||||
{ ACTION_SETTINGS_INC, BUTTON_UP, BUTTON_NONE },
|
|
||||||
{ ACTION_SETTINGS_INCREPEAT,BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
|
|
||||||
{ ACTION_SETTINGS_DEC, BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_SETTINGS_INC, BUTTON_UP, BUTTON_NONE },
|
||||||
{ ACTION_SETTINGS_DECREPEAT,BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_SETTINGS_INCREPEAT,BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
|
{ ACTION_SETTINGS_DEC, BUTTON_DOWN, BUTTON_NONE },
|
||||||
|
{ ACTION_SETTINGS_DECREPEAT,BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
{ ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE },
|
||||||
{ ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
@ -241,6 +241,11 @@ static const struct button_mapping button_context_radio[] = {
|
||||||
{ ACTION_FM_MODE, BUTTON_REC, BUTTON_NONE },
|
{ ACTION_FM_MODE, BUTTON_REC, BUTTON_NONE },
|
||||||
{ ACTION_FM_EXIT, BUTTON_POWER, BUTTON_NONE },
|
{ ACTION_FM_EXIT, BUTTON_POWER, BUTTON_NONE },
|
||||||
{ 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 */
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -45,7 +45,9 @@
|
||||||
#include "lang.h"
|
#include "lang.h"
|
||||||
#include "font.h"
|
#include "font.h"
|
||||||
#include "sound_menu.h"
|
#include "sound_menu.h"
|
||||||
|
#ifdef HAVE_RECORDING
|
||||||
#include "recording.h"
|
#include "recording.h"
|
||||||
|
#endif
|
||||||
#include "talk.h"
|
#include "talk.h"
|
||||||
#include "tuner.h"
|
#include "tuner.h"
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
|
@ -90,7 +92,7 @@
|
||||||
#elif CONFIG_KEYPAD == ONDIO_PAD
|
#elif CONFIG_KEYPAD == ONDIO_PAD
|
||||||
#define FM_RECORD_DBLPRE
|
#define FM_RECORD_DBLPRE
|
||||||
#define FM_RECORD
|
#define FM_RECORD
|
||||||
#elif (CONFIG_KEYPAD == SANSA_E200_PAD)
|
#elif (CONFIG_KEYPAD == SANSA_E200_PAD) || (CONFIG_KEYPAD == SANSA_C200_PAD)
|
||||||
#define FM_MENU
|
#define FM_MENU
|
||||||
#define FM_PRESET
|
#define FM_PRESET
|
||||||
#define FM_STOP
|
#define FM_STOP
|
||||||
|
|
|
@ -100,8 +100,8 @@
|
||||||
#define AB_REPEAT_ENABLE 1
|
#define AB_REPEAT_ENABLE 1
|
||||||
|
|
||||||
/* FM Tuner */
|
/* FM Tuner */
|
||||||
/* TODO: #define CONFIG_TUNER LV24020LP */
|
#define CONFIG_TUNER LV24020LP
|
||||||
/* TODO: #define HAVE_TUNER_PWR_CTRL */
|
#define HAVE_TUNER_PWR_CTRL
|
||||||
|
|
||||||
/* Define this for LCD backlight available */
|
/* Define this for LCD backlight available */
|
||||||
#define HAVE_BACKLIGHT
|
#define HAVE_BACKLIGHT
|
||||||
|
|
|
@ -82,7 +82,11 @@ bool tuner_power_nolock(bool status)
|
||||||
if (status)
|
if (status)
|
||||||
{
|
{
|
||||||
/* init mystery amplification device */
|
/* init mystery amplification device */
|
||||||
|
#if defined(SANSA_E200)
|
||||||
outl(inl(0x70000084) | 0x1, 0x70000084);
|
outl(inl(0x70000084) | 0x1, 0x70000084);
|
||||||
|
#else /* SANSA_C200 */
|
||||||
|
DEV_INIT &= ~0x800;
|
||||||
|
#endif
|
||||||
udelay(5);
|
udelay(5);
|
||||||
|
|
||||||
/* When power up, host should initialize the 3-wire bus
|
/* When power up, host should initialize the 3-wire bus
|
||||||
|
@ -113,7 +117,11 @@ bool tuner_power_nolock(bool status)
|
||||||
GPIOH_ENABLE &= ~((1 << 5) | (1 << 3) | (1 << 4));
|
GPIOH_ENABLE &= ~((1 << 5) | (1 << 3) | (1 << 4));
|
||||||
|
|
||||||
/* turn off mystery amplification device */
|
/* turn off mystery amplification device */
|
||||||
|
#if defined (SANSA_E200)
|
||||||
outl(inl(0x70000084) & ~0x1, 0x70000084);
|
outl(inl(0x70000084) & ~0x1, 0x70000084);
|
||||||
|
#else
|
||||||
|
DEV_INIT |= 0x800;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
powered = status;
|
powered = status;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue