28 Jul, 2011
1 commit
-
Signed-off-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
Acked-by: Sakari Ailus
Signed-off-by: Mauro Carvalho Chehab
23 Mar, 2011
1 commit
-
We are going to move priority handling into the v4l2 core. As a consequence
the v4l2_prio helper functions need to be moved into the core videodev
module as well to prevent circular dependencies.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
22 Mar, 2011
1 commit
-
Some ioctl's were defined wrong on 2.6.2 and 2.6.6, using the wrong
type of R/W arguments. They were fixed, but the old ioctl names are
still there, maintained to avoid breaking binary compatibility:There's no sense on preserving those forever, as it is very doubtful
that someone would try to use a such old binary with a modern kernel.
Removing them will allow us to remove some magic done at the V4L ioctl
handler.Note that any application compiled with a videodev2.h from 2.6.7 or later
will be using the correct ioctls.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
19 Jan, 2011
1 commit
-
The core.s_config op was meant for legacy drivers that needed to work with old
pre-2.6.26 kernels. This is no longer relevant. Unfortunately, this op was
incorrectly called from several drivers.Replace those occurences with proper i2c_board_info structs and call
v4l2_i2c_new_subdev_board.After these changes v4l2_i2c_new_subdev_cfg() was no longer used, so remove
that function as well.Signed-off-by: Hans Verkuil
Acked-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab
30 Dec, 2010
1 commit
-
This prevents checkpatch warnings generated when defining
'static const char *foo[]' arrays. It makes sense to use
const char * const * anyway since the pointers in the array
are indeed const.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
22 Nov, 2010
1 commit
-
The argument isn't used anymore by the functions, remove it.
Signed-off-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab
23 Oct, 2010
1 commit
-
When creating a new sub-device, The V4L I2C subdev API has historically
required drivers to pass the name of the module that implements support
for the I2C device.I2C modules can be loaded based on modaliases instead of the module
name. As the I2C device type name is already available to the
v4l2_i2c_new_subdev* functions, make the module name argument optional
and create a modalias based on the type name when no module name is
provided.All in-tree drivers call those functions with a non-NULL module name
argument, this change is thus harmless.Signed-off-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab
21 Oct, 2010
2 commits
-
This function is an internal API and belongs in v4l2-common.h, not
videodev.h. The return pointer and probe argument should be const as well.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Many video drivers implement a fixed set of frame formats and thus face a task
of finding the best match for a user-requested format. Implementing this in a
generic function has also an advantage, that different drivers with similar
supported format sets will select the same format for the user, which improves
consistency across drivers.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab
12 Aug, 2010
1 commit
-
The probe method used by i2c_new_probed_device() may not be suitable
for all cases. Let the caller provide its own, optional probe
function.Signed-off-by: Jean Delvare
Acked-by: Mauro Carvalho Chehab
09 Aug, 2010
1 commit
-
Add a new framework to handle controls which makes life for driver
developers much easier.Note that this patch moves some of the control support that used to be in
v4l2-common.c to v4l2-ctrls.c. The tables were copied unchanged. The body
of v4l2_ctrl_query_fill() was copied to a new v4l2_ctrl_fill() function
in v4l2-ctrls.c. This new function doesn't use the v4l2_queryctrl
struct anymore, which makes it more general.The remainder of v4l2-ctrls.c is all new. Highlights include:
- No need to implement VIDIOC_QUERYCTRL, QUERYMENU, S_CTRL, G_CTRL,
S_EXT_CTRLS, G_EXT_CTRLS or TRY_EXT_CTRLS in either bridge drivers
or subdevs. New wrapper functions are provided that can just be plugged in.
Once everything has been converted these wrapper functions can be removed as well.- When subdevices are added their controls can be automatically merged
with the bridge driver's controls.- Most drivers just need to implement s_ctrl to set the controls.
The framework handles the locking and tries to be as 'atomic' as possible.- Ready for the subdev device nodes: the same mechanism applies to subdevs
and their device nodes as well. Sub-device drivers can make controls
local, preventing them from being merged with bridge drivers.- Takes care of backwards compatibility handling of VIDIOC_S_CTRL and
VIDIOC_G_CTRL. Handling of V4L2_CID_PRIVATE_BASE is fully transparent.
CTRL_CLASS controls are automatically added.Signed-off-by: Hans Verkuil
Reviewed-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab
19 May, 2010
2 commits
-
v4l2_prio_init/open/close returned an int when in fact they would
always return 0. Make these void functions.v4l2_prio_close and v4l2_prio_check pass an enum v4l2_priority as a
pointer for no good reason. Replace with a normal enum v4l2_priority
argument.These changes will simplify the work of moving priority handling into
the v4l core.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Add support for more color effects (negative, sketch, emboss, etc) by
extending the v4l2_colorfx enum items.Signed-off-by: Xiaolin Zhang
Signed-off-by: Mauro Carvalho Chehab
18 May, 2010
4 commits
-
Those control, as their names imply, control the camera aperture
settings.Signed-off-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab -
Add support SPI bus to v4l2. Useful for control some device with SPI bus like
hardware MPEG2 encoders and etc.Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Add the ability to use the v4l2_ctrl_query_fill() function for the newly
introduced chroma gain control.Also, make use of the centralized function by the one caller.
This work was sponsored by EyeMagnet Limited.
Signed-off-by: Devin Heitmueller
Signed-off-by: Mauro Carvalho Chehab -
…L2_CID_BG_COLOR consistent
v4l2_ctrl_get_name(): add missing control names, and make title for
V4L2_CID_BG_COLOR consistentV4L2_CID_AUTOBRIGHTNESS was introduced with kernel 2.6.31
V4L2_CID_BAND_STOP_FILTER was introduced with kernel 2.6.32Signed-off-by: Frank Schaefer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
16 Dec, 2009
1 commit
-
This patch adds a helper function to get description of a digital
video preset added by the video timing API. This will be useful for drivers
implementing the above API.Signed-off-by: Muralidharan Karicheri
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
06 Dec, 2009
1 commit
-
Signed-off-by: Vaibhav Hiremath
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
19 Sep, 2009
1 commit
-
Rewrite v4l2_i2c_new_subdev as a simplified version of v4l2_i2c_new_subdev_cfg
and remove v4l2_i2c_new_probed_subdev and v4l2_i2c_new_probed_subdev_addr.This simplifies this API substantially.
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
12 Sep, 2009
2 commits
-
This patch adds basic configurations for FM TX extended controls.
That includes controls names, menu strings, pointer identification,
type classification and flags configuration.Signed-off-by: Eduardo Valentin
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
The upcoming RDS encoder needs support for string controls. This patch
implements the core implementation.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
23 Jun, 2009
3 commits
-
On Fri, 12 Jun 2009, Randy Dunlap wrote:
> From: Randy Dunlap
>
> Move v4l_bound_align_image() outside of an #ifdef CONFIG_I2C block
> so that it is always built. Fixes a build error:clamp_align() should be moved as well, since it's only used by
v4l_bound_align_image(). I'm attaching an alternate version that fixes
this. Labeled the endif too.Reported-by: Randy Dunlap
Signed-off-by: Trent Piepho
Signed-off-by: Mauro Carvalho Chehab -
Most hardware has limits on minimum and maximum image dimensions and also
requirements about alignment. For example, image width must be even or a
multiple of four. Some hardware has requirements that the total image size
(width * height) be a multiple of some power of two.v4l_bound_align_image() will enforce min and max width and height, power of
two alignment on width and height, and power of two alignment on total
image size.It uses an efficient algorithm that will try to find the "closest" image
size that meets the requirements.Signed-off-by: Trent Piepho
Signed-off-by: Mauro Carvalho Chehab -
Add a new s_config core ops call: this is called with the irq and platform
data to be used to initialize the subdev.Added new v4l2_i2c_new_subdev_cfg and v4l2_i2c_new_subdev_board calls
that allows you to pass these new arguments.The existing v4l2_i2c_new_subdev functions were modified to also call
s_config.In the future the existing v4l2_i2c_new_subdev functions will be replaced
by a single v4l2_i2c_new_subdev function similar to v4l2_i2c_new_subdev_cfg
but without the irq and platform_data arguments.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
17 Jun, 2009
2 commits
-
Until now I relied on i2c_del_adapter to unregister the i2c_clients for
me, however, if the i2c bus is a platform bus then it is never deleted.So instead I need to unregister i2c clients when unregistering the
v4l2_device.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Support for tuners with i2c addresses >= 0x65 is dropped since no tuners
with addresses in the range 0x65-0x6f have been found.This patch removes addresses 0x65-0x6f from the list of tuner probe addresses,
it removes the kernel warning that warned if addresses in this range appeared,
and it removed a hack for the cx88 that is no longer needed now that the
tuner address range is reduced.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
07 Apr, 2009
3 commits
-
The functions v4l2_i2c_new_subdev and v4l2_i2c_new_probed_subdev relied on
i2c_get_adapdata to return the v4l2_device. However, this is not always
possible on embedded platforms. So modify the API to pass the v4l2_device
pointer explicitly.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Add utility function to probe for a single address, rather than a list
of addresses.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Now that all drivers are converted to v4l2_subdev we can remove legacy code
in v4l2-common. Also move the documentation of the internal API to
v4l2-subdev.h where it really belongs.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
30 Mar, 2009
10 commits
-
v4l2-common doesn't have to be a module for it to call request_module().
Just remove that test.Thanks-to: Guennadi Liakhovetski
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Signed-off-by: Janne Grunau
Signed-off-by: Mauro Carvalho Chehab -
If the i2c sub-device cannot be found, then we must unregister the i2c_client.
Otherwise this will prevent a possible probe for a different device on that same
address.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
The v4l2_ctrl_query_fill_std() function wasn't one the best idea I ever had.
It doesn't add anything valuable that cannot be expressed equally well with
v4l2_ctrl_query_fill and only adds overhead.Replace it with v4l2_ctrl_query_fill() everywhere it is used and remove it
from v4l2_common.c.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Add small function to retrieve the i2c address from a v4l2_subdev
pointer.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
The controls V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET changed their type
to button controls (these are unused at the moment, so this is a safe change).The controls V4L2_CID_PAN_RELATIVE, V4L2_CID_TILT_RELATIVE, V4L2_CID_FOCUS_RELATIVE
and V4L2_CID_ZOOM_RELATIVE are marked as write-only controls.Cc: Laurent Pinchart
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Control arrays as are used with v4l2_ctrl_next must be sorted from
low to high. Add a comment at the top of all such arrays to warn
about this.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Add v4l2_i2c_tuner_addrs() to obtain the various I2C tuner addresses.
This will be used in several drivers, so make this a common function
as we do not want to have these I2C addresses all over the place.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab