summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Conrad <dconrad@fastmail.com>2021-09-03 21:56:28 -0500
committerDana Conrad <dconrad@fastmail.com>2021-09-05 15:50:21 +0000
commit17263a813b8bd8c74b2d0b499213f8c9b7415ed6 (patch)
tree4e6039ed36a5f98f4de7da100d9b33fe97ac4c86
parent3e52c7c734e2163bbec2769c775832b90e8f5955 (diff)
downloadrockbox-17263a813b8bd8c74b2d0b499213f8c9b7415ed6.tar.gz
rockbox-17263a813b8bd8c74b2d0b499213f8c9b7415ed6.zip
ErosQ (both): avoid clipping due to DC offset bandaid
Set the maximum volume on both hosted and native ports to -2 dB. Verified behavior here on native and by borkitall on irc for hosted. Change-Id: I3aebc2bb4b9294a4137a33694c83139c0d76099a
-rw-r--r--firmware/export/eros_qn_codec.h10
-rw-r--r--firmware/export/erosqlinux_codec.h9
2 files changed, 16 insertions, 3 deletions
diff --git a/firmware/export/eros_qn_codec.h b/firmware/export/eros_qn_codec.h
index ae04c66799..851ab63362 100644
--- a/firmware/export/eros_qn_codec.h
+++ b/firmware/export/eros_qn_codec.h
@@ -23,10 +23,16 @@
23#ifndef _EROS_QN_CODEC_H 23#ifndef _EROS_QN_CODEC_H
24#define _EROS_QN_CODEC_H 24#define _EROS_QN_CODEC_H
25 25
26/*
27 * Note: Maximum volume is set one step below unity in order to
28 * avoid overflowing pcm samples due to our DC Offset.
29 *
30 * The DAC's output is hot enough this should not be an issue.
31 */
26#define PCM5102A_VOLUME_MIN -740 32#define PCM5102A_VOLUME_MIN -740
27#define PCM5102A_VOLUME_MAX 0 33#define PCM5102A_VOLUME_MAX -20
28 34
29/* a small DC offset appears to prevent play/pause clicking */ 35/* a small DC offset prevents play/pause clicking due to the DAC auto-muting */
30#define PCM_DC_OFFSET_VALUE -1 36#define PCM_DC_OFFSET_VALUE -1
31 37
32AUDIOHW_SETTING(VOLUME, "dB", 0, 2, PCM5102A_VOLUME_MIN/10, PCM5102A_VOLUME_MAX/10, 0) 38AUDIOHW_SETTING(VOLUME, "dB", 0, 2, PCM5102A_VOLUME_MIN/10, PCM5102A_VOLUME_MAX/10, 0)
diff --git a/firmware/export/erosqlinux_codec.h b/firmware/export/erosqlinux_codec.h
index 2ed1ae11cf..ecc10be924 100644
--- a/firmware/export/erosqlinux_codec.h
+++ b/firmware/export/erosqlinux_codec.h
@@ -3,9 +3,16 @@
3 3
4#define AUDIOHW_CAPS (LINEOUT_CAP) 4#define AUDIOHW_CAPS (LINEOUT_CAP)
5 5
6/* a small DC offset prevents play/pause clicking due to the DAC auto-muting */
6#define PCM_DC_OFFSET_VALUE -1 7#define PCM_DC_OFFSET_VALUE -1
7 8
8AUDIOHW_SETTING(VOLUME, "dB", 0, 2, -74, 0, -40) 9/*
10 * Note: Maximum volume is set one step below unity in order to
11 * avoid overflowing pcm samples due to our DC Offset.
12 *
13 * The DAC's output is hot enough this should not be an issue.
14 */
15AUDIOHW_SETTING(VOLUME, "dB", 0, 2, -74, -2, -40)
9 16
10//#define AUDIOHW_NEEDS_INITIAL_UNMUTE 17//#define AUDIOHW_NEEDS_INITIAL_UNMUTE
11 18