Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Mar 2019 19:16:56 +0300
From:      =?UTF-8?B?0JDQu9C10LrRgdC10Lkg0J/QsNC70Y7RgtC40L0=?= <fesse@mail.ru>
To:        freebsd-drivers@freebsd.org
Subject:   ACPI Suspend/Resume support in sound drivers
Message-ID:  <0812D16E-3F71-4C1C-82E0-DA7AE0D81E46@mail.ru>

index | next in thread | raw e-mail

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.

help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0812D16E-3F71-4C1C-82E0-DA7AE0D81E46>