Re: [PATCH v2 0/6] media: uvcvideo: Implement the Privacy GPIO as a subdevice

Mauro Carvalho Chehab
2024-11-10T12:48:13Z

Em Sun, 10 Nov 2024 11:37:46 +0100
Ricardo Ribalda <ribalda@chromium.org> escreveu:

> > > Privacy matters only when streaming. IMO the Kernel check for it needs to
> > > be done at DQBUF time and at read() calls, as one can enable/disable the
> > > camera while doing videoconf calls. I do that a lot with app "soft" buttons,
> > > and on devices that physically support cutting the video.
> >
> > We could add a vb2_s_privacy(bool privacy) function to vb2 to tell vb2 if the privacy
> > mode is on. And if so, take action. E.g. calling QBUF/DQBUF would return a -EACCES error.
> >
> > That will ensure consistent behavior for all drivers that have a privacy function.
>
> I am not against adding a feature like this, but we still need a way
> to notify userspace about a change of the privacy state when the user
> presses it.
> Controls are great for this.

It doesn't sound a good idea. See, from users PoV, they want the stream
to start with black frames when privacy is on, and dynamically being
able to enable/disable actual frame output. So, the best is to have the
stream running independently of the privacy being enabled or not.

Thanks,
Mauro