summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-08-03 15:32:28 +1000
committerjacqueline <me@jacqueline.id.au>2023-08-03 15:32:28 +1000
commit3511852f39cd5023ec8e6d0b94cc69f34e9201ed (patch)
treefa38c2dd0a88d39616540e59f9850b919e20d852 /src/drivers
parentfbebc525117f18d5751e6951bc4ffcc51f70dcc4 (diff)
downloadtangara-fw-3511852f39cd5023ec8e6d0b94cc69f34e9201ed.tar.gz
Add very limited resampling (it's slow as shit)
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/bluetooth.cpp2
-rw-r--r--src/drivers/i2s_dac.cpp1
-rw-r--r--src/drivers/include/bluetooth.hpp19
-rw-r--r--src/drivers/include/i2s_dac.hpp6
4 files changed, 13 insertions, 15 deletions
diff --git a/src/drivers/bluetooth.cpp b/src/drivers/bluetooth.cpp
index 9748522f..a02fa620 100644
--- a/src/drivers/bluetooth.cpp
+++ b/src/drivers/bluetooth.cpp
@@ -5,7 +5,7 @@
namespace drivers {
auto Bluetooth::Enable() -> Bluetooth* {
- return nullptr;
+ return nullptr;
}
} // namespace drivers
diff --git a/src/drivers/i2s_dac.cpp b/src/drivers/i2s_dac.cpp
index c835fb1f..885321d1 100644
--- a/src/drivers/i2s_dac.cpp
+++ b/src/drivers/i2s_dac.cpp
@@ -161,7 +161,6 @@ auto I2SDac::Reconfigure(Channels ch, BitsPerSample bps, SampleRate rate)
word_length = 0b10;
break;
case BPS_32:
- // TODO(jacqueline): Error on this? It's not supported anymore.
slot_config_.data_bit_width = I2S_DATA_BIT_WIDTH_32BIT;
slot_config_.ws_width = 32;
word_length = 0b11;
diff --git a/src/drivers/include/bluetooth.hpp b/src/drivers/include/bluetooth.hpp
index f3a4b2ac..22b58c8b 100644
--- a/src/drivers/include/bluetooth.hpp
+++ b/src/drivers/include/bluetooth.hpp
@@ -6,14 +6,15 @@
namespace drivers {
class Bluetooth {
- public:
- static auto Enable() -> Bluetooth*;
- Bluetooth();
- ~Bluetooth();
+ public:
+ static auto Enable() -> Bluetooth*;
+ Bluetooth();
+ ~Bluetooth();
- struct Device {};
- auto Scan() -> std::vector<Device>;
- private:
- };
+ struct Device {};
+ auto Scan() -> std::vector<Device>;
-}
+ private:
+};
+
+} // namespace drivers
diff --git a/src/drivers/include/i2s_dac.hpp b/src/drivers/include/i2s_dac.hpp
index 06c0dc16..889ba68c 100644
--- a/src/drivers/include/i2s_dac.hpp
+++ b/src/drivers/include/i2s_dac.hpp
@@ -51,14 +51,12 @@ class I2SDac {
BPS_32 = I2S_DATA_BIT_WIDTH_32BIT,
};
enum SampleRate {
- SAMPLE_RATE_11_025 = 11025,
- SAMPLE_RATE_16 = 16000,
- SAMPLE_RATE_22_05 = 22050,
+ SAMPLE_RATE_8 = 8000,
SAMPLE_RATE_32 = 32000,
SAMPLE_RATE_44_1 = 44100,
SAMPLE_RATE_48 = 48000,
+ SAMPLE_RATE_88_2 = 88200,
SAMPLE_RATE_96 = 96000,
- SAMPLE_RATE_192 = 192000,
};
auto Reconfigure(Channels ch, BitsPerSample bps, SampleRate rate) -> void;