summaryrefslogtreecommitdiffstats
path: root/firmware/export
diff options
context:
space:
mode:
authorDana Conrad <dconrad@fastmail.com>2021-07-31 10:15:12 -0500
committerAidan MacDonald <amachronic@protonmail.com>2021-08-07 14:21:47 +0000
commit16b009825608164b17dabd877c78123a667b4981 (patch)
treee7c88e07ddadff4b62802f561e8c9a83c90ae925 /firmware/export
parent57293f1fd9d091145059293d88bb15c8749bb596 (diff)
downloadrockbox-16b009825608164b17dabd877c78123a667b4981.tar.gz
rockbox-16b009825608164b17dabd877c78123a667b4981.zip
ErosQ Native: Add DC Offset to PCM data
A small negative offset seems to silence all play/pause clicking on the PCM5102A. Also adding PCM soft muting, and muting the headphone amp when the headphones are detected as removed. This has been tested to not cause any unintended side effects on the line out. Also confirmed the numerical dB values are (approx.) correct. Change-Id: I689d68887c86add9cc5e0ccb0c7de01aaa69b4d9
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/eros_qn_codec.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/export/eros_qn_codec.h b/firmware/export/eros_qn_codec.h
index 15c745c04b..9c900186a8 100644
--- a/firmware/export/eros_qn_codec.h
+++ b/firmware/export/eros_qn_codec.h
@@ -26,6 +26,9 @@
#define PCM5102A_VOLUME_MIN -740
#define PCM5102A_VOLUME_MAX 0
+/* 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)
/* this just calls audiohw_set_volume() with the last (locally) known volume,