diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2016-08-21 20:30:32 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2016-12-12 13:12:47 +0100 |
commit | 69ea311398ed26797aec837f26b18c2e3e50744c (patch) | |
tree | 0c6d1edfaec5c60b0ce016af9a0bd4478ba075b9 | |
parent | 90a32ccad61c506fb021feb0e983e9c2aade8876 (diff) | |
download | rockbox-69ea311398ed26797aec837f26b18c2e3e50744c.tar.gz rockbox-69ea311398ed26797aec837f26b18c2e3e50744c.zip |
wm8758: document and fix audiohw settings
It looks like a copy and paste error to me, those were completely wrong.
Change-Id: Id6ae025f4216ffccb1a8b8b790916d8b6c4694bd
-rw-r--r-- | firmware/drivers/audio/wm8758.c | 1 | ||||
-rw-r--r-- | firmware/export/wm8758.h | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/firmware/drivers/audio/wm8758.c b/firmware/drivers/audio/wm8758.c index 9ae78191bf..df90081354 100644 --- a/firmware/drivers/audio/wm8758.c +++ b/firmware/drivers/audio/wm8758.c | |||
@@ -305,6 +305,7 @@ void audiohw_disable_recording(void) | |||
305 | wmcodec_write(PWRMGMT2, PWRMGMT2_ROUT1EN | PWRMGMT2_LOUT1EN); | 305 | wmcodec_write(PWRMGMT2, PWRMGMT2_ROUT1EN | PWRMGMT2_LOUT1EN); |
306 | } | 306 | } |
307 | 307 | ||
308 | /* volume in 0 .. 63, corresponds to -12dB .. +35.25dB in 0.75dB steps */ | ||
308 | void audiohw_set_recvol(int left, int right, int type) | 309 | void audiohw_set_recvol(int left, int right, int type) |
309 | { | 310 | { |
310 | switch (type) | 311 | switch (type) |
diff --git a/firmware/export/wm8758.h b/firmware/export/wm8758.h index db6dd083dd..d4194b90ee 100644 --- a/firmware/export/wm8758.h +++ b/firmware/export/wm8758.h | |||
@@ -32,9 +32,12 @@ AUDIOHW_SETTING(TREBLE, "dB", 0, 1, -12, 12, 0) | |||
32 | AUDIOHW_SETTING(BASS_CUTOFF, "", 0, 1, 1, 4, 1) | 32 | AUDIOHW_SETTING(BASS_CUTOFF, "", 0, 1, 1, 4, 1) |
33 | AUDIOHW_SETTING(TREBLE_CUTOFF, "", 0, 1, 1, 4, 1) | 33 | AUDIOHW_SETTING(TREBLE_CUTOFF, "", 0, 1, 1, 4, 1) |
34 | #ifdef HAVE_RECORDING | 34 | #ifdef HAVE_RECORDING |
35 | AUDIOHW_SETTING(LEFT_GAIN, "dB", 1, 1, 0, 63, 16, ((val - 23) * 15) / 2 + 200) | 35 | /* The input PGAs have a gain range from -12dB to +35.25dB in 0.75dB steps |
36 | AUDIOHW_SETTING(RIGHT_GAIN, "dB", 1, 1, 0, 63, 16, ((val - 23) * 15) / 2 + 200) | 36 | * Values: 0, 1, ..., 63 |
37 | AUDIOHW_SETTING(MIC_GAIN, "dB", 1, 1, 0, 63, 16, ((val - 23) * 15) / 2 + 200) | 37 | * => -12dB, -11.25dB, ..., 35.25dB */ |
38 | AUDIOHW_SETTING(LEFT_GAIN, "dB", 1, 1, 0, 63, 16, ((val) * 15) / 2 - 120) | ||
39 | AUDIOHW_SETTING(RIGHT_GAIN, "dB", 1, 1, 0, 63, 16, ((val) * 15) / 2 - 120) | ||
40 | AUDIOHW_SETTING(MIC_GAIN, "dB", 1, 1, 0, 63, 16, ((val) * 15) / 2 - 120) | ||
38 | #endif /* HAVE_RECORDING */ | 41 | #endif /* HAVE_RECORDING */ |
39 | 42 | ||
40 | void audiohw_enable_lineout(bool enable); | 43 | void audiohw_enable_lineout(bool enable); |