linux/include/media
Hans Verkuil 5626b8c75b [media] v4l2-ctrls: implement new volatile autocluster scheme
The problem tackled in this patch is how to handle volatile autoclusters
correctly. A volatile autocluster is a cluster of related controls where one
control is the control that toggles between manual and auto mode and the other
controls are the values for the manual mode. For example autogain and gain,
autoexposure and exposure, etc.

If the hardware lets you read out the automatically calculated manual values
while in automode, then those manual controls should be marked volatile.

gain value as calculated by the autogain circuitry, then you would mark the
gain control as volatile (i.e. continuously changing).

The question in such use cases is what to do when switching from the auto
mode to the manual mode. Should we switch to the last set manual values or
should the volatile values be copied and used as the initial manual values.

For example: suppose the mode is manual gain and gain is set to 5. Then
autogain is turned on and the gain is set by the hardware to 2. Finally
the user switches back to manual gain. What should the gain be? 2 or 5?

After a long discussion the decisions was made to keep the last value as
calculated by the auto mode (so 2 in the example above).

The reason is that webcams that do such things will adapt themselves to
the current light conditions and when you switch back to manual mode you
expect that you keep the same picture. If you would switch back to old
manual values, then that would give you a suddenly different picture,
which is jarring for the user.

Additionally, this would be difficult to implement in applications that
store and restore the control values at application exit and start.

If you want to keep the old manual values when you switch from auto to
manual, then there would have to be a way for applications to get hold
of those old values while in auto mode, but there isn't.

