Skip to content

Commit 5f0e41a

Browse files
committed
I2SOut: Enable ticks during audio playback
.. otherwise, the background callback to load the I2S fifos does not get run. (I'm not sure this is _correct_ behavior of sleep + background tasks, but it is the current behavior)
1 parent 430bcdb commit 5f0e41a

File tree

1 file changed

+4
-0
lines changed
  • ports/esp32s2/common-hal/audiobusio

1 file changed

+4
-0
lines changed

ports/esp32s2/common-hal/audiobusio/I2SOut.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t* self,
6363
self->bit_clock = bit_clock;
6464
self->word_select = word_select;
6565
self->data = data;
66+
67+
supervisor_enable_tick();
6668
}
6769

6870
bool common_hal_audiobusio_i2sout_deinited(audiobusio_i2sout_obj_t* self) {
@@ -93,6 +95,8 @@ void common_hal_audiobusio_i2sout_deinit(audiobusio_i2sout_obj_t* self) {
9395
port_i2s_reset_instance(self->peripheral.instance);
9496
}
9597
self->peripheral.instance = -1;
98+
99+
supervisor_disable_tick();
96100
}
97101

98102
void common_hal_audiobusio_i2sout_play(audiobusio_i2sout_obj_t* self,

0 commit comments

Comments
 (0)