From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F3E2A142E7C; Sun, 10 Nov 2024 12:48:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731242894; cv=none; b=JRnvOj7Pz+8FzBjQNFI93eRcJFcY6KYacESssksyfi9vBnt2SRv1Afxfmz2m9yPpx0M5ensQPy1GaC6BsHvs4QYNA6fwvnH0bA6t32yZks4EHADh/UB5yFDVhdWbksGoKCqbFAzV7xpbAunx1ZGoVIPUHKH7rnpD7MUADmatYPA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731242894; c=relaxed/simple; bh=ZBBP9tCs7B8oMNkOKGW5MTUmJLU36fHH0WHhmx+Si30=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=mwfDqcgyTTYKAELAhBEOT0Mh9KmzXNOGq85ZS4atg9E0O48fQu2wLTUYrRCdGDgiKt/CryliTDIvlBR1PzBEhue/KmuYjwEDLvZCWYv6QO5deNBo1HLDFDjUqxDIUnt4VnFSGuumqcp1eF01zKgGBXiSy2xhZigcaK/FIRw2RZc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RYsJbvt9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RYsJbvt9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D4A7C4CECD; Sun, 10 Nov 2024 12:48:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731242893; bh=ZBBP9tCs7B8oMNkOKGW5MTUmJLU36fHH0WHhmx+Si30=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RYsJbvt9E4P4f2k3tcOJO5gfGQ4ASX7P2P0frhgmFcO/Kt+k9TEHpToqphAOzCSmz yCYNVgycQkmikZc0iM4XrjCEgZV6GafhrPnqw0egfnfLSQZHfAHCCT/XfToTEdLE5v 5Vs3y/3Cr1gtMEg98EW8Fcj31uIxKKK6MJmjyxVbjHT+PhinSlVTGF0MSQH4XuhQBN u5tfS4tvaJOFxVRE20iMPlJh4V1+Co4hU8FxlCDlZ2FUUCnvajrfYVUGaNr6E6Kwf0 Gx18DElbhz7fXcw6co6foJZpf5NAUv3rePR234xUcgv/X0CJYuAMOj37QjJjDeSaPD PGUphnYeQwSdg== Date: Sun, 10 Nov 2024 13:48:08 +0100 From: Mauro Carvalho Chehab To: Ricardo Ribalda Cc: Hans Verkuil , Hans de Goede , Laurent Pinchart , Mauro Carvalho Chehab , Sakari Ailus , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Yunke Cao Subject: Re: [PATCH v2 0/6] media: uvcvideo: Implement the Privacy GPIO as a subdevice Message-ID: <20241110134808.328da075@foz.lan> In-Reply-To: References: <20241108-uvc-subdev-v2-0-85d8a051a3d3@chromium.org> <5b5f3bb7-7933-4861-be81-30345e333395@redhat.com> <20241110110257.5160a7d1@foz.lan> <2fd9053f-34b6-4e97-a898-98fd71a485e8@xs4all.nl> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.43; x86_64-redhat-linux-gnu) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Em Sun, 10 Nov 2024 11:37:46 +0100 Ricardo Ribalda 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