mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 10:07:38 -04:00
surfansf28: More fixes:
* Use 16-bit audio output * More audio tweaks (mute on startup, working volume control) * Treat the rotary input as a scroll wheel (works now) To-dos: * Better global keymap (incorporate touchscreen) * Turn on plugins and define the approximately eight bajillion keymaps * Still have some audible pops when we turn on, need to figure out why * Default Cabbiev2 comes off as rather crappy on this device ...I don't know how much work I will do on this thing, as the limited number of physical controls (and a lack of a line-out) mean I'd never want to use this thing myself. Change-Id: I37229d92766495219ee989d9ae48b5ed79bd45f5
This commit is contained in:
parent
9b39c96ac7
commit
0ebfab36ba
6 changed files with 26 additions and 34 deletions
|
@ -52,10 +52,8 @@ static const struct button_mapping button_context_wps[] =
|
|||
{ ACTION_WPS_STOPSEEK, BUTTON_NEXT | BUTTON_REL, BUTTON_NEXT | BUTTON_REPEAT },
|
||||
{ ACTION_WPS_SKIPNEXT, BUTTON_NEXT | BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_WPS_SKIPPREV, BUTTON_PREV | BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLUP, BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLUP, BUTTON_RIGHT | BUTTON_REPEAT , BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_LEFT | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLUP, BUTTON_SCROLL_FWD, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_SCROLL_BACK, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST
|
||||
};
|
||||
|
@ -63,10 +61,8 @@ static const struct button_mapping button_context_wps[] =
|
|||
|
||||
static const struct button_mapping button_context_list[] =
|
||||
{
|
||||
{ ACTION_LIST_VOLUP, BUTTON_RIGHT | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_LIST_VOLUP, BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_LIST_VOLDOWN, BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_LIST_VOLDOWN, BUTTON_LEFT | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLUP, BUTTON_SCROLL_FWD, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_SCROLL_BACK, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
|
||||
};
|
||||
|
@ -92,10 +88,8 @@ static const struct button_mapping button_context_listtree_scroll_without_combo[
|
|||
|
||||
static const struct button_mapping button_context_settings[] =
|
||||
{
|
||||
{ ACTION_SETTINGS_INC, BUTTON_RIGHT | BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_DEC, BUTTON_LEFT | BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_DECREPEAT, BUTTON_LEFT | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_INC, BUTTON_SCROLL_FWD, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_DEC, BUTTON_SCROLL_BACK, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
|
||||
};
|
||||
|
@ -118,7 +112,6 @@ static const struct button_mapping button_context_mainmenu[] =
|
|||
static const struct button_mapping button_context_yesno[] =
|
||||
{
|
||||
{ ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE },
|
||||
{ ACTION_YESNO_ACCEPT, BUTTON_LEFT, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
|
||||
};
|
||||
|
@ -138,14 +131,10 @@ static const struct button_mapping button_context_eq[] =
|
|||
|
||||
static const struct button_mapping button_context_keyboard[] =
|
||||
{
|
||||
{ ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_KBD_LEFT, BUTTON_LEFT | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_KBD_RIGHT, BUTTON_RIGHT | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_CURSOR_LEFT, BUTTON_PLAY | BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_KBD_CURSOR_LEFT, BUTTON_PLAY | BUTTON_LEFT | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_PLAY | BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_PLAY | BUTTON_RIGHT | BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_LEFT, BUTTON_SCROLL_BACK, BUTTON_NONE },
|
||||
{ ACTION_KBD_RIGHT, BUTTON_SCROLL_FWD, BUTTON_NONE },
|
||||
{ ACTION_KBD_CURSOR_LEFT, BUTTON_PLAY | BUTTON_SCROLL_BACK, BUTTON_NONE },
|
||||
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_PLAY | BUTTON_SCROLL_FWD, BUTTON_NONE },
|
||||
{ ACTION_KBD_SELECT, BUTTON_PLAY, BUTTON_NONE },
|
||||
{ ACTION_KBD_UP, BUTTON_PREV, BUTTON_NONE },
|
||||
{ ACTION_KBD_UP, BUTTON_PREV | BUTTON_REPEAT, BUTTON_NONE },
|
||||
|
@ -177,8 +166,8 @@ static const struct button_mapping button_context_quickscreen[] =
|
|||
|
||||
static const struct button_mapping button_context_pitchscreen[] =
|
||||
{
|
||||
{ ACTION_PS_INC_SMALL, BUTTON_RIGHT | BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_PS_DEC_SMALL, BUTTON_LEFT |BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_PS_INC_SMALL, BUTTON_SCROLL_FWD, BUTTON_NONE },
|
||||
{ ACTION_PS_DEC_SMALL, BUTTON_SCROLL_BACK, BUTTON_NONE },
|
||||
{ ACTION_PS_EXIT, BUTTON_POWER, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||
|
|
|
@ -98,6 +98,8 @@
|
|||
#define BUTTON_UP BUTTON_PREV
|
||||
#define BUTTON_DOWN BUTTON_NEXT
|
||||
#define BUTTON_SELECT BUTTON_PLAY
|
||||
#define BUTTON_LEFT BUTTON_SCROLL_BACK
|
||||
#define BUTTON_RIGHT BUTTON_SCROLL_FWD
|
||||
#include "bitmaps/hibyicon.h"
|
||||
#else
|
||||
#error "must define ICON_WIDTH/HEIGHT"
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
//#define HAVE_HOTKEY
|
||||
|
||||
#define HAVE_HEADPHONE_DETECTION
|
||||
#define HAVE_SCROLLWHEEL
|
||||
#define NO_BUTTON_LR
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
#define HAVE_BUTTON_DATA
|
||||
|
@ -40,7 +42,6 @@
|
|||
|
||||
/* Audio codec */
|
||||
#define HAVE_SURFANS_LINUX_CODEC
|
||||
#define HAVE_ALSA_32BIT
|
||||
|
||||
/* We don't have hardware controls */
|
||||
#define HAVE_SW_TONE_CONTROLS
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
AUDIOHW_SETTING(VOLUME, "dB", 1, 5, -102*10, 0, -30*10)
|
||||
#endif
|
||||
|
||||
// We want this, but the codec takes over a second to unmute!
|
||||
//#define AUDIOHW_MUTE_ON_STOP
|
||||
|
||||
#define AUDIOHW_MUTE_ON_SRATE_CHANGE
|
||||
//#define AUDIOHW_NEEDS_INITIAL_UNMUTE
|
||||
|
||||
AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 4, 0)
|
||||
#define AUDIOHW_HAVE_SHORT2_ROLL_OFF
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@ int button_map(int keycode)
|
|||
switch(keycode)
|
||||
{
|
||||
case KEY_LEFT:
|
||||
return BUTTON_LEFT;
|
||||
return BUTTON_SCROLL_BACK;
|
||||
case KEY_RIGHT:
|
||||
return BUTTON_RIGHT;
|
||||
return BUTTON_SCROLL_FWD;
|
||||
case KEY_PLAYPAUSE:
|
||||
return BUTTON_PLAY;
|
||||
case KEY_NEXTSONG:
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
#define BUTTON_PREV 0x00000002
|
||||
#define BUTTON_NEXT 0x00000004
|
||||
#define BUTTON_PLAY 0x00000008
|
||||
#define BUTTON_LEFT 0x00000010
|
||||
#define BUTTON_RIGHT 0x00000020
|
||||
#define BUTTON_SCROLL_BACK 0x00000010
|
||||
#define BUTTON_SCROLL_FWD 0x00000020
|
||||
#define BUTTON_MAIN 0x0000003f
|
||||
|
||||
#define BUTTON_TOUCH 0x00000040
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue