summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2021-07-09 22:48:19 -0400
committerSolomon Peachy <pizza@shaftnet.org>2021-07-17 08:18:31 -0400
commitcd17decd5a35c9b506bf8433ae56dda00f65ad61 (patch)
treeac64d4ff4a906d48ef21c94d9b6e00e30345fe90
parentec31a2b4ad030dc2ab2a627484dce894a6d4e656 (diff)
downloadrockbox-cd17decd5a35c9b506bf8433ae56dda00f65ad61.tar.gz
rockbox-cd17decd5a35c9b506bf8433ae56dda00f65ad61.zip
xduoox3ii: Add "Super Slow" filter roll-off
I'm not happy with the proliferation of filter-roll-off options but I don't have a less ugly solution. Change-Id: I740fca006fa0c3443a467acfea55b6574d48346b
-rw-r--r--apps/lang/english.lang17
-rw-r--r--apps/settings_list.c3
-rw-r--r--firmware/drivers/audio/xduoolinux_codec.c3
-rw-r--r--firmware/export/xduoolinux_codec.h5
4 files changed, 26 insertions, 2 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index f268434f60..667d1239ca 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -12171,6 +12171,23 @@
12171 </voice> 12171 </voice>
12172</phrase> 12172</phrase>
12173<phrase> 12173<phrase>
12174 id: LANG_FILTER_SUPER_SLOW
12175 desc: in sound settings
12176 user: core
12177 <source>
12178 *: none
12179 filter_roll_off: "Super Slow"
12180 </source>
12181 <dest>
12182 *: none
12183 filter_roll_off: "Super Slow"
12184 </dest>
12185 <voice>
12186 *: none
12187 filter_roll_off: "Super Slow"
12188 </voice>
12189</phrase>
12190<phrase>
12174 id: LANG_FILTER_SHORT 12191 id: LANG_FILTER_SHORT
12175 desc: in sound settings 12192 desc: in sound settings
12176 user: core 12193 user: core
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 1cdbc4115d..5464416b21 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -858,6 +858,9 @@ const struct settings_list settings[] = {
858#elif defined(AUDIOHW_HAVE_SHORT2_ROLL_OFF) 858#elif defined(AUDIOHW_HAVE_SHORT2_ROLL_OFF)
859 "roll_off", "sharp,slow,short sharp,short slow", sound_set_filter_roll_off, 859 "roll_off", "sharp,slow,short sharp,short slow", sound_set_filter_roll_off,
860 4, ID2P(LANG_FILTER_SHARP), ID2P(LANG_FILTER_SLOW), ID2P(LANG_FILTER_SHORT_SHARP), ID2P(LANG_FILTER_SHORT_SLOW)), 860 4, ID2P(LANG_FILTER_SHARP), ID2P(LANG_FILTER_SLOW), ID2P(LANG_FILTER_SHORT_SHARP), ID2P(LANG_FILTER_SHORT_SLOW)),
861#elif defined(AUDIOHW_HAVE_SS_ROLL_OFF)
862 "roll_off", "sharp,slow,short sharp,short slow,super slow", sound_set_filter_roll_off,
863 5, ID2P(LANG_FILTER_SHARP), ID2P(LANG_FILTER_SLOW), ID2P(LANG_FILTER_SHORT_SHARP), ID2P(LANG_FILTER_SHORT_SLOW), ID2P(LANG_FILTER_SUPER_SLOW)),
861#elif defined(AUDIOHW_HAVE_SHORT_ROLL_OFF) 864#elif defined(AUDIOHW_HAVE_SHORT_ROLL_OFF)
862 "roll_off", "sharp,slow,short,bypass", sound_set_filter_roll_off, 865 "roll_off", "sharp,slow,short,bypass", sound_set_filter_roll_off,
863 4, ID2P(LANG_FILTER_SHARP), ID2P(LANG_FILTER_SLOW), ID2P(LANG_FILTER_SHORT), ID2P(LANG_FILTER_BYPASS)), 866 4, ID2P(LANG_FILTER_SHARP), ID2P(LANG_FILTER_SLOW), ID2P(LANG_FILTER_SHORT), ID2P(LANG_FILTER_BYPASS)),
diff --git a/firmware/drivers/audio/xduoolinux_codec.c b/firmware/drivers/audio/xduoolinux_codec.c
index 749d551739..3a25f6f7cf 100644
--- a/firmware/drivers/audio/xduoolinux_codec.c
+++ b/firmware/drivers/audio/xduoolinux_codec.c
@@ -238,7 +238,8 @@ void audiohw_set_filter_roll_off(int value)
238 /* 0 = Sharp; 238 /* 0 = Sharp;
239 1 = Slow; 239 1 = Slow;
240 2 = Short Sharp 240 2 = Short Sharp
241 3 = Short Slow */ 241 3 = Short Slow
242 4 = Super Slow */
242#if defined(XDUOO_X3II) 243#if defined(XDUOO_X3II)
243 long int value_hw = value; 244 long int value_hw = value;
244 alsa_controls_set_ints("AK4490 Digital Filter", 1, &value_hw); 245 alsa_controls_set_ints("AK4490 Digital Filter", 1, &value_hw);
diff --git a/firmware/export/xduoolinux_codec.h b/firmware/export/xduoolinux_codec.h
index 301a341f15..a5bdab0661 100644
--- a/firmware/export/xduoolinux_codec.h
+++ b/firmware/export/xduoolinux_codec.h
@@ -3,7 +3,6 @@
3 3
4#define AUDIOHW_CAPS (LINEOUT_CAP | FILTER_ROLL_OFF_CAP) 4#define AUDIOHW_CAPS (LINEOUT_CAP | FILTER_ROLL_OFF_CAP)
5AUDIOHW_SETTING(VOLUME, "dB", 1, 5, -102*10, 0, -30*10) 5AUDIOHW_SETTING(VOLUME, "dB", 1, 5, -102*10, 0, -30*10)
6AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 4, 0)
7#endif 6#endif
8 7
9// We want this, but the codec takes over a second to unmute! 8// We want this, but the codec takes over a second to unmute!
@@ -12,10 +11,14 @@ AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 4, 0)
12#if defined(XDUOO_X3II) 11#if defined(XDUOO_X3II)
13/* The AK4490 glitches when switching sample rates */ 12/* The AK4490 glitches when switching sample rates */
14#define AUDIOHW_MUTE_ON_SRATE_CHANGE 13#define AUDIOHW_MUTE_ON_SRATE_CHANGE
14AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 5, 0)
15#define AUDIOHW_HAVE_SS_ROLL_OFF
15#endif 16#endif
16 17
17#if defined(XDUOO_X20) 18#if defined(XDUOO_X20)
18//#define AUDIOHW_NEEDS_INITIAL_UNMUTE 19//#define AUDIOHW_NEEDS_INITIAL_UNMUTE
20AUDIOHW_SETTING(FILTER_ROLL_OFF, "", 0, 1, 0, 4, 0)
21#define AUDIOHW_HAVE_SHORT2_ROLL_OFF
19#endif 22#endif
20 23
21void audiohw_mute(int mute); 24void audiohw_mute(int mute);