So this patch will do all the heavy lifting in v4l2-ctrls.c: if you go
from auto mode to manual mode and the manual controls are volatile, then
g_volatile_ctrl will be called to get the current values for the manual
controls before switching to manual mode.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21 10:48:30 -03:00
..
davinci [media] davinci vpbe: VENC( Video Encoder) implementation 2011-07-27 17:53:10 -03:00
adp1653.h [media] adp1653: Add driver for LED flash controller 2011-07-27 17:55:39 -03:00
adv7343.h V4L/DVB (11743): Analog Devices ADV7343 video encoder driver 2009-06-16 18:20:59 -03:00
ak881x.h V4L/DVB: V4L: v4l2-subdev driver for AK8813 and AK8814 TV-encoders from AKM 2010-05-19 12:58:02 -03:00
atmel-isi.h [media] V4L: at91: add Atmel Image Sensor Interface (ISI) support 2011-07-27 17:53:23 -03:00
bt819.h [media] bt819: the ioctls in the header are internal to the kernel 2010-12-29 08:17:19 -02:00
cs53l32a.h
cs5345.h V4L/DVB (6869): cs5345: new i2c driver 2008-01-25 19:04:08 -02:00
cx2341x.h [media] v4l2-ctrls: use const char * const * for the menu arrays 2010-12-30 08:02:14 -02:00
cx25840.h V4L/DVB: cx25840/ivtv: replace ugly priv control with s_config 2010-08-08 23:43:05 -03:00
i2c-addr.h V4L/DVB (9940): bt832: remove this driver 2008-12-30 09:39:25 -02:00
ir-kbd-i2c.h [media] rc: Rename remote controller type to rc_type instead of ir_type 2010-12-29 08:16:50 -02:00
lirc_dev.h [media] lirc_dev: store cdev in irctl, up maxdevs 2011-06-11 09:03:20 -03:00
lirc.h Fix common misspellings 2011-03-31 11:26:23 -03:00
m5mols.h [media] m5mols: Use proper email address format 2011-06-11 09:46:00 -03:00
m52790.h V4L/DVB (6486): m52790: add new Mitsubishi A/V switch i2c driver 2008-01-25 19:01:46 -02:00
media-device.h [media] media: Links setup 2011-03-22 04:53:16 -03:00
media-devnode.h [media] media: Media device node support 2011-03-22 04:52:22 -03:00
media-entity.h [media] media: Pipelines and media streams 2011-03-22 04:53:17 -03:00
mmp-camera.h [media] marvell-cam: Basic working MMP camera driver 2011-07-27 17:53:01 -03:00
msp3400.h V4L/DVB (11380): v4l2-subdev: change s_routing prototype 2009-04-06 21:44:27 -03:00
mt9p031.h [media] mt9p031: Aptina (Micron) MT9P031 5MP sensor driver 2011-09-11 09:49:28 -03:00
mt9t112.h V4L/DVB (13670): soc-camera: Add mt9t112 camera driver 2009-12-16 09:27:41 -02:00
mt9v011.h [media] v4l2-subdev: remove core.s_config and v4l2_i2c_new_subdev_cfg() 2011-01-19 11:45:30 -02:00
mt9v032.h [media] v4l: Add mt9v032 sensor driver 2011-05-20 09:29:49 -03:00
noon010pc30.h [media] Add v4l2 subdev driver for NOON010PC30L image sensor 2011-03-21 20:31:40 -03:00
omap1_camera.h [media] SoC Camera: add driver for OMAP1 camera interface 2010-10-21 07:55:37 -02:00
omap3isp.h [media] omap3isp: Move platform data definitions from isp.h to media/omap3isp.h 2011-09-11 09:49:27 -03:00
ov772x.h soc-camera: ov772x: Modify buswidth control 2010-02-26 15:11:00 -03:00
ov7670.h [media] marvell-cam: Move cafe-ccic into its own directory 2011-07-27 17:53:00 -03:00
pwc-ioctl.h v4l-dvb: remove legacy checks to allow support for kernels < 2.6.10 2008-07-20 07:17:52 -03:00
radio-si4713.h V4L/DVB (12551): FM TX: si4713: Add files to add radio interface for si4713 2009-09-12 12:19:19 -03:00
rc-core.h [media] rc-core.h: Surround macro with do {} while (0) 2011-09-03 20:56:22 -03:00
rc-map.h [media] rc-core support for Microsoft IR keyboard/mouse 2011-07-27 17:55:59 -03:00
rj54n1cb0c.h V4L/DVB (13661): rj54n1cb0c: Add cropping, auto white balance, restrict sizes, add platform data 2009-12-16 09:27:30 -02:00
s5p_fimc.h [media] s5p-fimc: Add v4l2_device notification support for single frame capture 2011-09-06 17:49:40 -03:00
saa6588.h [media] saa6588: rename rds.h to saa6588.h 2010-12-29 08:17:18 -02:00
saa6752hs.h
saa7115.h V4L/DVB (8940): saa7115: fix saa7111(a) support 2008-10-12 09:37:00 -02:00
saa7127.h
saa7146_vv.h V4L/DVB: saa7146: fix regression of the av7110/budget-av driver 2010-05-06 19:20:50 -03:00
saa7146.h [media] saa7146: Use current logging styles 2011-09-03 20:54:14 -03:00
sh_mobile_ceu.h [media] V4L: sh_mobile_csi2: switch away from using the soc-camera bus notifier 2011-07-27 17:56:08 -03:00
sh_mobile_csi2.h [media] V4L: sh_mobile_csi2: switch away from using the soc-camera bus notifier 2011-07-27 17:56:08 -03:00
sh_vou.h [media] sh_vou: Don't use module names to load I2C modules 2010-10-22 21:53:33 -02:00
si4713.h [media] radio-si4713: Add regulator framework support 2010-12-29 08:16:35 -02:00
soc_camera_platform.h [media] V4L: soc-camera: remove soc-camera bus and devices on it 2011-07-27 17:56:08 -03:00
soc_camera.h [media] V4L: soc-camera: remove soc-camera bus and devices on it 2011-07-27 17:56:08 -03:00
soc_mediabus.h [media] V4L: soc-camera: add a new packing for YUV 4:2:0 type formats 2011-05-20 12:05:08 -03:00
sr030pc30.h [media] Add driver for Siliconfile SR030PC30 VGA camera 2010-10-21 07:55:49 -02:00
timb_radio.h [media] radio-timb: Simplified platform data 2011-07-27 17:53:07 -03:00
timb_video.h [media] media: Add timberdale video-in driver 2010-12-29 08:16:46 -02:00
tuner-types.h V4L/DVB (7352): tuner-simple: enable digital tuning support for Philips FMD1216ME 2008-04-24 14:07:50 -03:00
tuner.h [media] dib0700: add initial code for PCTV 340e by Davide Ferri 2011-07-27 17:52:25 -03:00
tvaudio.h V4L/DVB (11376): tvaudio.h: add static inline to retrieve the list of possible i2c addrs. 2009-04-06 21:44:25 -03:00
tveeprom.h V4L/DVB (8479): tveeprom/ivtv: fix usage of has_ir field 2008-07-26 12:54:42 -03:00
tvp514x.h V4L/DVB (12246): tvp514x: Migration to sub-device framework 2009-09-19 00:18:09 -03:00
tvp5150.h
tvp7002.h V4L/DVB: Definitions for TVP7002 in DM365 2010-02-26 15:11:01 -03:00
tw9910.h tw9910: use TABs for indentation 2010-02-26 15:10:59 -03:00
upd64031a.h
upd64083.h
v4l2-chip-ident.h [media] V4L: initial driver for ov5642 CMOS sensor 2011-07-27 17:56:09 -03:00
v4l2-common.h [media] v4l2_prio: move from v4l2-common to v4l2-dev 2011-03-22 16:37:54 -03:00
v4l2-ctrls.h [media] v4l2-ctrls: implement new volatile autocluster scheme 2011-09-21 10:48:30 -03:00
v4l2-dev.h [media] v4l: Fix media_entity_to_video_device macro argument name 2011-06-01 09:42:03 -03:00
v4l2-device.h [media] v4l2-device: fix a macro definition 2011-04-13 09:53:29 -03:00
v4l2-event.h [media] v4l2-event.h: add overview documentation to the header 2011-07-27 17:53:34 -03:00
v4l2-fh.h [media] v4l2-event/ctrls/fh: allocate events per fh and per type instead of just per-fh 2011-07-27 17:53:31 -03:00
v4l2-int-device.h V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID. 2009-01-02 17:11:52 -02:00
v4l2-ioctl.h [media] v4l2-ioctl: add priority handling support 2011-03-22 16:37:59 -03:00
v4l2-mediabus.h [media] V4L: add media bus configuration subdev operations 2011-07-27 17:56:08 -03:00
v4l2-mem2mem.h [media] Update Pawel Osciak's e-mail address 2011-03-22 04:55:05 -03:00
v4l2-subdev.h [media] V4L: add media bus configuration subdev operations 2011-07-27 17:56:08 -03:00
videobuf2-core.h [media] media: vb2: change queue initialization order 2011-09-06 15:07:20 -03:00
videobuf2-dma-contig.h [media] media: vb2: dma contig allocator: use dma_addr instread of paddr 2011-09-06 15:05:10 -03:00
videobuf2-dma-sg.h [media] v4l: videobuf2: add DMA scatter/gather allocator 2011-03-21 20:31:34 -03:00
videobuf2-memops.h [media] Update Pawel Osciak's e-mail address 2011-03-22 04:55:05 -03:00
videobuf2-vmalloc.h [media] Update Pawel Osciak's e-mail address 2011-03-22 04:55:05 -03:00
videobuf-core.h [media] V4L: remove V4L1 compatibility mode 2010-12-29 08:17:07 -02:00
videobuf-dma-contig.h V4L/DVB: videobuf: add ext_lock argument to the queue init functions 2010-10-21 01:06:14 -02:00
videobuf-dma-sg.h V4L/DVB: videobuf: add ext_lock argument to the queue init functions 2010-10-21 01:06:14 -02:00
videobuf-dvb.h [media] Add missing include guard to header file 2011-05-25 21:42:30 -03:00
videobuf-vmalloc.h V4L/DVB: videobuf: add ext_lock argument to the queue init functions 2010-10-21 01:06:14 -02:00
wm8775.h [media] Add proper audio support for Nova-S Plus with wm8775 ADC 2011-03-21 20:32:19 -03:00