Skip to content
Draft
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5518b94
feat: isolate T-Deck-Pro&Max touch hardware and input pipeline
liurbinbin Aug 17, 2026
290dc38
feat: refactor and optimize T-Deck-Pro&Max E-Ink UI and touch controls
liurbinbin Aug 17, 2026
cd5f2ba
feat: add T-Deck-Pro&Max notification haptics and A7682E audio
liurbinbin Aug 17, 2026
129b1ec
feat: add T-Deck-MAX board foundation
liurbinbin Aug 17, 2026
c8329f3
feat: add T-Deck MAX peripherals and board controls
liurbinbin Aug 17, 2026
878776b
fix: include T-Deck MAX variant initialization
liurbinbin Aug 17, 2026
fcb25e9
fix: keep PR1 independent from haptics and audio
liurbinbin Aug 17, 2026
24a52da
fix: keep PR2 independent from notification dependencies
liurbinbin Aug 18, 2026
4938669
chore: base PR3 on PR2
liurbinbin Aug 18, 2026
601f3b6
feat: restore PR3 T-Deck audio haptics and notifications
liurbinbin Aug 18, 2026
41e3a35
chore: base PR4 on PR3
liurbinbin Aug 18, 2026
1e4efcc
chore: resolve develop conflicts for PR2
liurbinbin Aug 18, 2026
54cedf4
chore: resolve develop conflicts for PR3
liurbinbin Aug 19, 2026
fe9525b
Merge remote-tracking branch 'upstream/develop' into verify/t-deck-pr…
liurbinbin Aug 19, 2026
448918e
Merge remote-tracking branch 'origin/feature/t-deck-pro-max-pr3' into…
liurbinbin Aug 19, 2026
6b60bbf
fix: add ESP8266Audio dependency for T-Deck MAX
liurbinbin Aug 19, 2026
d4b7db4
chore: resolve PR5 conflicts with upstream develop
liurbinbin Aug 19, 2026
f8e4f55
fix: use unique_ptr for T-Deck MAX BHI260AP
liurbinbin Aug 19, 2026
c221be3
feat(t5s3): adapt new UI, keyboard, and side key
liurbinbin Aug 24, 2026
da85d2a
Merge upstream develop and resolve PR6 conflicts
liurbinbin Aug 24, 2026
9534565
fix: guard T-Deck MAX IMU power control
liurbinbin Aug 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions src/AudioThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
#include "sleep.h"
#include <memory>

#if defined(T_DECK_MAX)
#include "platform/extra_variants/t_deck_max/TDeckMaxBoard.h"
#endif

#ifdef HAS_I2S
#include <AudioFileSourcePROGMEM.h>
#include <AudioGeneratorRTTTL.h>
Expand All @@ -15,7 +19,7 @@
// A board with an I2S amplifier opts in by defining AUDIO_AMP_ENABLE(on) in its variant.h to power the
// amp on/off around playback (e.g. an enable pin on an I/O expander). The includes below expose the
// expander instances (io / mcpIoExpander) those macros typically reference.
#ifdef USE_XL9555
#if defined(USE_XL9555) && !defined(T_DECK_MAX)
#include "ExtensionIOXL9555.hpp"
extern ExtensionIOXL9555 io;
#endif
Expand All @@ -33,6 +37,11 @@ class AudioThread : public concurrency::OSThread

void beginRttl(const void *data, uint32_t len)
{
#if defined(T_DECK_MAX)
if (i2sRtttl != nullptr)
stop();
tDeckMaxSetAudioRoute(false);
#endif
#ifdef AUDIO_AMP_ENABLE
AUDIO_AMP_ENABLE(true);
#endif
Expand All @@ -46,7 +55,12 @@ class AudioThread : public concurrency::OSThread
bool isPlaying()
{
if (i2sRtttl != nullptr) {
return i2sRtttl->isRunning() && i2sRtttl->loop();
const bool playing = i2sRtttl->isRunning() && i2sRtttl->loop();
#if defined(T_DECK_MAX)
if (!playing)
stop();
#endif
return playing;
}
return false;
}
Expand All @@ -63,25 +77,38 @@ class AudioThread : public concurrency::OSThread
setCPUFast(false);
#ifdef AUDIO_AMP_ENABLE
AUDIO_AMP_ENABLE(false);
#endif
#if defined(T_DECK_MAX)
tDeckMaxSetAudioRoute(false);
#endif
}

void readAloud(const char *text)
{
if (i2sRtttl != nullptr) {
#if defined(T_DECK_MAX)
stop();
#else
i2sRtttl->stop();
i2sRtttl = nullptr;
#endif
}

#ifdef AUDIO_AMP_ENABLE
AUDIO_AMP_ENABLE(true);
#endif
#if defined(T_DECK_MAX)
tDeckMaxSetAudioRoute(false);
#endif
auto sam = std::unique_ptr<ESP8266SAM>(new ESP8266SAM);
sam->Say(audioOut.get(), text);
setCPUFast(false);
audioOut->stop();
#ifdef AUDIO_AMP_ENABLE
AUDIO_AMP_ENABLE(false);
#endif
#if defined(T_DECK_MAX)
tDeckMaxSetAudioRoute(false);
#endif
}

Expand Down
Loading