summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorDana Conrad <dconrad@fastmail.com>2021-08-01 21:58:33 -0500
committerAidan MacDonald <amachronic@protonmail.com>2021-08-07 14:21:47 +0000
commit56b0dde5451ddedfd85c82391536e310cd05e1a8 (patch)
tree19d988f8cad0976abd086ee306ecbc840a1d477d /firmware/export
parent16b009825608164b17dabd877c78123a667b4981 (diff)
Higher bitdepth software volume scaling
Operates between 0 and -74 dB (mute) without issue Change-Id: I497e002bd8db43833a09ebbc29212fbb6cc8ebfd
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/config/erosqnative.h3
-rw-r--r--firmware/export/eros_qn_codec.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/firmware/export/config/erosqnative.h b/firmware/export/config/erosqnative.h
index 1b37b6042a..b2b6f3f89e 100644
--- a/firmware/export/config/erosqnative.h
+++ b/firmware/export/config/erosqnative.h
@@ -64,6 +64,9 @@
#define HAVE_SW_TONE_CONTROLS
#define HAVE_SW_VOLUME_CONTROL
+/* use high-bitdepth volume scaling */
+#define PCM_NATIVE_BITDEPTH 24
+
/* Button defines */
#define CONFIG_KEYPAD EROSQ_PAD
#define HAVE_SCROLLWHEEL
diff --git a/firmware/export/eros_qn_codec.h b/firmware/export/eros_qn_codec.h
index 9c900186a8..ae04c66799 100644
--- a/firmware/export/eros_qn_codec.h
+++ b/firmware/export/eros_qn_codec.h
@@ -29,7 +29,7 @@
/* a small DC offset appears to prevent play/pause clicking */
#define PCM_DC_OFFSET_VALUE -1
-AUDIOHW_SETTING(VOLUME, "dB", 0, 1, PCM5102A_VOLUME_MIN/10, PCM5102A_VOLUME_MAX/10, 0)
+AUDIOHW_SETTING(VOLUME, "dB", 0, 2, PCM5102A_VOLUME_MIN/10, PCM5102A_VOLUME_MAX/10, 0)
/* this just calls audiohw_set_volume() with the last (locally) known volume,
* used for switching to/from fixed line out volume. */