diff options
author | Dana Conrad <dconrad@fastmail.com> | 2021-03-25 19:34:24 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-04-08 14:37:14 -0400 |
commit | ad55da5f87261d3e855998b02cc811581abe861c (patch) | |
tree | 04d7a6c53325174440b5d4865ecd1ec4d06de423 /firmware/drivers/audio | |
parent | c77cd7027f3597384f4474c049b28014027845b6 (diff) | |
download | rockbox-ad55da5f87261d3e855998b02cc811581abe861c.tar.gz rockbox-ad55da5f87261d3e855998b02cc811581abe861c.zip |
ErosQ: Set Line Level Output volume
With a full-scale 440Hz tone, the line out voltage
measured approx. 5.8Vpp at the 0 setting. WAY too hot!
(9 dBV, in fact)
For 0.894Vpp (-10 dBV - consumer devices), -18 appears to be
about right for line level signals, but for "pro" equipment
a different level may be desired.
Therefore, the user to cap the line out level by re-using the global
volume limit setting.
Change-Id: I0d1d6482ea95537e9a2d00884eaee2713771c614
Diffstat (limited to 'firmware/drivers/audio')
-rw-r--r-- | firmware/drivers/audio/erosqlinux_codec.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/firmware/drivers/audio/erosqlinux_codec.c b/firmware/drivers/audio/erosqlinux_codec.c index c288c63c4f..2812960cb4 100644 --- a/firmware/drivers/audio/erosqlinux_codec.c +++ b/firmware/drivers/audio/erosqlinux_codec.c | |||
@@ -35,6 +35,8 @@ | |||
35 | #include "pcm-alsa.h" | 35 | #include "pcm-alsa.h" |
36 | #include "pcm_sw_volume.h" | 36 | #include "pcm_sw_volume.h" |
37 | 37 | ||
38 | #include "settings.h" | ||
39 | |||
38 | #include "logf.h" | 40 | #include "logf.h" |
39 | 41 | ||
40 | /* | 42 | /* |
@@ -175,8 +177,12 @@ void audiohw_set_volume(int vol_l, int vol_r) | |||
175 | vol_r_hw = vol_r; | 177 | vol_r_hw = vol_r; |
176 | 178 | ||
177 | if (lineout_inserted()) { | 179 | if (lineout_inserted()) { |
178 | l = 0; | 180 | /* On the EROS Q/K hardware, line out is _very_ hot |
179 | r = 0; | 181 | at ~5.8Vpp. As the hardware provides no way to reduce |
182 | output gain, we have to back off on the PCM signal | ||
183 | to avoid blowing out the signal. | ||
184 | */ | ||
185 | l = r = global_settings.volume_limit; | ||
180 | } else { | 186 | } else { |
181 | l = vol_l_hw; | 187 | l = vol_l_hw; |
182 | r = vol_r_hw; | 188 | r = vol_r_hw; |
@@ -198,8 +204,8 @@ void audiohw_set_lineout_volume(int vol_l, int vol_r) | |||
198 | (void)vol_r; | 204 | (void)vol_r; |
199 | 205 | ||
200 | if (lineout_inserted()) { | 206 | if (lineout_inserted()) { |
201 | l = 0; | 207 | l = -180; |
202 | r = 0; | 208 | r = -180; |
203 | } else { | 209 | } else { |
204 | l = vol_l_hw; | 210 | l = vol_l_hw; |
205 | r = vol_r_hw; | 211 | r = vol_r_hw; |