From: Hans Verkuil <hverkuil@xs4all.nl>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Ricardo Ribalda <ribalda@chromium.org>
Cc: Hans de Goede <hdegoede@redhat.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
Yunke Cao <yunkec@chromium.org>
Subject: Re: [PATCH v2 0/6] media: uvcvideo: Implement the Privacy GPIO as a subdevice
Date: Sun, 10 Nov 2024 11:29:28 +0100 [thread overview]
Message-ID: <2fd9053f-34b6-4e97-a898-98fd71a485e8@xs4all.nl> (raw)
In-Reply-To: <20241110110257.5160a7d1@foz.lan>
On 10/11/2024 11:02, Mauro Carvalho Chehab wrote:
> Em Sat, 9 Nov 2024 17:29:54 +0100
> Ricardo Ribalda <ribalda@chromium.org> escreveu:
>
>>>
>>> I think that should sort the issue, assuming that 1. above holds true.
>>>
>>> One downside is that this stops UVC button presses from working when
>>> not streaming. But userspace will typically only open the /dev/video#
>>> node if it plans to stream anyways so there should not be much of
>>> a difference wrt button press behavior.
>>
>> I do not personally use the button, but it is currently implemented as
>> a standard HID device.
>
> IMO, controlling the privacy via evdev is the best approach then. There's
> no need for a RW control neither at subdev or at device level. It could
> make sense a Read only to allow apps to read, but still it shall be up to
> the Kernel to protect the stream if the button is pressed.
>
>> Making it only work during streamon() might be
>> a bit weird.
>> I am afraid that if there is a button we should keep the current behaviour.
>
> 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.
Note that there are two types of privacy GPIO: one that triggers when a physical
cover is moved, blocking the sensor, and one that is a button relying on software
to stop streaming video. In the first case it is informative, but you can keep
streaming.
Regards,
Hans
>
> I don't trust myself privacy soft buttons, specially when handled in userspace,
> so what I have are webcam covers (and a small stick glued at a laptop camera
> that has a too small sensor for a webcam cover). I only remove the cover/stick
> when I want to participate on videoconf with video enabled with the builtin
> camera.
>
> Regards
>
> Thanks,
> Mauro
>
next prev parent reply other threads:[~2024-11-10 10:29 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 20:25 Ricardo Ribalda
2024-11-08 20:25 ` [PATCH v2 1/6] media: uvcvideo: Factor out gpio functions to its own file Ricardo Ribalda
2024-11-08 20:25 ` [PATCH v2 2/6] media: uvcvideo: Re-implement privacy GPIO as a separate subdevice Ricardo Ribalda
2024-11-08 20:25 ` [PATCH v2 3/6] Revert "media: uvcvideo: Allow entity-defined get_info and get_cur" Ricardo Ribalda
2024-11-08 20:25 ` [PATCH v2 4/6] media: uvcvideo: Create ancillary link for GPIO subdevice Ricardo Ribalda
2024-11-10 10:05 ` Sakari Ailus
2024-11-08 20:25 ` [PATCH v2 5/6] media: v4l2-core: Add new MEDIA_ENT_F_GPIO Ricardo Ribalda
2024-11-08 20:25 ` [PATCH v2 6/6] media: uvcvideo: Use MEDIA_ENT_F_GPIO for the GPIO entity Ricardo Ribalda
2024-11-09 14:04 ` [PATCH v2 0/6] media: uvcvideo: Implement the Privacy GPIO as a subdevice Mauro Carvalho Chehab
2024-11-09 14:57 ` Ricardo Ribalda
2024-11-09 15:37 ` Hans de Goede
2024-11-09 16:29 ` Ricardo Ribalda
2024-11-10 10:02 ` Mauro Carvalho Chehab
2024-11-10 10:29 ` Hans Verkuil [this message]
2024-11-10 10:37 ` Ricardo Ribalda
2024-11-10 10:47 ` Hans Verkuil
2024-11-10 12:48 ` Mauro Carvalho Chehab
2024-11-10 10:32 ` Ricardo Ribalda
2024-11-10 10:59 ` Ricardo Ribalda
2024-11-10 12:46 ` Mauro Carvalho Chehab
2024-11-10 16:01 ` Ricardo Ribalda
2024-11-10 15:14 ` Laurent Pinchart
2024-11-10 16:04 ` Ricardo Ribalda
2024-11-25 12:31 ` Hans de Goede
2024-11-25 12:56 ` Laurent Pinchart
2024-11-25 13:35 ` Hans de Goede
2024-11-10 16:07 ` Ricardo Ribalda
2024-11-25 12:39 ` Hans de Goede
2024-11-25 12:58 ` Laurent Pinchart
2024-11-25 13:44 ` Hans de Goede
2024-11-25 13:50 ` Ricardo Ribalda
2024-11-11 12:03 ` Hans de Goede
2024-11-25 12:25 ` Hans de Goede
2024-11-25 12:49 ` Laurent Pinchart
2024-11-25 13:29 ` Hans de Goede
2024-11-26 17:22 ` Laurent Pinchart
2024-11-25 13:39 ` Ricardo Ribalda
2024-11-25 14:02 ` Hans de Goede
2024-11-26 16:22 ` Ricardo Ribalda
2024-11-26 17:18 ` Laurent Pinchart
2024-11-26 17:29 ` Ricardo Ribalda
2024-11-10 15:08 ` Laurent Pinchart
2024-11-11 12:59 ` Hans de Goede
2024-11-11 14:35 ` Hans de Goede
2024-11-12 17:31 ` Ricardo Ribalda
2024-11-13 15:19 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2fd9053f-34b6-4e97-a898-98fd71a485e8@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=hdegoede@redhat.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
--cc=mchehab@kernel.org \
--cc=ribalda@chromium.org \
--cc=sakari.ailus@linux.intel.com \
--cc=yunkec@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®