From 4608877c12f2a7a0d4ace4f7e656b352ccf15bfe Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 11 Aug 2021 12:10:49 -0400 Subject: [PATCH] address review comments --- ports/raspberrypi/audio_dma.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/ports/raspberrypi/audio_dma.c b/ports/raspberrypi/audio_dma.c index 012d755e66..e9f62281cf 100644 --- a/ports/raspberrypi/audio_dma.c +++ b/ports/raspberrypi/audio_dma.c @@ -153,7 +153,7 @@ STATIC void audio_dma_load_next_block(audio_dma_t *dma, size_t buffer_idx) { } // Convert the sample format resolution and signedness, as necessary. - // The input sample buffer is what was read from a file or a raw sample buffer. + // The input sample buffer is what was read from a file, Mixer, or a raw sample buffer. // The output buffer is one of the DMA buffers (passed in), or if no conversion was done, // the original sample buffer (to save copying). @@ -370,13 +370,6 @@ void audio_dma_stop(audio_dma_t *dma) { dma_channel_abort(channel); } - // Write a zero as the last sample. This stops any PWM output. - if (dma->output_resolution <= 8) { - *((uint8_t *)dma->output_register_address) = 0; - } else { - *((uint16_t *)dma->output_register_address) = 0; - } - dma_channel_set_read_addr(channel, NULL, false /* trigger */); dma_channel_set_write_addr(channel, NULL, false /* trigger */); dma_channel_set_trans_count(channel, 0, false /* trigger */);