Skip to content

Commit 24e641a

Browse files
committed
Fix for Issue #4266
1 parent d79d687 commit 24e641a

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

ports/raspberrypi/audio_dma.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ bool audio_dma_get_playing(audio_dma_t *dma) {
368368
}
369369
if (!dma_channel_is_busy(dma->channel[0]) &&
370370
!dma_channel_is_busy(dma->channel[1])) {
371-
audio_dma_stop(dma);
372371
return false;
373372
}
374373

ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,14 @@ void common_hal_audiopwmio_pwmaudioout_deinit(audiopwmio_pwmaudioout_obj_t *self
126126
}
127127

128128
void common_hal_audiopwmio_pwmaudioout_play(audiopwmio_pwmaudioout_obj_t *self, mp_obj_t sample, bool loop) {
129-
if (common_hal_audiopwmio_pwmaudioout_get_playing(self)) {
130-
common_hal_audiopwmio_pwmaudioout_stop(self);
131-
}
132129

133130
// TODO: Share pacing timers based on frequency.
134131
size_t pacing_timer = NUM_DMA_TIMERS;
135132
for (size_t i = 0; i < NUM_DMA_TIMERS; i++) {
136133
if (dma_hw->timer[i] == 0) {
137134
pacing_timer = i;
135+
break;
138136
}
139-
break;
140137
}
141138
if (pacing_timer == NUM_DMA_TIMERS) {
142139
mp_raise_RuntimeError(translate("No DMA pacing timer found"));

0 commit comments

Comments
 (0)