Re: [PATCH 2/7] ALSA: control: Add power state check commonly for ioctl handlers

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

 



On Tue, 18 May 2021 20:00:46 +0200,
Jaroslav Kysela wrote:
> 
> Dne 18. 05. 21 v 18:51 Takashi Iwai napsal(a):
> > The card power state check can be better put in the common ioctl
> > handler, as basically we want to prevent ioctls during the power off
> > state.  Although this situation won't happen normally any longer (*),
> > it'll be helpful for catching this for the future implementation like
> > the faked suspend that is needed for PCI rescan.
> > 
> > (*) Long long time ago, before the proper PM framework was introduced,
> > it was still possible to reach SNDRV_CTL_IOCTL_POWER ioctl during the
> > power off state.  This ioctl existed as a main control for the suspend
> > resume state in the past, but the feature was already dropped along
> > with the standard PM framework.
> 
> It seems like a function dup for the 5th patch which tracks in flight the
> power state. I think that we should drop this (and reshuffle patches) or
> remove this in or after the 5th patch.

A good point.  With snd_power_ref_and_wait(), we achieve more
fine-grained protection, so those checks could be indeed dropped.
Will clean up later in the v2 patch.


thanks,

Takashi



[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