Skip to content

Commit

Permalink
Cherry pick tdeck fixes (meshtastic#5422)
Browse files Browse the repository at this point in the history
* Try-fix (workaround) T-Deck audio crash

* set T-Deck audio to unused 48 (mem mclk)

* swap mclk to gpio 21

* dreamcatcher: assign GPIO44 to audio mclk

---------

Co-authored-by: mverch67 <[email protected]>
  • Loading branch information
2 people authored and fifieldt committed Dec 14, 2024
1 parent d1e9330 commit c14c7ae
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/AudioThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class AudioThread : public concurrency::OSThread
void initOutput()
{
audioOut = new AudioOutputI2S(1, AudioOutputI2S::EXTERNAL_I2S);
audioOut->SetPinout(DAC_I2S_BCK, DAC_I2S_WS, DAC_I2S_DOUT);
audioOut->SetPinout(DAC_I2S_BCK, DAC_I2S_WS, DAC_I2S_DOUT, DAC_I2S_MCLK);
audioOut->SetGain(0.2);
};

Expand Down
2 changes: 1 addition & 1 deletion variants/dreamcatcher/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ build_flags =
-DARDUINO_USB_CDC_ON_BOOT=1

lib_deps = ${esp32s3_base.lib_deps}
earlephilhower/ESP8266Audio@^1.9.7
earlephilhower/ESP8266Audio@^1.9.9
earlephilhower/ESP8266SAM@^1.0.1

[env:dreamcatcher-2206]
Expand Down
1 change: 1 addition & 0 deletions variants/dreamcatcher/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#define DAC_I2S_BCK 21
#define DAC_I2S_WS 9
#define DAC_I2S_DOUT 48
#define DAC_I2S_MCLK 44

#define BIAS_T_ENABLE 7 // needs to be low
#define BIAS_T_VALUE 0
Expand Down
2 changes: 1 addition & 1 deletion variants/t-deck/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ build_flags = ${esp32_base.build_flags}

lib_deps = ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.1.9
earlephilhower/ESP8266Audio@^1.9.7
earlephilhower/ESP8266Audio@^1.9.9
earlephilhower/ESP8266SAM@^1.0.1
1 change: 1 addition & 0 deletions variants/t-deck/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
#define DAC_I2S_BCK 7
#define DAC_I2S_WS 5
#define DAC_I2S_DOUT 6
#define DAC_I2S_MCLK 21 // GPIO lrck mic

// LoRa
#define USE_SX1262
Expand Down
2 changes: 1 addition & 1 deletion variants/t-watch-s3/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ lib_deps = ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.1.9
lewisxhe/[email protected]
adafruit/Adafruit DRV2605 Library@^1.2.2
earlephilhower/ESP8266Audio@^1.9.7
earlephilhower/ESP8266Audio@^1.9.9
earlephilhower/ESP8266SAM@^1.0.1
1 change: 1 addition & 0 deletions variants/t-watch-s3/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#define DAC_I2S_BCK 48
#define DAC_I2S_WS 15
#define DAC_I2S_DOUT 46
#define DAC_I2S_MCLK 0

#define HAS_AXP2101

Expand Down

0 comments on commit c14c7ae

Please sign in to comment.