File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 31
31
32
32
#include "shared-bindings/audiocore/RawSample.h"
33
33
#include "shared-bindings/audiocore/WaveFile.h"
34
+ #include "supervisor/shared/tick.h"
34
35
35
36
#include "py/mpstate.h"
36
37
#include "py/runtime.h"
@@ -60,6 +61,7 @@ void audio_dma_free_channel(uint8_t channel) {
60
61
assert (audio_dma_allocated [channel ]);
61
62
audio_dma_disable_channel (channel );
62
63
audio_dma_allocated [channel ] = false;
64
+ supervisor_disable_tick ();
63
65
}
64
66
65
67
void audio_dma_disable_channel (uint8_t channel ) {
@@ -71,6 +73,7 @@ void audio_dma_disable_channel(uint8_t channel) {
71
73
void audio_dma_enable_channel (uint8_t channel ) {
72
74
if (channel >= AUDIO_DMA_CHANNEL_COUNT )
73
75
return ;
76
+ supervisor_enable_tick ();
74
77
dma_enable_channel (channel );
75
78
}
76
79
@@ -318,6 +321,9 @@ void audio_dma_reset(void) {
318
321
for (uint8_t i = 0 ; i < AUDIO_DMA_CHANNEL_COUNT ; i ++ ) {
319
322
audio_dma_state [i ] = NULL ;
320
323
audio_dma_pending [i ] = false;
324
+ if (audio_dma_allocated [i ]) {
325
+ supervisor_disable_tick ();
326
+ }
321
327
audio_dma_allocated [i ] = false;
322
328
audio_dma_disable_channel (i );
323
329
dma_descriptor (i )-> BTCTRL .bit .VALID = false;
You can’t perform that action at this time.
0 commit comments