linux/drivers/media/radio
Hans Verkuil ddac5c1079 [media] v4l2-ctrls: fix and improve volatile control handling
If you have a cluster of controls that is a mix of volatile and non-volatile
controls, then requesting the value of the volatile control would fail if the
master control of that cluster was non-volatile. The code assumed that the
volatile state of the master control was the same for all other controls in
the cluster.

This is now fixed.

In addition, it was clear from bugs in some drivers that it was confusing that
the ctrl->cur union had to be used in g_volatile_ctrl. Several drivers used the
'new' values instead. The framework was changed so that drivers now set the new
value instead of the current value.

This has an additional benefit as well: the volatile values are now only stored
in the 'new' value, leaving the current value alone. This is useful for
autofoo/foo control clusters where you want to have a 'foo' control act like a
volatile control if 'autofoo' is on, but as a normal control when it is off.

Since with this change the cur value is no longer overwritten when g_volatile_ctrl
is called, you can use it to remember the original 'foo' value. For example:

autofoo = 0, foo = 10 and foo is non-volatile.

Now autofoo is set to 1 and foo is marked volatile. Retrieving the foo value
will get the volatile value. Set autofoo back to 0, which marks foo as non-
volatile again, and retrieving foo will get the old current value of 10.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:53:17 -03:00
..
si470x [media] radio: Use the subsystem version control for VIDIOC_QUERYCAP 2011-07-27 17:53:16 -03:00
wl128x [media] v4l2-ctrls: fix and improve volatile control handling 2011-07-27 17:53:17 -03:00
dsbr100.c [media] radio: Use the subsystem version control for VIDIOC_QUERYCAP 2011-07-27 17:53:16 -03:00
Kconfig [media] media: fix radio-sf16fmr2 build when SND is not enabled 2011-07-13 19:40:08 -03:00
Makefile Merge branch 'fix/misc' into topic/misc 2011-03-28 13:03:58 +02:00
radio-aimslab.c [media] radio: Use the subsystem version control for VIDIOC_QUERYCAP 2011-07-27 17:53:16 -03:00
radio-aztech.c [media] radio: Use the subsystem version control for VIDIOC_QUERYCAP 2011-07-27 17:53:16 -03:00
radio-cadet.c [media] radio: Use the subsystem version control for VIDIOC_QUERYCAP 2011-07-27 17:53:16 -03:00
radio-gemtek.c [media] radio: Use the subsystem version control for VIDIOC_QUERYCAP 2011-07-27 17:53:16 -03:00
radio-maxiradio.c [media] radio: Use the subsystem version control for VIDIOC_QUERYCAP 2011-07-27 17:53:16 -03:00
radio-miropcm20.c [media] BKL: trivial BKL removal from V4L2 radio drivers 2010-12-01 20:10:05 -02:00
radio-mr800.c [media] radio: Use the subsystem version control for VIDIOC_QUERYCAP 2011-07-27 17:53:16 -03:00
radio-rtrack2.c [media] radio: Use the subsystem version control for VIDIOC_QUERYCAP 2011-07-27 17:53:16 -03:00
radio-sf16fmi.c [media] radio: Use the subsystem version control for VIDIOC_QUERYCAP 2011-07-27 17:53:16 -03:00
radio-sf16fmr2.c [media] radio-sf16fmr2: convert to generic TEA575x interface 2011-07-27 17:52:23 -03:00
radio-si4713.c [media] v4l2-ioctl: add priority handling support 2011-03-22 16:37:59 -03:00
radio-tea5764.c [media] radio: Use the subsystem version control for VIDIOC_QUERYCAP 2011-07-27 17:53:16 -03:00
radio-terratec.c [media] radio: Use the subsystem version control for VIDIOC_QUERYCAP 2011-07-27 17:53:16 -03:00
radio-timb.c [media] radio: Use the subsystem version control for VIDIOC_QUERYCAP 2011-07-27 17:53:16 -03:00
radio-trust.c [media] radio: Use the subsystem version control for VIDIOC_QUERYCAP 2011-07-27 17:53:16 -03:00
radio-typhoon.c [media] radio: Use the subsystem version control for VIDIOC_QUERYCAP 2011-07-27 17:53:16 -03:00
radio-wl1273.c [media] v4l2-ctrls: fix and improve volatile control handling 2011-07-27 17:53:17 -03:00
radio-zoltrix.c [media] radio: Use the subsystem version control for VIDIOC_QUERYCAP 2011-07-27 17:53:16 -03:00
saa7706h.c [media] v4l: make sure drivers supply a zeroed struct v4l2_subdev 2011-04-29 12:33:28 -03:00
si4713-i2c.c si4713-i2c: avoid potential buffer overflow on si4713 2011-07-18 09:12:21 -07:00
si4713-i2c.h [media] radio-si4713: Add regulator framework support 2010-12-29 08:16:35 -02:00
tef6862.c [media] v4l: make sure drivers supply a zeroed struct v4l2_subdev 2011-04-29 12:33:28 -03:00