Lines Matching +full:device +full:- +full:width
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
6 internal low-level v4l2 drivers.
18 #include <media/v4l2-dev.h>
20 /* Common printk constructs for v4l-i2c drivers. These macros create a unique
24 printk(level "%s %d-%04x: " fmt, name, i2c_adapter_id(adapter), addr , ## arg)
27 v4l_printk(level, (client)->dev.driver->name, (client)->adapter, \
28 (client)->addr, fmt , ## arg)
54 /* ------------------------------------------------------------------------- */
58 printk(level "%s: " fmt, (dev)->name , ## arg)
78 * v4l2_ctrl_query_fill- Fill in a struct v4l2_queryctrl
90 * This function assumes that the @qctrl->id field is filled.
92 * Returns -EINVAL if the control is not known by the V4L2 core, 0 on success.
98 /* ------------------------------------------------------------------------- */
108 * enum v4l2_i2c_tuner_type - specifies the range of tuner address that
128 * NOTE: All I2C addresses above use the 7-bit notation.
140 * v4l2_i2c_new_subdev - Load an i2c module and return an initialized
157 * v4l2_i2c_new_subdev_board - Load an i2c module and return an initialized
174 * v4l2_i2c_subdev_set_name - Set name for an I²C sub-device
178 * @devname: the name of the device; if NULL, the I²C device drivers's name
180 * @postfix: sub-device specific string to put right after the I²C device name;
187 * v4l2_i2c_subdev_init - Initializes a &struct v4l2_subdev with data from
198 * v4l2_i2c_subdev_addr - returns i2c client address of &struct v4l2_subdev.
202 * Returns the address of an I2C sub-device
207 * v4l2_i2c_tuner_addrs - Return a list of I2C tuner addresses to probe.
217 * v4l2_i2c_subdev_unregister - Unregister a v4l2_subdev
267 /* ------------------------------------------------------------------------- */
276 * v4l2_spi_new_subdev - Load an spi module and return an initialized
290 * v4l2_spi_subdev_init - Initialize a v4l2_subdev with data from an
301 * v4l2_spi_subdev_unregister - Unregister a v4l2_subdev
325 /* ------------------------------------------------------------------------- */
329 * are still used in tuner-simple.c (TUNER_SET_CONFIG) and cx18/ivtv (RESET).
345 /* ------------------------------------------------------------------------- */
350 * v4l_bound_align_image - adjust video dimensions according to
353 * @width: pointer to width that will be adjusted if needed.
354 * @wmin: minimum width.
355 * @wmax: maximum width.
356 * @walign: least significant bit on width.
362 * :math:`width * height`).
364 * Clip an image to have @width between @wmin and @wmax, and @height between
367 * Additionally, the @width will be a multiple of :math:`2^{walign}`,
369 * size :math:`width * height` will be a multiple of :math:`2^{salign}`.
386 void v4l_bound_align_image(unsigned int *width, unsigned int wmin,
393 * v4l2_find_nearest_size - Find the nearest size among a discrete
398 * @width_field: the name of the width field in the driver specific struct
400 * @width: desired width.
403 * Finds the closest resolution to minimize the width and height differences
404 * between what requested and the supported resolutions. The size of the width
411 width, height) \ argument
413 BUILD_BUG_ON(sizeof((array)->width_field) != sizeof(u32) || \
414 sizeof((array)->height_field) != sizeof(u32)); \
419 width, height); \
424 size_t height_offset, s32 width, s32 height);
427 * v4l2_g_parm_cap - helper routine for vidioc_g_parm to fill this in by
432 * @vdev: the struct video_device pointer. Used to determine the device caps.
433 * @sd: the sub-device pointer.
440 * v4l2_s_parm_cap - helper routine for vidioc_s_parm to fill this in by
445 * @vdev: the struct video_device pointer. Used to determine the device caps.
446 * @sd: the sub-device pointer.
457 /* ------------------------------------------------------------------------- */
462 * enum v4l2_pixel_encoding - specifies the pixel encoding value
464 * @V4L2_PIXEL_ENC_UNKNOWN: Pixel encoding is unknown/un-initialized
477 * struct v4l2_format_info - information about a V4L2 format
482 * @bpp: Array of per-plane bytes per pixel
483 * @bpp_div: Array of per-plane bytes per pixel divisors to support fractional pixel sizes.
486 * @block_w: Per-plane macroblock pixel width (optional)
487 * @block_h: Per-plane macroblock pixel height (optional)
504 return f && f->pixel_enc == V4L2_PIXEL_ENC_RGB; in v4l2_is_format_rgb()
509 return f && f->pixel_enc == V4L2_PIXEL_ENC_YUV; in v4l2_is_format_yuv()
514 return f && f->pixel_enc == V4L2_PIXEL_ENC_BAYER; in v4l2_is_format_bayer()
518 void v4l2_apply_frmsize_constraints(u32 *width, u32 *height,
521 u32 width, u32 height);
523 u32 width, u32 height);
526 * v4l2_get_link_freq - Get link rate from transmitter
530 * D-PHY, samples per clock on parallel. 0 otherwise.
532 * times two on D-PHY, 1 on parallel. 0 otherwise.
535 * transmitter sub-devices. It returns the link rate, either from the
540 * -ENOENT: Link frequency or pixel rate control not found
541 * -EINVAL: Invalid link frequency value
553 * When the timestamp comes from 32-bit user space, there may be in v4l2_buffer_get_timestamp()
557 return buf->timestamp.tv_sec * NSEC_PER_SEC + in v4l2_buffer_get_timestamp()
558 (u32)buf->timestamp.tv_usec * NSEC_PER_USEC; in v4l2_buffer_get_timestamp()
566 buf->timestamp.tv_sec = ts.tv_sec; in v4l2_buffer_set_timestamp()
567 buf->timestamp.tv_usec = ts.tv_nsec / NSEC_PER_USEC; in v4l2_buffer_set_timestamp()