Skip to content

Commit 56cdfac

Browse files
committed
Added WMEDMM_SLOWPATH to force RMT for stability
1 parent 34f4905 commit 56cdfac

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

wled00/bus_wrapper.h

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,14 +1179,22 @@ class PolyBus {
11791179
#else
11801180
// standard ESP32 has 8 RMT and 2 I2S channels
11811181
#ifndef WLEDMM_FASTPATH
1182-
if (num > 9) return I_NONE;
1183-
if (num == 8) offset = 2; // first use I2S#1 (so #0 stays available for audio)
1184-
if (num == 9) offset = 1; // use I2S#0 as the last driver
1182+
#ifdef WLEDMM_SLOWPATH // I2S flickers on large installs. Favor stability over framerate.
1183+
if (num > 7) return I_NONE;
1184+
#else
1185+
if (num == 8) offset = 2; // first use I2S#1 (so #0 stays available for audio)
1186+
if (num == 9) offset = 1; // use I2S#0 as the last driver
1187+
if (num > 9) return I_NONE;
1188+
#endif
11851189
#else
11861190
// ESP32 "audio_fastpath" - 8 RMT and 1 I2S channels. RMT 5-8 have sending delays, so use I2S#1 before going for RMT 5-8
1187-
if (num > 8) return I_NONE;
1188-
if (num == 1) offset = 2; // use I2S#1 as 2nd bus - seems to be a good compromise for performance, and reduces flickering for some users
1189-
//if (num == 0) offset = 2; // un-comment to use I2S#1 as 1st bus - sometimes helps, if you experience flickering during Wifi or filesystem activity.
1191+
#ifdef WLEDMM_SLOWPATH // I2S flickers on large installs. Favor stability over framerate.
1192+
if (num > 7) return I_NONE;
1193+
#else
1194+
if (num > 8) return I_NONE;
1195+
if (num == 1) offset = 2; // use I2S#1 as 2nd bus - seems to be a good compromise for performance, and reduces flickering for some users
1196+
// if (num == 0) offset = 2; // un-comment to use I2S#1 as 1st bus - sometimes helps, if you experience flickering during Wifi or filesystem activity.
1197+
#endif
11901198
#endif
11911199
#endif
11921200
switch (busType) {

0 commit comments

Comments
 (0)