From: Hans Verkuil <hverkuil@xs4all.nl>
To: Jacek Anaszewski <j.anaszewski@samsung.com>,
linux-media <linux-media@vger.kernel.org>
Subject: Re: setting volatile v4l2-control
Date: Tue, 27 Jan 2015 15:14:31 +0100 [thread overview]
Message-ID: <54C79D47.9090609@xs4all.nl> (raw)
In-Reply-To: <54C79385.2050702@samsung.com>
On 01/27/15 14:32, Jacek Anaszewski wrote:
> While testing the LED / flash API integration patches
> I noticed that the v4l2-controls marked as volatile with
> V4L2_CTRL_FLAG_VOLATILE flag behave differently than I would
> expect.
>
> Let's consider following use case:
>
> There is a volatile V4L2_CID_FLASH_INTENSITY v4l2 control with
> following constraints:
>
> min: 1
> max: 100
> step: 1
> def: 1
>
> 1. Set the V4L2_CID_FLASH_INTENSITY control to 100.
> - as a result s_ctrl op is called
> 2. Set flash_brightness LED sysfs attribute to 10.
> 3. Set the V4L2_CID_FLASH_INTENSITY control to 100.
> - s_ctrl op isn't called
>
> This way we are unable to write a new value to the device, despite
> that the related setting was changed from the LED subsystem level.
>
> I would expect that if a control is marked volatile, then
> the v4l2-control framework should by default call g_volatile_ctrl
> op before set and not try to use the cached value.
>
> Is there some vital reason for not doing this?
It's rather strange to have a writable volatile control. The semantics
of this are ambiguous and I don't believe we have ever used such controls
before.
Actually, the commit log of this patch (never merged) gives some
background information about this:
http://git.linuxtv.org/cgit.cgi/hverkuil/media_tree.git/commit/?h=volatilefix
It's never been merged because I have never been certain how to handle
such controls. Why do you have such controls in the first place? What
is it supposed to do?
Regards,
Hans
next prev parent reply other threads:[~2015-01-27 14:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-27 13:32 setting volatile v4l2-control Jacek Anaszewski
2015-01-27 14:14 ` Hans Verkuil [this message]
2015-01-27 15:43 ` Jacek Anaszewski
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=54C79D47.9090609@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=j.anaszewski@samsung.com \
--cc=linux-media@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.