summaryrefslogtreecommitdiff
path: root/src/drivers/wm8523.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-01-04 15:57:58 +1100
committerjacqueline <me@jacqueline.id.au>2024-01-04 15:57:58 +1100
commit938ba62f57ed2c002bae4aec236eeaeb200e4cba (patch)
treed70948199d1f7a2572df5f2940ee13eb79537937 /src/drivers/wm8523.cpp
parent42a98a3799bdfb328c5b5683bbf3d77046f1f5f8 (diff)
downloadtangara-fw-938ba62f57ed2c002bae4aec236eeaeb200e4cba.tar.gz
refactor handling of volume steps; improve controls
Diffstat (limited to 'src/drivers/wm8523.cpp')
-rw-r--r--src/drivers/wm8523.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/drivers/wm8523.cpp b/src/drivers/wm8523.cpp
index 5f6c8053..9fe3e001 100644
--- a/src/drivers/wm8523.cpp
+++ b/src/drivers/wm8523.cpp
@@ -32,6 +32,8 @@ const uint16_t kDefaultVolume = kLineLevelReferenceVolume - 96;
// Default to +6dB == 2Vrms == 'CD Player'
const uint16_t kDefaultMaxVolume = kLineLevelReferenceVolume + 12;
+const uint16_t kZeroDbVolume = 0x190;
+
static const uint8_t kAddress = 0b0011010;
auto ReadRegister(Register reg) -> std::optional<uint16_t> {