ACPI Suspend/Resume support in sound drivers

Алексей Палютин fesse at mail.ru
Tue Mar 12 16:17:08 UTC 2019


Hi

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".

I want sound system to resume playback, interrupted by ACPI sleep event, just after wake up. Is it possible? Is there any "right way" on how to handle ACPI events safely in sound driver?
-- 
Простите за краткость, создано в K-9 Mail.


More information about the freebsd-drivers mailing list