summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-02-05 14:58:53 +1100
committerjacqueline <me@jacqueline.id.au>2024-02-05 14:58:53 +1100
commitf4d8b2b04afe0cfd025e4ea0f574f906cb79a840 (patch)
treea25148eb2def8363f34a68856d194ad851894680 /src/drivers
parente07330990775f1037fc54da18d9c97e06368b18a (diff)
downloadtangara-fw-f4d8b2b04afe0cfd025e4ea0f574f906cb79a840.tar.gz
hey i found 40KiB SRAM behind the couch!
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/include/i2s_dac.hpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/drivers/include/i2s_dac.hpp b/src/drivers/include/i2s_dac.hpp
index bd837ca0..fdd7e976 100644
--- a/src/drivers/include/i2s_dac.hpp
+++ b/src/drivers/include/i2s_dac.hpp
@@ -27,12 +27,10 @@
namespace drivers {
-// DMA max buffer size for I2S is 4092. We normalise to 2-channel, 16 bit
-// audio, which gives us a max of 4092 / 2 / 2 (16 bits) frames. This in turn
-// means that at 48kHz, we have about 21ms of budget to fill each buffer.
-// We base this off of the maximum DMA size in order to minimise the amount of
-// work the CPU has to do to service the DMA callbacks.
-constexpr size_t kI2SBufferLengthFrames = 1024;
+// We normalise to 2-channel, 16 bit audio, which gives us a max of 4092 / 2 / 2
+// (16 bits) frames. This in turn means that at 48kHz, we have about 10ms of
+// budget to fill each buffer.
+constexpr size_t kI2SBufferLengthFrames = 512;
/**
* Interface for a DAC that receives PCM samples over I2S.