Hello,
I don't see a problem with your fix except perhaps in dsp_core_init()
where there's :
memset(&dsp_core, 0, sizeof(dsp_core_t));
This is here to initialize the dsp memory area with 0 (or NOP
instructions for the P memory).
The DSP memory is not reseted to zero after a reboot, so we just must be
careful to keep this working as it should (ie: correctly init the DSP
memory at first init, but not after a reboot or a continuity in using it).
But we can consider that loading a memory snapshot inits the memory
first and then the snapshot will rewrite it with the saved datas.
> But I think code could be simplified a bit, there're some calls to
DSP_Init and DSP_UnInit when nDSPType is changed, but I wonder if it's
necessary.
I think we must be careful here with this memory reset to 0 if we
disable / reenable the DSP (it must be considered as a first start to
have the DSP memory full clean)
I hope this makes sense to you.