diff --git a/apps/settings.c b/apps/settings.c index acaeedcbd9..aa79946c85 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -502,7 +502,9 @@ static const struct bit_entry hd_bits[] = "rec frequency", "44,48,32,22,24,16" }, {3, S_O(rec_quality), 5 /* 192 kBit/s max */, "rec quality", NULL }, {1, S_O(rec_editable), false, "editable recordings", off_on }, -#elif defined(HAVE_UDA1380) || defined(HAVE_TLV320) +#endif /* CONFIG_CODEC == MAS3587F */ + +#if CONFIG_CODEC == SWCODEC && defined(HAVE_RECORDING) #ifdef HAVE_UDA1380 {8|SIGNED, S_O(rec_mic_gain), 16 /* 8 dB */, "rec mic gain", NULL }, /* -128...+108 */ #endif @@ -512,11 +514,17 @@ static const struct bit_entry hd_bits[] = #endif {8|SIGNED, S_O(rec_left_gain), 0, "rec left gain", NULL }, /* -128...+96 */ {8|SIGNED, S_O(rec_right_gain), 0, "rec right gain", NULL }, /* -128...+96 */ +#if 0 /* Till samplerates are added for SWCODEC */ {3, S_O(rec_frequency), 0, /* 0=44.1kHz */ "rec frequency", "44,48,32,22,24,16" }, - {4, S_O(rec_quality), 4 /* MP3 L3 192 kBit/s */, "rec quality", NULL }, +#else + {3, S_O(rec_frequency), 0, /* 0=44.1kHz */ + "rec frequency", "44" }, #endif + {4, S_O(rec_quality), 4 /* MP3 L3 192 kBit/s */, "rec quality", NULL }, +#endif /* CONFIG_CODEC == SWCODEC && defined(HAVE_RECORDING) */ + /* values for the trigger */ {8 | SIGNED, S_O(rec_start_thres), -35, "trigger start threshold", NULL}, {8 | SIGNED, S_O(rec_stop_thres), -45, "trigger stop threshold", NULL}, diff --git a/apps/sound_menu.c b/apps/sound_menu.c index 179951a17d..e61d397ea3 100644 --- a/apps/sound_menu.c +++ b/apps/sound_menu.c @@ -356,22 +356,23 @@ static bool receditable(void) return set_bool(str(LANG_RECORDING_EDITABLE), &global_settings.rec_editable); } -#endif +#endif /* CONFIG_CODEC == MAS3587F */ -#ifndef HAVE_UDA1380 static bool recfrequency(void) { static const struct opt_items names[] = { { "44.1kHz", TALK_ID(44, UNIT_KHZ) }, +#if CONFIG_CODEC != SWCODEC /* This is temporary */ { "48kHz", TALK_ID(48, UNIT_KHZ) }, { "32kHz", TALK_ID(32, UNIT_KHZ) }, { "22.05kHz", TALK_ID(22, UNIT_KHZ) }, { "24kHz", TALK_ID(24, UNIT_KHZ) }, { "16kHz", TALK_ID(16, UNIT_KHZ) } +#endif }; return set_option(str(LANG_RECORDING_FREQUENCY), &global_settings.rec_frequency, INT, - names, 6, NULL ); + names, sizeof(names)/sizeof(*names), NULL ); } static bool recchannels(void) @@ -384,7 +385,6 @@ static bool recchannels(void) &global_settings.rec_channels, INT, names, 2, NULL ); } -#endif static bool rectimesplit(void) {