summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorAndrew Ryabinin <ryabinin.a.a@gmail.com>2013-05-12 23:23:45 +0400
committerAndrew Ryabinin <ryabinin.a.a@gmail.com>2013-05-24 11:18:16 +0400
commit0519f7e5ab6d17f90257caffad85862187bffed6 (patch)
tree775bf5d5dff034919521d646fe6b01ef5eda8d24 /apps
parentf6e179bd8eeb417e0428b8290df4ca058782e8b3 (diff)
downloadrockbox-0519f7e5ab6d17f90257caffad85862187bffed6.tar.gz
rockbox-0519f7e5ab6d17f90257caffad85862187bffed6.tar.bz2
rockbox-0519f7e5ab6d17f90257caffad85862187bffed6.zip
Add DAC's oversampling filter roll-off selection to sound settings.
Change-Id: I1258ba50dd9308f49d97965562f3a423c9bfb785
Diffstat (limited to 'apps')
-rw-r--r--apps/lang/english.lang42
-rw-r--r--apps/menus/sound_menu.c7
-rw-r--r--apps/settings.c3
-rw-r--r--apps/settings.h4
-rw-r--r--apps/settings_list.c7
5 files changed, 63 insertions, 0 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index 26c0051b58..dbd0baa18a 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -13114,3 +13114,45 @@
*: "Select directories to scan"
</voice>
</phrase>
+<phrase>
+ id: LANG_FILTER_ROLL_OFF
+ desc: in sound settings
+ user: core
+ <source>
+ *: "DAC's filter roll-off"
+ </source>
+ <dest>
+ *: "DAC's filter roll-off"
+ </dest>
+ <voice>
+ *: "DAC's filter roll-off"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_FILTER_SHARP
+ desc: in sound settings
+ user: core
+ <source>
+ *: "Sharp"
+ </source>
+ <dest>
+ *: "Sharp"
+ </dest>
+ <voice>
+ *: "Sharp"
+ </voice>
+</phrase>
+<phrase>
+ id: LANG_FILTER_SLOW
+ desc: in sound settings
+ user: core
+ <source>
+ *: "Slow"
+ </source>
+ <dest>
+ *: "Slow"
+ </dest>
+ <voice>
+ *: "Slow"
+ </voice>
+</phrase>
diff --git a/apps/menus/sound_menu.c b/apps/menus/sound_menu.c
index d24a9cd695..fd192cb661 100644
--- a/apps/menus/sound_menu.c
+++ b/apps/menus/sound_menu.c
@@ -88,6 +88,10 @@ MENUITEM_SETTING(stereo_width, &global_settings.stereo_width,
MENUITEM_SETTING(depth_3d, &global_settings.depth_3d, NULL);
#endif
+#ifdef AUDIOHW_HAVE_FILTER_ROLL_OFF
+MENUITEM_SETTING(roll_off, &global_settings.roll_off, NULL);
+#endif
+
#if CONFIG_CODEC == SWCODEC
/* Crossfeed Submenu */
MENUITEM_SETTING(crossfeed, &global_settings.crossfeed, lowlatency_callback);
@@ -183,6 +187,9 @@ MAKE_MENU(sound_settings, ID2P(LANG_SOUND_SETTINGS), NULL, Icon_Audio,
#ifdef AUDIOHW_HAVE_DEPTH_3D
,&depth_3d
#endif
+#ifdef AUDIOHW_HAVE_FILTER_ROLL_OFF
+ ,&roll_off
+#endif
#if CONFIG_CODEC == SWCODEC
,&crossfeed_menu, &equalizer_menu, &dithering_enabled
#ifdef HAVE_PITCHCONTROL
diff --git a/apps/settings.c b/apps/settings.c
index b04b91cc66..adc53cd14b 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -753,6 +753,9 @@ void sound_settings_apply(void)
#ifdef AUDIOHW_HAVE_DEPTH_3D
sound_set(SOUND_DEPTH_3D, global_settings.depth_3d);
#endif
+#ifdef AUDIOHW_HAVE_FILTER_ROLL_OFF
+ sound_set(SOUND_FILTER_ROLL_OFF, global_settings.roll_off);
+#endif
#ifdef AUDIOHW_HAVE_EQ
int b;
diff --git a/apps/settings.h b/apps/settings.h
index 53ad70b24f..1aec931798 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -790,6 +790,10 @@ struct user_settings
int depth_3d;
#endif
+#ifdef AUDIOHW_HAVE_FILTER_ROLL_OFF
+ int roll_off;
+#endif
+
#ifdef AUDIOHW_HAVE_EQ
/** Hardware EQ tone controls **/
struct hw_eq_band
diff --git a/apps/settings_list.c b/apps/settings_list.c
index ec34a96dc5..c1b40a64b6 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -778,6 +778,13 @@ const struct settings_list settings[] = {
SOUND_SETTING(0,depth_3d, LANG_DEPTH_3D, "3-d enhancement",
SOUND_DEPTH_3D),
#endif
+
+#ifdef AUDIOHW_HAVE_FILTER_ROLL_OFF
+ CHOICE_SETTING(F_SOUNDSETTING, roll_off, LANG_FILTER_ROLL_OFF, 0,
+ "roll_off", "sharp,slow", sound_set_filter_roll_off,
+ 2, ID2P(LANG_FILTER_SHARP), ID2P(LANG_FILTER_SLOW)),
+#endif
+
/* playback */
OFFON_SETTING(0, playlist_shuffle, LANG_SHUFFLE, false, "shuffle", NULL),
SYSTEM_SETTING(NVRAM(4), resume_index, -1),