2002-05-26 17:03:52 +00:00
|
|
|
|
/***************************************************************************
|
|
|
|
|
* __________ __ ___.
|
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
|
* $Id$
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2002 Bj<EFBFBD>rn Stenberg
|
|
|
|
|
*
|
|
|
|
|
* All files in this archive are subject to the GNU General Public License.
|
|
|
|
|
* See the file COPYING in the source tree root for full license agreement.
|
|
|
|
|
*
|
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
|
* KIND, either express or implied.
|
|
|
|
|
*
|
|
|
|
|
****************************************************************************/
|
2002-05-27 07:00:48 +00:00
|
|
|
|
#include "config.h"
|
2002-05-26 17:03:52 +00:00
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdbool.h>
|
2002-08-20 19:37:00 +00:00
|
|
|
|
#include "kernel.h"
|
2002-06-28 11:48:53 +00:00
|
|
|
|
#include "lcd.h"
|
2002-05-26 17:03:52 +00:00
|
|
|
|
#include "menu.h"
|
2002-06-28 11:48:53 +00:00
|
|
|
|
#include "button.h"
|
2004-01-05 20:42:51 +00:00
|
|
|
|
#include "mp3_playback.h"
|
2002-06-19 14:58:57 +00:00
|
|
|
|
#include "settings.h"
|
2002-08-13 09:15:21 +00:00
|
|
|
|
#include "status.h"
|
2002-09-24 17:22:12 +00:00
|
|
|
|
#include "screens.h"
|
2002-08-20 19:37:00 +00:00
|
|
|
|
#ifdef HAVE_LCD_BITMAP
|
|
|
|
|
#include "icons.h"
|
|
|
|
|
#endif
|
2002-09-18 14:08:05 +00:00
|
|
|
|
#include "lang.h"
|
2003-02-15 00:03:23 +00:00
|
|
|
|
#include "sprintf.h"
|
2004-03-19 22:15:53 +00:00
|
|
|
|
#include "talk.h"
|
2004-07-26 16:06:59 +00:00
|
|
|
|
#include "misc.h"
|
2002-05-26 17:03:52 +00:00
|
|
|
|
|
2004-08-01 23:34:44 +00:00
|
|
|
|
static const char* const fmt[] =
|
2002-06-28 12:40:32 +00:00
|
|
|
|
{
|
|
|
|
|
"", /* no decimals */
|
|
|
|
|
"%d.%d %s ", /* 1 decimal */
|
|
|
|
|
"%d.%02d %s " /* 2 decimals */
|
|
|
|
|
};
|
|
|
|
|
|
2004-08-18 01:09:31 +00:00
|
|
|
|
bool set_sound(const char* string,
|
2002-06-28 11:48:53 +00:00
|
|
|
|
int* variable,
|
|
|
|
|
int setting)
|
|
|
|
|
{
|
|
|
|
|
bool done = false;
|
2002-08-20 20:30:32 +00:00
|
|
|
|
bool changed = true;
|
2002-06-28 11:48:53 +00:00
|
|
|
|
int min, max;
|
|
|
|
|
int val;
|
2002-06-28 12:40:32 +00:00
|
|
|
|
int numdec;
|
|
|
|
|
int integer;
|
|
|
|
|
int dec;
|
2004-07-20 22:13:24 +00:00
|
|
|
|
const char* unit;
|
2002-06-28 11:48:53 +00:00
|
|
|
|
char str[32];
|
2004-03-19 22:15:53 +00:00
|
|
|
|
int talkunit = UNIT_INT;
|
2004-07-06 12:17:14 +00:00
|
|
|
|
int steps;
|
2004-07-26 16:06:59 +00:00
|
|
|
|
int button;
|
2002-06-28 11:48:53 +00:00
|
|
|
|
|
|
|
|
|
unit = mpeg_sound_unit(setting);
|
2002-06-28 12:40:32 +00:00
|
|
|
|
numdec = mpeg_sound_numdecimals(setting);
|
2004-07-06 12:17:14 +00:00
|
|
|
|
steps = mpeg_sound_steps(setting);
|
2002-06-28 11:48:53 +00:00
|
|
|
|
min = mpeg_sound_min(setting);
|
|
|
|
|
max = mpeg_sound_max(setting);
|
2004-03-19 22:15:53 +00:00
|
|
|
|
if (*unit == 'd') /* crude reconstruction */
|
|
|
|
|
talkunit = UNIT_DB;
|
|
|
|
|
else if (*unit == '%')
|
|
|
|
|
talkunit = UNIT_PERCENT;
|
2004-07-06 19:11:01 +00:00
|
|
|
|
else if (*unit == 'H')
|
|
|
|
|
talkunit = UNIT_HERTZ;
|
2002-06-28 11:48:53 +00:00
|
|
|
|
|
2002-08-20 19:37:00 +00:00
|
|
|
|
#ifdef HAVE_LCD_BITMAP
|
|
|
|
|
if(global_settings.statusbar)
|
|
|
|
|
lcd_setmargins(0, STATUSBAR_HEIGHT);
|
|
|
|
|
else
|
|
|
|
|
lcd_setmargins(0, 0);
|
|
|
|
|
#endif
|
2002-06-28 11:48:53 +00:00
|
|
|
|
lcd_clear_display();
|
|
|
|
|
lcd_puts_scroll(0,0,string);
|
|
|
|
|
|
|
|
|
|
while (!done) {
|
2002-08-20 19:37:00 +00:00
|
|
|
|
if (changed) {
|
|
|
|
|
val = mpeg_val2phys(setting, *variable);
|
|
|
|
|
if(numdec)
|
|
|
|
|
{
|
|
|
|
|
integer = val / (10 * numdec);
|
|
|
|
|
dec = val % (10 * numdec);
|
|
|
|
|
snprintf(str,sizeof str, fmt[numdec], integer, dec, unit);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
snprintf(str,sizeof str,"%d %s ", val, unit);
|
|
|
|
|
}
|
2004-03-27 00:11:01 +00:00
|
|
|
|
if (global_settings.talk_menu)
|
|
|
|
|
talk_value(val, talkunit, false); /* speak it */
|
2002-06-28 12:40:32 +00:00
|
|
|
|
}
|
2002-06-28 11:48:53 +00:00
|
|
|
|
lcd_puts(0,1,str);
|
2003-04-23 11:26:25 +00:00
|
|
|
|
status_draw(true);
|
2002-08-20 19:37:00 +00:00
|
|
|
|
lcd_update();
|
2002-06-28 11:48:53 +00:00
|
|
|
|
|
2002-08-20 19:37:00 +00:00
|
|
|
|
changed = false;
|
2004-07-26 16:06:59 +00:00
|
|
|
|
button = button_get_w_tmo(HZ/2);
|
|
|
|
|
switch( button ) {
|
2004-09-19 21:58:37 +00:00
|
|
|
|
case SETTINGS_INC:
|
|
|
|
|
case SETTINGS_INC | BUTTON_REPEAT:
|
2004-07-06 12:17:14 +00:00
|
|
|
|
(*variable)+=steps;
|
2002-06-28 11:48:53 +00:00
|
|
|
|
if(*variable > max )
|
|
|
|
|
*variable = max;
|
2002-08-20 19:37:00 +00:00
|
|
|
|
changed = true;
|
2002-06-28 11:48:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
2004-09-19 21:58:37 +00:00
|
|
|
|
case SETTINGS_DEC:
|
|
|
|
|
case SETTINGS_DEC | BUTTON_REPEAT:
|
2004-07-06 12:17:14 +00:00
|
|
|
|
(*variable)-=steps;
|
2002-06-28 11:48:53 +00:00
|
|
|
|
if(*variable < min )
|
|
|
|
|
*variable = min;
|
2002-08-20 19:37:00 +00:00
|
|
|
|
changed = true;
|
2002-06-28 11:48:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
2004-09-19 21:58:37 +00:00
|
|
|
|
case SETTINGS_OK:
|
|
|
|
|
case SETTINGS_CANCEL:
|
|
|
|
|
#ifdef SETTINGS_OK2
|
|
|
|
|
case SETTINGS_OK2:
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef SETTINGS_CANCEL2
|
|
|
|
|
case SETTINGS_CANCEL2:
|
2002-06-28 11:48:53 +00:00
|
|
|
|
#endif
|
|
|
|
|
done = true;
|
|
|
|
|
break;
|
2002-09-24 17:22:12 +00:00
|
|
|
|
|
2004-07-26 16:06:59 +00:00
|
|
|
|
default:
|
|
|
|
|
if(default_event_handler(button) == SYS_USB_CONNECTED)
|
|
|
|
|
return true;
|
|
|
|
|
break;
|
2002-06-28 11:48:53 +00:00
|
|
|
|
}
|
2002-08-20 19:37:00 +00:00
|
|
|
|
if (changed) {
|
|
|
|
|
mpeg_sound_set(setting, *variable);
|
2004-09-28 22:13:26 +00:00
|
|
|
|
#if CONFIG_HWCODEC == MAS3507D
|
2002-08-20 19:37:00 +00:00
|
|
|
|
if(setting == SOUND_BALANCE)
|
|
|
|
|
mpeg_sound_set(SOUND_VOLUME, global_settings.volume);
|
2002-08-14 21:30:06 +00:00
|
|
|
|
#endif
|
2002-08-20 19:37:00 +00:00
|
|
|
|
}
|
2002-06-28 11:48:53 +00:00
|
|
|
|
}
|
|
|
|
|
lcd_stop_scroll();
|
2002-09-24 17:22:12 +00:00
|
|
|
|
return false;
|
2002-06-28 11:48:53 +00:00
|
|
|
|
}
|
|
|
|
|
|
2002-09-24 17:22:12 +00:00
|
|
|
|
static bool volume(void)
|
2002-05-26 17:03:52 +00:00
|
|
|
|
{
|
2002-09-24 17:22:12 +00:00
|
|
|
|
return set_sound(str(LANG_VOLUME), &global_settings.volume, SOUND_VOLUME);
|
2002-05-26 17:03:52 +00:00
|
|
|
|
}
|
|
|
|
|
|
2002-09-24 17:22:12 +00:00
|
|
|
|
static bool balance(void)
|
2002-08-14 21:30:06 +00:00
|
|
|
|
{
|
2002-09-24 17:22:12 +00:00
|
|
|
|
return set_sound(str(LANG_BALANCE), &global_settings.balance,
|
|
|
|
|
SOUND_BALANCE);
|
2002-08-14 21:30:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
2002-09-24 17:22:12 +00:00
|
|
|
|
static bool bass(void)
|
2002-05-26 17:03:52 +00:00
|
|
|
|
{
|
2002-09-24 17:22:12 +00:00
|
|
|
|
return set_sound(str(LANG_BASS), &global_settings.bass, SOUND_BASS);
|
2004-06-16 11:30:51 +00:00
|
|
|
|
}
|
2002-05-26 17:03:52 +00:00
|
|
|
|
|
2002-09-24 17:22:12 +00:00
|
|
|
|
static bool treble(void)
|
2002-05-26 17:03:52 +00:00
|
|
|
|
{
|
2002-09-24 17:22:12 +00:00
|
|
|
|
return set_sound(str(LANG_TREBLE), &global_settings.treble, SOUND_TREBLE);
|
2002-05-26 17:03:52 +00:00
|
|
|
|
}
|
|
|
|
|
|
2004-10-01 21:53:10 +00:00
|
|
|
|
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
2002-09-24 17:22:12 +00:00
|
|
|
|
static bool loudness(void)
|
2002-07-22 16:39:17 +00:00
|
|
|
|
{
|
2002-09-24 17:22:12 +00:00
|
|
|
|
return set_sound(str(LANG_LOUDNESS), &global_settings.loudness,
|
|
|
|
|
SOUND_LOUDNESS);
|
2004-06-16 11:30:51 +00:00
|
|
|
|
}
|
2002-07-22 16:39:17 +00:00
|
|
|
|
|
2004-07-06 12:17:14 +00:00
|
|
|
|
static bool mdb_strength(void)
|
2002-07-22 16:39:17 +00:00
|
|
|
|
{
|
2004-07-06 12:17:14 +00:00
|
|
|
|
return set_sound(str(LANG_MDB_STRENGTH), &global_settings.mdb_strength,
|
|
|
|
|
SOUND_MDB_STRENGTH);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static bool mdb_harmonics(void)
|
|
|
|
|
{
|
|
|
|
|
return set_sound(str(LANG_MDB_HARMONICS), &global_settings.mdb_harmonics,
|
|
|
|
|
SOUND_MDB_HARMONICS);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static bool mdb_center(void)
|
|
|
|
|
{
|
|
|
|
|
return set_sound(str(LANG_MDB_CENTER), &global_settings.mdb_center,
|
|
|
|
|
SOUND_MDB_CENTER);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static bool mdb_shape(void)
|
|
|
|
|
{
|
2004-07-06 19:11:01 +00:00
|
|
|
|
return set_sound(str(LANG_MDB_SHAPE), &global_settings.mdb_shape,
|
2004-07-06 12:17:14 +00:00
|
|
|
|
SOUND_MDB_SHAPE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void set_mdb_enable(bool value)
|
|
|
|
|
{
|
|
|
|
|
mpeg_sound_set(SOUND_MDB_ENABLE, (int)value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static bool mdb_enable(void)
|
|
|
|
|
{
|
|
|
|
|
return set_bool_options(str(LANG_MDB_ENABLE),
|
|
|
|
|
&global_settings.mdb_enable,
|
|
|
|
|
STR(LANG_SET_BOOL_YES),
|
|
|
|
|
STR(LANG_SET_BOOL_NO),
|
|
|
|
|
set_mdb_enable);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void set_superbass(bool value)
|
|
|
|
|
{
|
|
|
|
|
mpeg_sound_set(SOUND_SUPERBASS, (int)value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static bool superbass(void)
|
|
|
|
|
{
|
|
|
|
|
return set_bool_options(str(LANG_SUPERBASS),
|
|
|
|
|
&global_settings.superbass,
|
|
|
|
|
STR(LANG_SET_BOOL_YES),
|
|
|
|
|
STR(LANG_SET_BOOL_NO),
|
|
|
|
|
set_superbass);
|
2004-06-16 11:30:51 +00:00
|
|
|
|
}
|
2002-07-25 15:55:22 +00:00
|
|
|
|
|
2002-09-10 05:31:12 +00:00
|
|
|
|
static void set_avc(int val)
|
|
|
|
|
{
|
|
|
|
|
mpeg_sound_set(SOUND_AVC, val);
|
|
|
|
|
}
|
|
|
|
|
|
2002-09-24 17:22:12 +00:00
|
|
|
|
static bool avc(void)
|
2002-07-25 15:55:22 +00:00
|
|
|
|
{
|
2004-07-23 23:01:20 +00:00
|
|
|
|
static const struct opt_items names[] = {
|
2004-03-15 08:27:51 +00:00
|
|
|
|
{ STR(LANG_OFF) },
|
2004-06-22 12:37:42 +00:00
|
|
|
|
{ "20ms", TALK_ID(20, UNIT_MS) },
|
2004-03-19 22:15:53 +00:00
|
|
|
|
{ "2s", TALK_ID(2, UNIT_SEC) },
|
|
|
|
|
{ "4s", TALK_ID(4, UNIT_SEC) },
|
|
|
|
|
{ "8s", TALK_ID(8, UNIT_SEC) }
|
2004-03-15 08:27:51 +00:00
|
|
|
|
};
|
2003-06-05 11:11:10 +00:00
|
|
|
|
return set_option(str(LANG_DECAY), &global_settings.avc, INT,
|
2004-06-22 12:37:42 +00:00
|
|
|
|
names, 5, set_avc);
|
2002-07-25 15:55:22 +00:00
|
|
|
|
}
|
2004-10-01 21:53:10 +00:00
|
|
|
|
#endif
|
2002-11-10 23:18:33 +00:00
|
|
|
|
|
2004-10-01 21:53:10 +00:00
|
|
|
|
#if CONFIG_HWCODEC == MAS3587F
|
2002-11-10 23:18:33 +00:00
|
|
|
|
static bool recsource(void)
|
|
|
|
|
{
|
2004-07-23 23:01:20 +00:00
|
|
|
|
static const struct opt_items names[] = {
|
2004-03-15 08:27:51 +00:00
|
|
|
|
{ STR(LANG_RECORDING_SRC_MIC) },
|
|
|
|
|
{ STR(LANG_RECORDING_SRC_LINE) },
|
|
|
|
|
{ STR(LANG_RECORDING_SRC_DIGITAL) }
|
|
|
|
|
};
|
2002-11-10 23:18:33 +00:00
|
|
|
|
return set_option(str(LANG_RECORDING_SOURCE),
|
2003-06-05 11:11:10 +00:00
|
|
|
|
&global_settings.rec_source, INT,
|
2002-11-10 23:18:33 +00:00
|
|
|
|
names, 3, NULL );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static bool recfrequency(void)
|
|
|
|
|
{
|
2004-07-23 23:01:20 +00:00
|
|
|
|
static const struct opt_items names[] = {
|
2004-03-19 22:15:53 +00:00
|
|
|
|
{ "44.1kHz", TALK_ID(44, UNIT_KHZ) },
|
|
|
|
|
{ "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) }
|
2004-03-15 08:27:51 +00:00
|
|
|
|
};
|
2002-11-10 23:18:33 +00:00
|
|
|
|
return set_option(str(LANG_RECORDING_FREQUENCY),
|
2003-06-05 11:11:10 +00:00
|
|
|
|
&global_settings.rec_frequency, INT,
|
2002-11-10 23:18:33 +00:00
|
|
|
|
names, 6, NULL );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static bool recchannels(void)
|
|
|
|
|
{
|
2004-07-23 23:01:20 +00:00
|
|
|
|
static const struct opt_items names[] = {
|
2004-03-15 08:27:51 +00:00
|
|
|
|
{ STR(LANG_CHANNEL_STEREO) },
|
|
|
|
|
{ STR(LANG_CHANNEL_MONO) }
|
|
|
|
|
};
|
2002-11-10 23:18:33 +00:00
|
|
|
|
return set_option(str(LANG_RECORDING_CHANNELS),
|
2003-06-05 11:11:10 +00:00
|
|
|
|
&global_settings.rec_channels, INT,
|
2002-11-10 23:18:33 +00:00
|
|
|
|
names, 2, NULL );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static bool recquality(void)
|
|
|
|
|
{
|
2004-03-20 16:49:58 +00:00
|
|
|
|
return set_int(str(LANG_RECORDING_QUALITY), "", UNIT_INT,
|
2002-11-10 23:18:33 +00:00
|
|
|
|
&global_settings.rec_quality,
|
|
|
|
|
NULL, 1, 0, 7 );
|
|
|
|
|
}
|
2003-04-20 22:00:30 +00:00
|
|
|
|
|
|
|
|
|
static bool receditable(void)
|
|
|
|
|
{
|
|
|
|
|
return set_bool(str(LANG_RECORDING_EDITABLE),
|
|
|
|
|
&global_settings.rec_editable);
|
|
|
|
|
}
|
2003-06-04 13:48:50 +00:00
|
|
|
|
|
|
|
|
|
static bool rectimesplit(void)
|
|
|
|
|
{
|
2004-07-23 23:01:20 +00:00
|
|
|
|
static const struct opt_items names[] = {
|
2004-03-15 08:27:51 +00:00
|
|
|
|
{ STR(LANG_OFF) },
|
2004-03-19 22:15:53 +00:00
|
|
|
|
{ "00:05" , TALK_ID(5, UNIT_MIN) },
|
|
|
|
|
{ "00:10" , TALK_ID(10, UNIT_MIN) },
|
|
|
|
|
{ "00:15" , TALK_ID(15, UNIT_MIN) },
|
|
|
|
|
{ "00:30" , TALK_ID(30, UNIT_MIN) },
|
|
|
|
|
{ "01:00" , TALK_ID(1, UNIT_HOUR) },
|
|
|
|
|
{ "02:00" , TALK_ID(2, UNIT_HOUR) },
|
|
|
|
|
{ "04:00" , TALK_ID(4, UNIT_HOUR) },
|
|
|
|
|
{ "06:00" , TALK_ID(6, UNIT_HOUR) },
|
|
|
|
|
{ "08:00" , TALK_ID(8, UNIT_HOUR) },
|
|
|
|
|
{ "10:00" , TALK_ID(10, UNIT_HOUR) },
|
|
|
|
|
{ "12:00" , TALK_ID(12, UNIT_HOUR) },
|
|
|
|
|
{ "18:00" , TALK_ID(18, UNIT_HOUR) },
|
|
|
|
|
{ "24:00" , TALK_ID(24, UNIT_HOUR) }
|
2003-06-10 19:24:51 +00:00
|
|
|
|
};
|
2003-06-04 13:48:50 +00:00
|
|
|
|
return set_option(str(LANG_RECORD_TIMESPLIT),
|
2003-06-05 11:11:10 +00:00
|
|
|
|
&global_settings.rec_timesplit, INT,
|
2003-06-10 19:24:51 +00:00
|
|
|
|
names, 14, NULL );
|
2003-06-04 13:48:50 +00:00
|
|
|
|
}
|
|
|
|
|
|
2003-12-31 03:13:29 +00:00
|
|
|
|
static bool recprerecord(void)
|
|
|
|
|
{
|
2004-07-23 23:01:20 +00:00
|
|
|
|
static const struct opt_items names[] = {
|
2004-03-15 08:27:51 +00:00
|
|
|
|
{ STR(LANG_OFF) },
|
2004-03-19 22:15:53 +00:00
|
|
|
|
{ "1s", TALK_ID(1, UNIT_SEC) },
|
|
|
|
|
{ "2s", TALK_ID(2, UNIT_SEC) },
|
|
|
|
|
{ "3s", TALK_ID(3, UNIT_SEC) },
|
|
|
|
|
{ "4s", TALK_ID(4, UNIT_SEC) },
|
|
|
|
|
{ "5s", TALK_ID(5, UNIT_SEC) },
|
|
|
|
|
{ "6s", TALK_ID(6, UNIT_SEC) },
|
|
|
|
|
{ "7s", TALK_ID(7, UNIT_SEC) },
|
|
|
|
|
{ "8s", TALK_ID(8, UNIT_SEC) },
|
|
|
|
|
{ "9s", TALK_ID(9, UNIT_SEC) },
|
|
|
|
|
{ "10s", TALK_ID(10, UNIT_SEC) },
|
|
|
|
|
{ "11s", TALK_ID(11, UNIT_SEC) },
|
|
|
|
|
{ "12s", TALK_ID(12, UNIT_SEC) },
|
|
|
|
|
{ "13s", TALK_ID(13, UNIT_SEC) },
|
|
|
|
|
{ "14s", TALK_ID(14, UNIT_SEC) },
|
|
|
|
|
{ "15s", TALK_ID(15, UNIT_SEC) },
|
|
|
|
|
{ "16s", TALK_ID(16, UNIT_SEC) },
|
|
|
|
|
{ "17s", TALK_ID(17, UNIT_SEC) },
|
|
|
|
|
{ "18s", TALK_ID(18, UNIT_SEC) },
|
|
|
|
|
{ "19s", TALK_ID(19, UNIT_SEC) },
|
|
|
|
|
{ "20s", TALK_ID(20, UNIT_SEC) },
|
|
|
|
|
{ "21s", TALK_ID(21, UNIT_SEC) },
|
|
|
|
|
{ "22s", TALK_ID(22, UNIT_SEC) },
|
|
|
|
|
{ "23s", TALK_ID(23, UNIT_SEC) },
|
|
|
|
|
{ "24s", TALK_ID(24, UNIT_SEC) },
|
|
|
|
|
{ "25s", TALK_ID(25, UNIT_SEC) },
|
|
|
|
|
{ "26s", TALK_ID(26, UNIT_SEC) },
|
|
|
|
|
{ "27s", TALK_ID(27, UNIT_SEC) },
|
|
|
|
|
{ "28s", TALK_ID(28, UNIT_SEC) },
|
|
|
|
|
{ "29s", TALK_ID(29, UNIT_SEC) },
|
|
|
|
|
{ "30s", TALK_ID(30, UNIT_SEC) }
|
2003-12-31 03:13:29 +00:00
|
|
|
|
};
|
|
|
|
|
return set_option(str(LANG_RECORD_PRERECORD_TIME),
|
|
|
|
|
&global_settings.rec_prerecord_time, INT,
|
|
|
|
|
names, 31, NULL );
|
|
|
|
|
}
|
|
|
|
|
|
2004-01-21 14:58:40 +00:00
|
|
|
|
static bool recdirectory(void)
|
|
|
|
|
{
|
2004-07-23 23:01:20 +00:00
|
|
|
|
static const struct opt_items names[] = {
|
2004-03-15 08:27:51 +00:00
|
|
|
|
{ rec_base_directory, -1 },
|
|
|
|
|
{ STR(LANG_RECORD_CURRENT_DIR) }
|
2004-01-21 14:58:40 +00:00
|
|
|
|
};
|
|
|
|
|
return set_option(str(LANG_RECORD_DIRECTORY),
|
|
|
|
|
&global_settings.rec_directory, INT,
|
|
|
|
|
names, 2, NULL );
|
|
|
|
|
}
|
|
|
|
|
|
2004-09-28 22:13:26 +00:00
|
|
|
|
#endif /* MAS3587F */
|
2002-07-22 16:39:17 +00:00
|
|
|
|
|
2002-09-10 06:24:46 +00:00
|
|
|
|
static void set_chanconf(int val)
|
|
|
|
|
{
|
|
|
|
|
mpeg_sound_set(SOUND_CHANNELS, val);
|
|
|
|
|
}
|
|
|
|
|
|
2002-09-24 17:22:12 +00:00
|
|
|
|
static bool chanconf(void)
|
2002-09-09 15:13:33 +00:00
|
|
|
|
{
|
2004-07-23 23:01:20 +00:00
|
|
|
|
static const struct opt_items names[] = {
|
2004-03-15 08:27:51 +00:00
|
|
|
|
{ STR(LANG_CHANNEL_STEREO) },
|
2003-02-27 15:02:20 +00:00
|
|
|
|
#ifdef HAVE_LCD_CHARCELLS
|
2004-03-15 08:27:51 +00:00
|
|
|
|
{ STR(LANG_CHANNEL_STEREO_NARROW_PLAYER) },
|
2003-02-27 15:02:20 +00:00
|
|
|
|
#else
|
2004-03-15 08:27:51 +00:00
|
|
|
|
{ STR(LANG_CHANNEL_STEREO_NARROW_RECORDER) },
|
2003-02-27 15:02:20 +00:00
|
|
|
|
#endif
|
2004-03-15 08:27:51 +00:00
|
|
|
|
{ STR(LANG_CHANNEL_MONO) },
|
|
|
|
|
{ STR(LANG_CHANNEL_LEFT) },
|
|
|
|
|
{ STR(LANG_CHANNEL_RIGHT) },
|
|
|
|
|
{ STR(LANG_CHANNEL_KARAOKE) },
|
|
|
|
|
{ STR(LANG_CHANNEL_STEREO_WIDE) }
|
2003-06-05 11:11:10 +00:00
|
|
|
|
};
|
|
|
|
|
return set_option(str(LANG_CHANNEL), &global_settings.channel_config, INT,
|
2003-02-27 15:02:20 +00:00
|
|
|
|
names, 7, set_chanconf );
|
2002-09-09 15:13:33 +00:00
|
|
|
|
}
|
|
|
|
|
|
2002-09-24 17:22:12 +00:00
|
|
|
|
bool sound_menu(void)
|
2002-05-26 17:03:52 +00:00
|
|
|
|
{
|
|
|
|
|
int m;
|
2002-09-24 17:22:12 +00:00
|
|
|
|
bool result;
|
2004-07-23 23:01:20 +00:00
|
|
|
|
static const struct menu_item items[] = {
|
|
|
|
|
{ ID2P(LANG_VOLUME), volume },
|
|
|
|
|
{ ID2P(LANG_BASS), bass },
|
|
|
|
|
{ ID2P(LANG_TREBLE), treble },
|
|
|
|
|
{ ID2P(LANG_BALANCE), balance },
|
|
|
|
|
{ ID2P(LANG_CHANNEL_MENU), chanconf },
|
2004-10-01 21:53:10 +00:00
|
|
|
|
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
|
2004-07-23 23:01:20 +00:00
|
|
|
|
{ ID2P(LANG_LOUDNESS), loudness },
|
|
|
|
|
{ ID2P(LANG_AUTOVOL), avc },
|
|
|
|
|
{ ID2P(LANG_SUPERBASS), superbass },
|
|
|
|
|
{ ID2P(LANG_MDB_ENABLE), mdb_enable },
|
|
|
|
|
{ ID2P(LANG_MDB_STRENGTH), mdb_strength },
|
|
|
|
|
{ ID2P(LANG_MDB_HARMONICS), mdb_harmonics },
|
|
|
|
|
{ ID2P(LANG_MDB_CENTER), mdb_center },
|
|
|
|
|
{ ID2P(LANG_MDB_SHAPE), mdb_shape },
|
2002-07-22 16:39:17 +00:00
|
|
|
|
#endif
|
2002-05-26 17:03:52 +00:00
|
|
|
|
};
|
|
|
|
|
|
2004-03-16 13:44:56 +00:00
|
|
|
|
m=menu_init( items, sizeof(items) / sizeof(*items), NULL,
|
|
|
|
|
NULL, NULL, NULL);
|
2002-08-23 12:32:52 +00:00
|
|
|
|
result = menu_run(m);
|
2002-05-26 17:03:52 +00:00
|
|
|
|
menu_exit(m);
|
2002-08-23 12:32:52 +00:00
|
|
|
|
|
|
|
|
|
return result;
|
2002-05-26 17:03:52 +00:00
|
|
|
|
}
|
2002-11-10 23:18:33 +00:00
|
|
|
|
|
2004-09-28 22:13:26 +00:00
|
|
|
|
#if CONFIG_HWCODEC == MAS3587F
|
2003-11-20 00:33:43 +00:00
|
|
|
|
bool recording_menu(bool no_source)
|
2002-11-10 23:18:33 +00:00
|
|
|
|
{
|
|
|
|
|
int m;
|
2003-11-20 00:33:43 +00:00
|
|
|
|
int i = 0;
|
2004-03-16 13:44:56 +00:00
|
|
|
|
struct menu_item items[8];
|
2002-11-10 23:18:33 +00:00
|
|
|
|
bool result;
|
2003-11-20 00:33:43 +00:00
|
|
|
|
|
2004-07-23 23:01:20 +00:00
|
|
|
|
items[i].desc = ID2P(LANG_RECORDING_QUALITY);
|
2004-03-16 13:44:56 +00:00
|
|
|
|
items[i++].function = recquality;
|
2004-07-23 23:01:20 +00:00
|
|
|
|
items[i].desc = ID2P(LANG_RECORDING_FREQUENCY);
|
2004-03-16 13:44:56 +00:00
|
|
|
|
items[i++].function = recfrequency;
|
2003-11-20 00:33:43 +00:00
|
|
|
|
if(!no_source) {
|
2004-07-23 23:01:20 +00:00
|
|
|
|
items[i].desc = ID2P(LANG_RECORDING_SOURCE);
|
2004-03-16 13:44:56 +00:00
|
|
|
|
items[i++].function = recsource;
|
2003-11-20 00:33:43 +00:00
|
|
|
|
}
|
2004-07-23 23:01:20 +00:00
|
|
|
|
items[i].desc = ID2P(LANG_RECORDING_CHANNELS);
|
2004-03-16 13:44:56 +00:00
|
|
|
|
items[i++].function = recchannels;
|
2004-07-23 23:01:20 +00:00
|
|
|
|
items[i].desc = ID2P(LANG_RECORDING_EDITABLE);
|
2004-03-16 13:44:56 +00:00
|
|
|
|
items[i++].function = receditable;
|
2004-07-23 23:01:20 +00:00
|
|
|
|
items[i].desc = ID2P(LANG_RECORD_TIMESPLIT);
|
2004-03-16 13:44:56 +00:00
|
|
|
|
items[i++].function = rectimesplit;
|
2004-07-23 23:01:20 +00:00
|
|
|
|
items[i].desc = ID2P(LANG_RECORD_PRERECORD_TIME);
|
2004-03-16 13:44:56 +00:00
|
|
|
|
items[i++].function = recprerecord;
|
2004-07-23 23:01:20 +00:00
|
|
|
|
items[i].desc = ID2P(LANG_RECORD_DIRECTORY);
|
2004-03-16 13:44:56 +00:00
|
|
|
|
items[i++].function = recdirectory;
|
|
|
|
|
|
|
|
|
|
m=menu_init( items, i, NULL, NULL, NULL, NULL);
|
2002-11-10 23:18:33 +00:00
|
|
|
|
result = menu_run(m);
|
|
|
|
|
menu_exit(m);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
#endif
|