Skip to content
Commit 9eaed805 authored by Mike J. Chen's avatar Mike J. Chen Committed by Daniel DeGrasse
Browse files

drivers: audio: dmic_mcux: init active_buf_idx when setting up dma



In case the dmic had previous been run and stopped,
make sure active_buf_idx is initialized to 0 when
setting up dma on start, otherwise the dma callback
can return the wrong buffer.

Also purge the rx_queue before freeing the slab buffers,
to minimize risk of any async read request getting
back a slab buffer that is freed.

Signed-off-by: default avatarMike J. Chen <mjchen@google.com>
parent ae3fb6e0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment