From c1f1d9140407757fab16c418eed09f5517c649d7 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Tue, 11 Jan 2022 13:58:41 +0000 Subject: FiiO M3K: audio recording Recording works now, although I'm sure there will be a few things that need fine-tuning. A major issue is that writing to the SD card creates noticable interference, which happens on the original firmware too but seems worse under Rockbox. (Since Rockbox waits until RAM fills up before writing data, the interference will only be heard on >50 MiB recordings.) Change-Id: I5561dd9668c3bdd34e92f34ef50848aef8c0b7eb --- apps/keymaps/keymap-fiiom3k.c | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/keymaps/keymap-fiiom3k.c b/apps/keymaps/keymap-fiiom3k.c index a97be0870d..337a2184cd 100644 --- a/apps/keymaps/keymap-fiiom3k.c +++ b/apps/keymaps/keymap-fiiom3k.c @@ -138,6 +138,16 @@ static const struct button_mapping button_context_settings[] = { LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) }; /* button_context_settings */ +static const struct button_mapping button_context_settings_rectrigger[] = { + {ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE}, + {ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE}, + {ACTION_SETTINGS_INCBIGSTEP, BUTTON_VOL_UP, BUTTON_NONE}, + {ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE}, + {ACTION_SETTINGS_DECREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE}, + {ACTION_SETTINGS_DECBIGSTEP, BUTTON_VOL_DOWN, BUTTON_NONE}, + LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) +}; /* button_context_settings_rectrigger */ + static const struct button_mapping button_context_settings_eq[] = { {ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE}, {ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE}, @@ -203,6 +213,33 @@ static const struct button_mapping button_context_yesnoscreen[] = { LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) }; /* button_context_yesnoscreen */ +static const struct button_mapping button_context_recscreen[] = { + {ACTION_REC_PAUSE, BUTTON_SELECT, BUTTON_NONE}, + {ACTION_REC_PAUSE, BUTTON_PLAY, BUTTON_NONE}, + {ACTION_REC_NEWFILE, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT}, + {ACTION_REC_NEWFILE, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_PLAY}, + {ACTION_STD_MENU, BUTTON_MENU, BUTTON_NONE}, + {ACTION_STD_CANCEL, BUTTON_BACK, BUTTON_NONE}, + {ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE}, + {ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE}, + {ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE}, + {ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE}, + {ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE}, + {ACTION_STD_PREV, BUTTON_SCROLL_BACK, BUTTON_NONE}, + {ACTION_STD_PREVREPEAT, BUTTON_SCROLL_BACK|BUTTON_REPEAT, BUTTON_NONE}, + {ACTION_STD_NEXT, BUTTON_SCROLL_FWD, BUTTON_NONE}, + {ACTION_STD_NEXTREPEAT, BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE}, + {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}, + {ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE}, + {ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE}, + {ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE}, + {ACTION_SETTINGS_DECREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE}, + LAST_ITEM_IN_LIST +}; /* button_context_recscreen */ + static const struct button_mapping button_context_keyboard[] = { {ACTION_KBD_UP, BUTTON_UP, BUTTON_NONE}, {ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE}, @@ -315,8 +352,9 @@ const struct button_mapping* get_context_mapping(int context) return button_context_list; case CONTEXT_SETTINGS: case CONTEXT_SETTINGS_TIME: - case CONTEXT_SETTINGS_RECTRIGGER: return button_context_settings; + case CONTEXT_SETTINGS_RECTRIGGER: + return button_context_settings_rectrigger; case CONTEXT_SETTINGS_EQ: case CONTEXT_SETTINGS_COLOURCHOOSER: return button_context_settings_eq; @@ -326,6 +364,8 @@ const struct button_mapping* get_context_mapping(int context) return button_context_pitchscreen; case CONTEXT_YESNOSCREEN: return button_context_yesnoscreen; + case CONTEXT_RECSCREEN: + return button_context_recscreen; case CONTEXT_KEYBOARD: return button_context_keyboard; case CONTEXT_USB_HID: -- cgit v1.2.3