-
Notifications
You must be signed in to change notification settings - Fork 12
feat(t-deck): Add audio output and sdcard support #417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* Update `espp::TDeck` to support audio output with same API as `espp::EspBox` for interoperability * Update t-deck example to demonstrate audio the same way that the esp-box example does Improves the utility and functionality of the device to better support the T-Deck. This is also part of the work to allow the esp-box-emu project to run on the TDeck. Build and run `t-deck/example` on a TDeck and ensure it works and the sound plays correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
✅Static analysis result - no issues found! ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds audio output and SD card support to the TDeck platform while updating related documentation and example code.
- Adds SPI bus initialization for shared LCD, SD card, and audio support.
- Implements I2S-based audio playback and SD card mounting functionality.
- Updates the t-deck example to demonstrate audio controls alongside existing features.
Reviewed Changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
components/t-deck/src/t-deck.cpp | Adds SPI bus initialization and configures CS pins for peripherals. |
components/t-deck/src/sdcard.cpp | Implements SD card initialization with FAT filesystem mounting. |
components/t-deck/src/buttons.cpp | Introduces boot button initialization with interrupt support. |
components/t-deck/src/audio.cpp | Adds I2S audio support, audio task callback, and playback functions. |
components/t-deck/include/t-deck.hpp | Updates header to expose new audio and SD card APIs. |
components/t-deck/example/main/t_deck_example.cpp | Updates example to load and play audio, and demonstrate volume/mute control. |
components/esp-box/include/esp-box.hpp | Minor update to alias definitions for consistency. |
Files not reviewed (2)
- components/t-deck/CMakeLists.txt: Language not supported
- components/t-deck/example/main/CMakeLists.txt: Language not supported
Comments suppressed due to low confidence (1)
components/t-deck/src/audio.cpp:170
- The flag 'has_sound' is set to true after queuing audio but is never reset, which may cause subsequent calls to block indefinitely. Consider resetting this flag once the audio task completes processing.
play_audio_task_handle_ = xTaskGetCurrentTaskHandle();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Description
espp::TDeck
to support audio output with same API asespp::EspBox
for interoperabilityespp::TDeck
to support sdcard configurationMotivation and Context
Improves the utility and functionality of the device to better support the T-Deck. This is also part of the work to allow the esp-box-emu project to run on the TDeck.
How has this been tested?
Build and run
t-deck/example
on a TDeck and ensure it works and the sound plays correctly.Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):
Types of changes
Checklist:
Software
.github/workflows/build.yml
file to add my new test to the automated cloud build github action.