diff options
author | Szymon Dziok <b0hoon@o2.pl> | 2014-06-17 23:13:15 +0000 |
---|---|---|
committer | Szymon Dziok <b0hoon@o2.pl> | 2014-06-18 18:06:17 +0000 |
commit | eacd76cb80db12adcce74980e69d116911a8cde7 (patch) | |
tree | 239344e3f9053a75eeab4253f39f6b1dae749aa6 /apps | |
parent | 0c3dca1f33596cb10345601de32d681ed6ece972 (diff) |
Radio and radio recording for Samsung YH-920.
There is no simple method to detect radio through the 3-wire interface, so it's
not implemented for the YH-925 for now. YH-920 always has a radio.
Change-Id: Iea484d752915fcd40dbbbd7dbbf13e81aaf548db
Diffstat (limited to 'apps')
-rw-r--r-- | apps/keymaps/keymap-yh8xx_yh9xx.c | 27 | ||||
-rw-r--r-- | apps/radio/radio.c | 3 |
2 files changed, 28 insertions, 2 deletions
diff --git a/apps/keymaps/keymap-yh8xx_yh9xx.c b/apps/keymaps/keymap-yh8xx_yh9xx.c index 7125134d8c..03f6f8bcff 100644 --- a/apps/keymaps/keymap-yh8xx_yh9xx.c +++ b/apps/keymaps/keymap-yh8xx_yh9xx.c @@ -296,6 +296,27 @@ static const struct button_mapping button_context_keyboard[] = { LAST_ITEM_IN_LIST }; /* button_context_keyboard */ +#if CONFIG_TUNER +static const struct button_mapping button_context_radio[] = { + { ACTION_FM_MENU, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT }, + { ACTION_FM_EXIT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_FM_PLAY, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY }, + { ACTION_FM_STOP, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_FM_PRESET, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT}, + { ACTION_FM_MODE, BUTTON_RIGHT|BUTTON_REPEAT, 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_DECREPEAT,BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_STD_NEXT, BUTTON_FFWD, BUTTON_NONE }, + { ACTION_STD_NEXTREPEAT, BUTTON_FFWD|BUTTON_REPEAT, BUTTON_NONE }, + { ACTION_STD_PREV, BUTTON_REW, BUTTON_NONE }, + { ACTION_STD_PREVREPEAT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE }, + + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) +}; /* button_context_radio */ +#endif + const struct button_mapping* get_context_mapping(int context) { switch (context) @@ -342,6 +363,10 @@ const struct button_mapping* get_context_mapping(int context) return button_context_recscreen; case CONTEXT_KEYBOARD: return button_context_keyboard; - } +#if CONFIG_TUNER + case CONTEXT_FM: + return button_context_radio; +#endif + } return button_context_standard; } diff --git a/apps/radio/radio.c b/apps/radio/radio.c index fdbcc89641..0365b6aafa 100644 --- a/apps/radio/radio.c +++ b/apps/radio/radio.c @@ -91,7 +91,8 @@ #define FM_RECORD #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || (CONFIG_KEYPAD == SANSA_C200_PAD) ||\ - (CONFIG_KEYPAD == SANSA_FUZE_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) + (CONFIG_KEYPAD == SANSA_FUZE_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) ||\ + (CONFIG_KEYPAD == SAMSUNG_YH920_PAD) #define FM_MENU #define FM_PRESET #define FM_STOP |