Closed digidocs closed 2 months ago
Looks good as well
Thanks for reviewing. Anything else needed to get this one merged?
No, I don't think so
Thank you for your contribution!
@digidocs: I'm re-opening that b/c I was working on the s3 version and unfortunately, this PR was esp32-specific. I've put it somewhere else but I'm not sure it works b/c it does a critical section request within the panic handler... Could you try the latest code I've pushed?
@philippe44 I worry that calling i2s_stop could inconsistently cause deadlocks or other faults during the panic process. The system is already crashing so it's best to minimize the footprint of other code that we call. If I have some time I can try to look at other ways of doing this that might work. I'm not as familiar with the S3 portions of the codebase. Is there anything I should know about there as I think about other ideas?
I fully agree with you but the problem is that the way it is done now is by adding code to i2s.c which is a part of esp-idf. So it required a local "override" copy of the whole file so in case esp-idf changes, we missed it. It's necessary for esp32 4.3 b/c espressif had a bug in the pll loop calculation that they never corrected, but on s3 I was able to have no override at all for any file. To do as you did, we would need again an override copy for s3. Not great...
When a panic occurs during playback, the I2S interface can produce a loud noise burst. This PR intercepts the system panic handler to "emergency stop" the I2S interface to prevent the noise burst from happening. This PR also adds an "abort" command to the command interface that can be used to test this feature.