diff options
| author | MikeTeachman <mike.teachman@gmail.com> | 2021-09-24 20:06:10 -0700 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-11-12 16:50:15 +1100 |
| commit | 0be3b91f11e81ff18a0554c31326ac9df20a2091 (patch) | |
| tree | 5c61e6c01b4e4727349ad3c5a69baac6a2154374 /ports/esp32/machine_i2s.c | |
| parent | 6d9da27c21bcc687f868d77ffca42e4dfc234248 (diff) | |
stm32,esp32: In machine_i2s, send null samples in underflow situations.
Eliminate noise data from being sent to the I2S peripheral when the
transmitted sample stream is stopped.
Signed-off-by: Mike Teachman <mike.teachman@gmail.com>
Diffstat (limited to 'ports/esp32/machine_i2s.c')
| -rw-r--r-- | ports/esp32/machine_i2s.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ports/esp32/machine_i2s.c b/ports/esp32/machine_i2s.c index dc583e8e9..390b01e5e 100644 --- a/ports/esp32/machine_i2s.c +++ b/ports/esp32/machine_i2s.c @@ -448,6 +448,7 @@ STATIC void machine_i2s_init_helper(machine_i2s_obj_t *self, size_t n_pos_args, i2s_config.dma_buf_count = get_dma_buf_count(mode, bits, format, self->ibuf); i2s_config.dma_buf_len = DMA_BUF_LEN_IN_I2S_FRAMES; i2s_config.use_apll = false; + i2s_config.tx_desc_auto_clear = true; // I2S queue size equals the number of DMA buffers check_esp_err(i2s_driver_install(self->port, &i2s_config, i2s_config.dma_buf_count, &self->i2s_event_queue)); |
