Mark Brown broonie@kernel.org writes:
This is needed because if suspending the laptop with the headphones inserted, when resuming, the sound is not working anymore. Sound stops working on speakers and headphones. Reinsertion and removals of the headphone doesn't solve the problem.
This seems to be caused by the fact that the GPIO IRQ stops working in es8316_irq() after resume.
That's a bug that should be fixed.
Agreed, but I don't know how easy it is to fix, and I would like to first offer users of these laptops a working sound driver. Afterwards this issue can be analyzed and properly fixed.
Surely if nothing else a good first step would be to have the CODEC driver do whatever disabling the jack does on suspend without needing the machine driver to bodge things?
I would go for properly analyzing what is going on and try to correctly fix it, but it's going to take some time for me to do it. During this time people with these laptops will not have working sound. Wouldn't it make more sense to first deliver a working solution(even though it's not perfect) than to make them wait? Also this workaround is already present in the kernel, so it's not that critical that another driver uses it.