The idea of feedback-based userspace software thermal management like this seems suboptimal to me — the failure modes are nasty. (By feedback-based, I mean using V/I sense from the amp.) The goal is to prevent the voice coil from overheating, ever. So some kind of calculation runs at some interval t, and it needs to ensure that, over the upcoming time t, the input to the amp can’t possibly overheat the coil, and of c…
If it's really really important then you'd want to move it to a custom core on the SoC of course, but that'd make a Linux port harder.