diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2013-02-05 23:20:17 +1100 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2013-02-09 13:05:32 +0100 |
commit | 1eb17dc9f4bf280d2e9503f3d0c8b8730146412d (patch) | |
tree | d166a646c42a484edd2ad66e021c4473c4001a91 /apps/settings_list.c | |
parent | cb3e40be0a09de1b927fcaab75118dad54c9e563 (diff) | |
download | rockbox-1eb17dc9f4bf280d2e9503f3d0c8b8730146412d.tar.gz rockbox-1eb17dc9f4bf280d2e9503f3d0c8b8730146412d.zip |
EQ settings: Rework the settings to clean up the config file.
Instead of 3 cfg lines per eq band there is now a single line
for each:
<config name>: <cutoff/center freq>, <q>, <gain>
In addition, the config value names make a bit more sense.
The old settings are still readable but config.cfg and any new
settings files will be written with the new config values. (The
old settings will be removed completly sometime after the next
stable release).
Also a slight rework of the advanced EQ menu UI
Change-Id: I9008658d36ded442a5f2f825916df42a3934cbef
Reviewed-on: http://gerrit.rockbox.org/394
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
Diffstat (limited to 'apps/settings_list.c')
-rw-r--r-- | apps/settings_list.c | 139 |
1 files changed, 109 insertions, 30 deletions
diff --git a/apps/settings_list.c b/apps/settings_list.c index 2b27516d1c..cc4012ec14 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c | |||
@@ -470,6 +470,66 @@ static int32_t get_precut_talkid(int value, int unit) | |||
470 | return TALK_ID_DECIMAL(-value, 1, unit); | 470 | return TALK_ID_DECIMAL(-value, 1, unit); |
471 | } | 471 | } |
472 | 472 | ||
473 | struct eq_band_setting eq_defaults[EQ_NUM_BANDS] = { | ||
474 | { 32, 7, 0 }, | ||
475 | { 64, 10, 0 }, | ||
476 | { 125, 10, 0 }, | ||
477 | { 250, 10, 0 }, | ||
478 | { 500, 10, 0 }, | ||
479 | { 1000, 10, 0 }, | ||
480 | { 2000, 10, 0 }, | ||
481 | { 4000, 10, 0 }, | ||
482 | { 8000, 10, 0 }, | ||
483 | { 16000, 7, 0 }, | ||
484 | }; | ||
485 | |||
486 | static void eq_load_from_cfg(void *setting, char *value) | ||
487 | { | ||
488 | struct eq_band_setting *eq = setting; | ||
489 | char *val_end, *end; | ||
490 | |||
491 | val_end = value + strlen(value); | ||
492 | |||
493 | /* cutoff/center */ | ||
494 | end = strchr(value, ','); | ||
495 | if (!end) return; | ||
496 | *end = '\0'; | ||
497 | eq->cutoff = atoi(value); | ||
498 | |||
499 | /* q */ | ||
500 | value = end + 1; | ||
501 | if (value > val_end) return; | ||
502 | end = strchr(value, ','); | ||
503 | if (!end) return; | ||
504 | *end = '\0'; | ||
505 | eq->q = atoi(value); | ||
506 | |||
507 | /* gain */ | ||
508 | value = end + 1; | ||
509 | if (value > val_end) return; | ||
510 | eq->gain = atoi(value); | ||
511 | } | ||
512 | |||
513 | static char* eq_write_to_cfg(void *setting, char *buf, int buf_len) | ||
514 | { | ||
515 | struct eq_band_setting *eq = setting; | ||
516 | |||
517 | snprintf(buf, buf_len, "%d, %d, %d", eq->cutoff, eq->q, eq->gain); | ||
518 | return buf; | ||
519 | } | ||
520 | |||
521 | static bool eq_is_changed(void *setting, void *defaultval) | ||
522 | { | ||
523 | struct eq_band_setting *eq = setting; | ||
524 | |||
525 | return memcmp(eq, defaultval, sizeof(struct eq_band_setting)); | ||
526 | } | ||
527 | |||
528 | static void eq_set_default(void* setting, void* defaultval) | ||
529 | { | ||
530 | memcpy(setting, defaultval, sizeof(struct eq_band_setting)); | ||
531 | } | ||
532 | |||
473 | #endif | 533 | #endif |
474 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | 534 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) |
475 | static void set_mdb_enable(bool value) | 535 | static void set_mdb_enable(bool value) |
@@ -1435,103 +1495,122 @@ const struct settings_list settings[] = { | |||
1435 | /* equalizer */ | 1495 | /* equalizer */ |
1436 | OFFON_SETTING(F_EQSETTING, eq_enabled, LANG_EQUALIZER_ENABLED, false, | 1496 | OFFON_SETTING(F_EQSETTING, eq_enabled, LANG_EQUALIZER_ENABLED, false, |
1437 | "eq enabled", NULL), | 1497 | "eq enabled", NULL), |
1498 | |||
1438 | INT_SETTING_NOWRAP(F_EQSETTING, eq_precut, LANG_EQUALIZER_PRECUT, 0, | 1499 | INT_SETTING_NOWRAP(F_EQSETTING, eq_precut, LANG_EQUALIZER_PRECUT, 0, |
1439 | "eq precut", UNIT_DB, 0, 240, 5, eq_precut_format, | 1500 | "eq precut", UNIT_DB, 0, 240, 5, eq_precut_format, |
1440 | get_precut_talkid, dsp_set_eq_precut), | 1501 | get_precut_talkid, dsp_set_eq_precut), |
1502 | |||
1441 | /* 0..32768 Hz */ | 1503 | /* 0..32768 Hz */ |
1442 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[0].cutoff, LANG_EQUALIZER_BAND_CUTOFF, | 1504 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[0].cutoff, LANG_EQUALIZER_BAND_CUTOFF, |
1443 | 32, "eq band 0 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, | 1505 | 32, "eq band 0 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
1444 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), | 1506 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
1445 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[1].cutoff, LANG_EQUALIZER_BAND_CENTER, | 1507 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[1].cutoff, LANG_EQUALIZER_BAND_CENTER, |
1446 | 64, "eq band 1 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, | 1508 | 64, "eq band 1 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
1447 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), | 1509 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
1448 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[2].cutoff, LANG_EQUALIZER_BAND_CENTER, | 1510 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[2].cutoff, LANG_EQUALIZER_BAND_CENTER, |
1449 | 125, "eq band 2 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, | 1511 | 125, "eq band 2 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
1450 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), | 1512 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
1451 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[3].cutoff, LANG_EQUALIZER_BAND_CENTER, | 1513 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[3].cutoff, LANG_EQUALIZER_BAND_CENTER, |
1452 | 250, "eq band 3 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, | 1514 | 250, "eq band 3 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
1453 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), | 1515 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
1454 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[4].cutoff, LANG_EQUALIZER_BAND_CENTER, | 1516 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[4].cutoff, LANG_EQUALIZER_BAND_CENTER, |
1455 | 500, "eq band 4 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, | 1517 | 500, "eq band 4 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
1456 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), | 1518 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
1457 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[5].cutoff, LANG_EQUALIZER_BAND_CENTER, | 1519 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[5].cutoff, LANG_EQUALIZER_BAND_CENTER, |
1458 | 1000, "eq band 5 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, | 1520 | 1000, "eq band 5 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
1459 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), | 1521 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
1460 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[6].cutoff, LANG_EQUALIZER_BAND_CENTER, | 1522 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[6].cutoff, LANG_EQUALIZER_BAND_CENTER, |
1461 | 2000, "eq band 6 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, | 1523 | 2000, "eq band 6 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
1462 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), | 1524 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
1463 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[7].cutoff, LANG_EQUALIZER_BAND_CENTER, | 1525 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[7].cutoff, LANG_EQUALIZER_BAND_CENTER, |
1464 | 4000, "eq band 7 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, | 1526 | 4000, "eq band 7 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
1465 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), | 1527 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
1466 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[8].cutoff, LANG_EQUALIZER_BAND_CENTER, | 1528 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[8].cutoff, LANG_EQUALIZER_BAND_CENTER, |
1467 | 8000, "eq band 8 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, | 1529 | 8000, "eq band 8 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
1468 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), | 1530 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
1469 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[9].cutoff, LANG_EQUALIZER_BAND_CUTOFF, | 1531 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[9].cutoff, LANG_EQUALIZER_BAND_CUTOFF, |
1470 | 16000, "eq band 9 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, | 1532 | 16000, "eq band 9 cutoff", UNIT_HERTZ, EQ_CUTOFF_MIN, |
1471 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), | 1533 | EQ_CUTOFF_MAX, EQ_CUTOFF_STEP, NULL, NULL, NULL), |
1472 | /* 0..64 (or 0.0 to 6.4) */ | 1534 | /* 0..64 (or 0.0 to 6.4) */ |
1473 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[0].q, LANG_EQUALIZER_BAND_Q, 7, | 1535 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[0].q, LANG_EQUALIZER_BAND_Q, 7, |
1474 | "eq band 0 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, | 1536 | "eq band 0 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
1475 | eq_q_format, get_dec_talkid, NULL), | 1537 | eq_q_format, get_dec_talkid, NULL), |
1476 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[1].q, LANG_EQUALIZER_BAND_Q, 10, | 1538 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[1].q, LANG_EQUALIZER_BAND_Q, 10, |
1477 | "eq band 1 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, | 1539 | "eq band 1 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
1478 | eq_q_format, get_dec_talkid, NULL), | 1540 | eq_q_format, get_dec_talkid, NULL), |
1479 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[2].q, LANG_EQUALIZER_BAND_Q, 10, | 1541 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[2].q, LANG_EQUALIZER_BAND_Q, 10, |
1480 | "eq band 2 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, | 1542 | "eq band 2 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
1481 | eq_q_format, get_dec_talkid, NULL), | 1543 | eq_q_format, get_dec_talkid, NULL), |
1482 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[3].q, LANG_EQUALIZER_BAND_Q, 10, | 1544 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[3].q, LANG_EQUALIZER_BAND_Q, 10, |
1483 | "eq band 3 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, | 1545 | "eq band 3 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
1484 | eq_q_format, get_dec_talkid, NULL), | 1546 | eq_q_format, get_dec_talkid, NULL), |
1485 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[4].q, LANG_EQUALIZER_BAND_Q, 10, | 1547 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[4].q, LANG_EQUALIZER_BAND_Q, 10, |
1486 | "eq band 4 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, | 1548 | "eq band 4 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
1487 | eq_q_format, get_dec_talkid, NULL), | 1549 | eq_q_format, get_dec_talkid, NULL), |
1488 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[5].q, LANG_EQUALIZER_BAND_Q, 10, | 1550 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[5].q, LANG_EQUALIZER_BAND_Q, 10, |
1489 | "eq band 5 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, | 1551 | "eq band 5 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
1490 | eq_q_format, get_dec_talkid, NULL), | 1552 | eq_q_format, get_dec_talkid, NULL), |
1491 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[6].q, LANG_EQUALIZER_BAND_Q, 10, | 1553 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[6].q, LANG_EQUALIZER_BAND_Q, 10, |
1492 | "eq band 6 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, | 1554 | "eq band 6 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
1493 | eq_q_format, get_dec_talkid, NULL), | 1555 | eq_q_format, get_dec_talkid, NULL), |
1494 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[7].q, LANG_EQUALIZER_BAND_Q, 10, | 1556 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[7].q, LANG_EQUALIZER_BAND_Q, 10, |
1495 | "eq band 7 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, | 1557 | "eq band 7 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
1496 | eq_q_format, get_dec_talkid, NULL), | 1558 | eq_q_format, get_dec_talkid, NULL), |
1497 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[8].q, LANG_EQUALIZER_BAND_Q, 10, | 1559 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[8].q, LANG_EQUALIZER_BAND_Q, 10, |
1498 | "eq band 8 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, | 1560 | "eq band 8 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
1499 | eq_q_format, get_dec_talkid, NULL), | 1561 | eq_q_format, get_dec_talkid, NULL), |
1500 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[9].q, LANG_EQUALIZER_BAND_Q, 7, | 1562 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[9].q, LANG_EQUALIZER_BAND_Q, 7, |
1501 | "eq band 9 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, | 1563 | "eq band 9 q", UNIT_INT, EQ_Q_MIN, EQ_Q_MAX, EQ_Q_STEP, |
1502 | eq_q_format, get_dec_talkid, NULL), | 1564 | eq_q_format, get_dec_talkid, NULL), |
1503 | /* -240..240 (or -24db to +24db) */ | 1565 | /* -240..240 (or -24db to +24db) */ |
1504 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[0].gain, LANG_GAIN, 0, | 1566 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[0].gain, LANG_GAIN, 0, |
1505 | "eq band 0 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, | 1567 | "eq band 0 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, |
1506 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), | 1568 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), |
1507 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[1].gain, LANG_GAIN, 0, | 1569 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[1].gain, LANG_GAIN, 0, |
1508 | "eq band 1 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, | 1570 | "eq band 1 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, |
1509 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), | 1571 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), |
1510 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[2].gain, LANG_GAIN, 0, | 1572 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[2].gain, LANG_GAIN, 0, |
1511 | "eq band 2 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, | 1573 | "eq band 2 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, |
1512 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), | 1574 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), |
1513 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[3].gain, LANG_GAIN, 0, | 1575 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[3].gain, LANG_GAIN, 0, |
1514 | "eq band 3 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, | 1576 | "eq band 3 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, |
1515 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), | 1577 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), |
1516 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[4].gain, LANG_GAIN, 0, | 1578 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[4].gain, LANG_GAIN, 0, |
1517 | "eq band 4 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, | 1579 | "eq band 4 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, |
1518 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), | 1580 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), |
1519 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[5].gain, LANG_GAIN, 0, | 1581 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[5].gain, LANG_GAIN, 0, |
1520 | "eq band 5 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, | 1582 | "eq band 5 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, |
1521 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), | 1583 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), |
1522 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[6].gain, LANG_GAIN, 0, | 1584 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[6].gain, LANG_GAIN, 0, |
1523 | "eq band 6 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, | 1585 | "eq band 6 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, |
1524 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), | 1586 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), |
1525 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[7].gain, LANG_GAIN, 0, | 1587 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[7].gain, LANG_GAIN, 0, |
1526 | "eq band 7 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, | 1588 | "eq band 7 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, |
1527 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), | 1589 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), |
1528 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[8].gain, LANG_GAIN, 0, | 1590 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[8].gain, LANG_GAIN, 0, |
1529 | "eq band 8 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, | 1591 | "eq band 8 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, |
1530 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), | 1592 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), |
1531 | INT_SETTING_NOWRAP(F_EQSETTING, eq_band_settings[9].gain, LANG_GAIN, 0, | 1593 | INT_SETTING_NOWRAP(F_DEPRECATED|F_EQSETTING, eq_band_settings[9].gain, LANG_GAIN, 0, |
1532 | "eq band 9 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, | 1594 | "eq band 9 gain", UNIT_DB, EQ_GAIN_MIN, EQ_GAIN_MAX, |
1533 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), | 1595 | EQ_GAIN_STEP, db_format, get_dec_talkid, NULL), |
1534 | 1596 | ||
1597 | #define EQ_BAND(id, string) \ | ||
1598 | CUSTOM_SETTING(F_EQSETTING, eq_band_settings[id], -1, \ | ||
1599 | &eq_defaults[id], string, \ | ||
1600 | eq_load_from_cfg, eq_write_to_cfg, \ | ||
1601 | eq_is_changed, eq_set_default) | ||
1602 | EQ_BAND(0, "eq low shelf filter"), | ||
1603 | EQ_BAND(1, "eq peak filter 1"), | ||
1604 | EQ_BAND(2, "eq peak filter 2"), | ||
1605 | EQ_BAND(3, "eq peak filter 3"), | ||
1606 | EQ_BAND(4, "eq peak filter 4"), | ||
1607 | EQ_BAND(5, "eq peak filter 5"), | ||
1608 | EQ_BAND(6, "eq peak filter 6"), | ||
1609 | EQ_BAND(7, "eq peak filter 7"), | ||
1610 | EQ_BAND(8, "eq peak filter 8"), | ||
1611 | EQ_BAND(9, "eq high shelf filter"), | ||
1612 | #undef EQ_BAND | ||
1613 | |||
1535 | /* dithering */ | 1614 | /* dithering */ |
1536 | OFFON_SETTING(F_SOUNDSETTING, dithering_enabled, LANG_DITHERING, false, | 1615 | OFFON_SETTING(F_SOUNDSETTING, dithering_enabled, LANG_DITHERING, false, |
1537 | "dithering enabled", dsp_dither_enable), | 1616 | "dithering enabled", dsp_dither_enable), |