I trying to add suspend/resume support to PCI soundcard driver.
As I can see, when system goes to s1/s3 state sound system doesn't warn driver about that event at all.
But interrupt should be masked, and chip clock should be disabled too for power saving. When driver's suspend function being called by kernel, masking interrupts subsequentally ending up with "timeout, channel dead" just after wake up from s1/s3 states (since pcm doesn't know that we doing), and userland playback application exits with error.
Is there a way to tell pcm to "pause" running channels before going to sleep?
Other drivers simply calls their own trigger function with PCMTRIG_ABORT parameter, but again, pcm doesn't know about this, and I believe this also ends with "channel dead".