i2s_driver_cleanup
in i2s_stream_idf5.c->i2s_stream_init()
is not safe (AUD-5308)
#1182
Open
3 tasks done
Labels
Type: Bug
Something isn't working
INSTRUCTIONS
Before submitting a new issue, please follow the checklist and try to find the answer.
for some app like examples/speech_recognition/wwe, if you switch the order of
setup_player()
andstart_recorder()
, and create the 2ndi2s_stream
while the first one is working.The 2nd call to
i2s_stream_init
will delete the old handle and create an new one, but not mutex for this, and it doesn't checkconfig->uninstall_drv
, so another i2s_stream maybe still using it.esp-adf/components/audio_stream/i2s_stream_idf5.c
Line 641 in 74c8872
esp-adf/components/audio_stream/i2s_stream_idf5.c
Lines 165 to 166 in 74c8872
esp-adf/components/audio_stream/i2s_stream_idf5.c
Lines 471 to 478 in 74c8872
It may lead to random crash(i2s reader block forever on deleted mutex or random broken memory).
And require an safe way to do it as it does in the old
i2s_stream.c
The text was updated successfully, but these errors were encountered: