summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-01-14 01:05:21 +0000
committerAidan MacDonald <amachronic@protonmail.com>2022-01-29 15:13:54 -0500
commit127bb1b6e1ad67a24a527261f6eb7053c142ed26 (patch)
treee19ce7c1f05c43f92703066e8b344c5cb7985270
parentc1f1d9140407757fab16c418eed09f5517c649d7 (diff)
downloadrockbox-127bb1b6e1ad67a24a527261f6eb7053c142ed26.tar.gz
rockbox-127bb1b6e1ad67a24a527261f6eb7053c142ed26.zip
FiiO M3K: remove volume setting on rec. screen
This controls the playback volume, which is not useful for the M3K because it's impossible to play back and record at the same time. Change-Id: I5b0931c22b484f3ff6441d6c88079f18ec70f7f8
-rw-r--r--apps/recorder/recording.c12
-rw-r--r--firmware/export/config/fiiom3k.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index 7215812f49..b973d9750c 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -739,7 +739,9 @@ static void trigger_listener(int trigger_status)
739/* Stuff for drawing the screen */ 739/* Stuff for drawing the screen */
740 740
741enum rec_list_items_stereo { 741enum rec_list_items_stereo {
742#ifndef HAVE_RECORDING_WITHOUT_MONITORING
742 ITEM_VOLUME, 743 ITEM_VOLUME,
744#endif
743 ITEM_GAIN, 745 ITEM_GAIN,
744#if defined(HAVE_LINE_REC) || defined(HAVE_FMRADIO_REC) 746#if defined(HAVE_LINE_REC) || defined(HAVE_FMRADIO_REC)
745 ITEM_GAIN_L, 747 ITEM_GAIN_L,
@@ -771,12 +773,14 @@ static const char* reclist_get_name(int selected_item, void * data,
771 773
772 switch (listid_to_enum[selected_item]) 774 switch (listid_to_enum[selected_item])
773 { 775 {
776#ifndef HAVE_RECORDING_WITHOUT_MONITORING
774 case ITEM_VOLUME: 777 case ITEM_VOLUME:
775 snprintf(buffer, buffer_len, "%s: %s", str(LANG_VOLUME), 778 snprintf(buffer, buffer_len, "%s: %s", str(LANG_VOLUME),
776 fmt_gain(SOUND_VOLUME, 779 fmt_gain(SOUND_VOLUME,
777 global_settings.volume, 780 global_settings.volume,
778 buf2, sizeof(buf2))); 781 buf2, sizeof(buf2)));
779 break; 782 break;
783#endif
780 case ITEM_GAIN: 784 case ITEM_GAIN:
781 switch(global_settings.rec_source) { 785 switch(global_settings.rec_source) {
782#ifdef HAVE_MIC_REC 786#ifdef HAVE_MIC_REC
@@ -1155,7 +1159,9 @@ bool recording_screen(bool no_source)
1155#ifdef HAVE_SPDIF_REC 1159#ifdef HAVE_SPDIF_REC
1156 if(global_settings.rec_source == AUDIO_SRC_SPDIF) 1160 if(global_settings.rec_source == AUDIO_SRC_SPDIF)
1157 { 1161 {
1162#ifndef HAVE_RECORDING_WITHOUT_MONITORING
1158 listid_to_enum[listi++] = ITEM_VOLUME; 1163 listid_to_enum[listi++] = ITEM_VOLUME;
1164#endif
1159 listid_to_enum[listi++] = ITEM_SAMPLERATE; 1165 listid_to_enum[listi++] = ITEM_SAMPLERATE;
1160 listid_to_enum[listi++] = ITEM_FILENAME; 1166 listid_to_enum[listi++] = ITEM_FILENAME;
1161 1167
@@ -1164,7 +1170,9 @@ bool recording_screen(bool no_source)
1164 else 1170 else
1165#endif 1171#endif
1166 { 1172 {
1173#ifndef HAVE_RECORDING_WITHOUT_MONITORING
1167 listid_to_enum[listi++] = ITEM_VOLUME; 1174 listid_to_enum[listi++] = ITEM_VOLUME;
1175#endif
1168 listid_to_enum[listi++] = ITEM_GAIN; 1176 listid_to_enum[listi++] = ITEM_GAIN;
1169#if defined(HAVE_LINE_REC) || defined(HAVE_FMRADIO_REC) 1177#if defined(HAVE_LINE_REC) || defined(HAVE_FMRADIO_REC)
1170 if(HAVE_MIC_REC_((global_settings.rec_source != AUDIO_SRC_MIC) || ) 1178 if(HAVE_MIC_REC_((global_settings.rec_source != AUDIO_SRC_MIC) || )
@@ -1265,9 +1273,11 @@ bool recording_screen(bool no_source)
1265 case ACTION_SETTINGS_INCREPEAT: 1273 case ACTION_SETTINGS_INCREPEAT:
1266 switch (listid_to_enum[gui_synclist_get_sel_pos(&lists)]) 1274 switch (listid_to_enum[gui_synclist_get_sel_pos(&lists)])
1267 { 1275 {
1276#ifndef HAVE_RECORDING_WITHOUT_MONITORING
1268 case ITEM_VOLUME: 1277 case ITEM_VOLUME:
1269 recording_step_levels(SOUND_VOLUME, 1); 1278 recording_step_levels(SOUND_VOLUME, 1);
1270 break; 1279 break;
1280#endif
1271 case ITEM_GAIN: 1281 case ITEM_GAIN:
1272 switch(global_settings.rec_source) { 1282 switch(global_settings.rec_source) {
1273#ifdef HAVE_MIC_REC 1283#ifdef HAVE_MIC_REC
@@ -1335,9 +1345,11 @@ bool recording_screen(bool no_source)
1335 case ACTION_SETTINGS_DECREPEAT: 1345 case ACTION_SETTINGS_DECREPEAT:
1336 switch (listid_to_enum[gui_synclist_get_sel_pos(&lists)]) 1346 switch (listid_to_enum[gui_synclist_get_sel_pos(&lists)])
1337 { 1347 {
1348#ifndef HAVE_RECORDING_WITHOUT_MONITORING
1338 case ITEM_VOLUME: 1349 case ITEM_VOLUME:
1339 recording_step_levels(SOUND_VOLUME, -1); 1350 recording_step_levels(SOUND_VOLUME, -1);
1340 break; 1351 break;
1352#endif
1341 case ITEM_GAIN: 1353 case ITEM_GAIN:
1342 switch(global_settings.rec_source) { 1354 switch(global_settings.rec_source) {
1343#ifdef HAVE_MIC_REC 1355#ifdef HAVE_MIC_REC
diff --git a/firmware/export/config/fiiom3k.h b/firmware/export/config/fiiom3k.h
index ea97d52d76..baf4cf4660 100644
--- a/firmware/export/config/fiiom3k.h
+++ b/firmware/export/config/fiiom3k.h
@@ -59,6 +59,7 @@
59#define INPUT_SRC_CAPS SRC_CAP_MIC 59#define INPUT_SRC_CAPS SRC_CAP_MIC
60#define AUDIOHW_CAPS (FILTER_ROLL_OFF_CAP|POWER_MODE_CAP|MIC_GAIN_CAP) 60#define AUDIOHW_CAPS (FILTER_ROLL_OFF_CAP|POWER_MODE_CAP|MIC_GAIN_CAP)
61#define HAVE_RECORDING 61#define HAVE_RECORDING
62#define HAVE_RECORDING_WITHOUT_MONITORING
62#define HAVE_AK4376 63#define HAVE_AK4376
63#define HAVE_X1000_ICODEC_REC 64#define HAVE_X1000_ICODEC_REC
64#define HAVE_SW_TONE_CONTROLS 65#define HAVE_SW_TONE_CONTROLS