Re: [PATCH] ASoC: rt5663: add cancel_delayed_work_sync when system suspends

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 29, 2023 at 01:47:35AM +0000, Shuming [范書銘] wrote:
> > > This patch makes sure that the workqueue is completed before the system

> > > +	cancel_delayed_work_sync(&rt5663->jack_detect_work);
> > > +	cancel_delayed_work_sync(&rt5663->jd_unplug_work);

> > Does something ensure that no more interrupts can fire after the work is
> > cancelled?

> As I knew, the JD source is not the wake-up source when the system suspends.
> This patch just makes sure the work is done to avoid the unexpected problem.

The issue isn't unexpected wakes - it's if the work manages to start
running again before the system suspends.  For example if a jack detect
interrupt is triggered while processing the second cancel there then the
jack_detect_work will be rescheduled during suspend.  Interrupts will
still be active until a reasonable time later in the suspend process.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux