On Fri, Jun 03, 2016 at 03:09:32AM +0000, Bard Liao wrote:
Could you talk through the use case in more detail - what's the widget and why is it still OK for suspend to run even with widgets on?
We need to force on "LDO1" widget when a jack is plugged in. That is for push button detection(not implement yet). Also, all jack related functions such as headphone playback, headset capture need "LDO1" on. However, we don't need these functions in suspend. Also, it seems the external power will be cut down in suspend even codec suspend function is not called. In that case, codec will lost its register setting. I.e. Codec registers will be cleaned. And we need to sync with cache.
In a situation like that I'd expect the machine driver to be disabling jack detection over suspend - it should only be being left enabled if the jack detection is expected to continue functioning over suspend (a lot of Android systems do this so things like starting playback from the button on a plugged in headset continue to work).