From 8d02ccd2f7236c8a12a31ab4dca3347f7ed7f14e Mon Sep 17 00:00:00 2001 From: Mahavir Jain Date: Fri, 23 Nov 2018 14:39:04 +0530 Subject: [PATCH] examples: enable option to auto clear I2S tx descriptor on underflow Closes: https://github.com/espressif/esp-idf/issues/1945 (cherry picked from commit 1751607adfe7078f89a2bd07ea7f0a261cf8421c) --- examples/bluetooth/a2dp_gatts_coex/main/main.c | 5 +++-- examples/bluetooth/a2dp_sink/main/main.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/bluetooth/a2dp_gatts_coex/main/main.c b/examples/bluetooth/a2dp_gatts_coex/main/main.c index 69e489930..367602705 100644 --- a/examples/bluetooth/a2dp_gatts_coex/main/main.c +++ b/examples/bluetooth/a2dp_gatts_coex/main/main.c @@ -653,8 +653,9 @@ void app_main() .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT, //2-channels .communication_format = I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB, .dma_buf_count = 6, - .dma_buf_len = 60, // - .intr_alloc_flags = ESP_INTR_FLAG_LEVEL1 //Interrupt level 1 + .dma_buf_len = 60, + .intr_alloc_flags = 0, //Default interrupt priority + .tx_desc_auto_clear = true //Auto clear tx descriptor on underflow }; diff --git a/examples/bluetooth/a2dp_sink/main/main.c b/examples/bluetooth/a2dp_sink/main/main.c index 66850d30d..830afe45e 100644 --- a/examples/bluetooth/a2dp_sink/main/main.c +++ b/examples/bluetooth/a2dp_sink/main/main.c @@ -63,8 +63,9 @@ void app_main() .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT, //2-channels .communication_format = I2S_COMM_FORMAT_I2S_MSB, .dma_buf_count = 6, - .dma_buf_len = 60, // - .intr_alloc_flags = ESP_INTR_FLAG_LEVEL1 //Interrupt level 1 + .dma_buf_len = 60, + .intr_alloc_flags = 0, //Default interrupt priority + .tx_desc_auto_clear = true //Auto clear tx descriptor on underflow };