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's name will be used
179 * @postfix: sub-device specific string to put right after the I²C device name;
186 * v4l2_i2c_subdev_init - Initializes a &struct v4l2_subdev with data from
197 * v4l2_i2c_subdev_addr - returns i2c client address of &struct v4l2_subdev.
201 * Returns the address of an I2C sub-device
206 * v4l2_i2c_tuner_addrs - Return a list of I2C tuner addresses to probe.
216 * v4l2_i2c_subdev_unregister - Unregister a v4l2_subdev
266 /* ------------------------------------------------------------------------- */
275 * v4l2_spi_new_subdev - Load an spi module and return an initialized
289 * v4l2_spi_subdev_init - Initialize a v4l2_subdev with data from an
300 * v4l2_spi_subdev_unregister - Unregister a v4l2_subdev
324 /* ------------------------------------------------------------------------- */
328 * are still used in tuner-simple.c (TUNER_SET_CONFIG) and cx18/ivtv (RESET).
344 /* ------------------------------------------------------------------------- */
349 * v4l_bound_align_image - adjust video dimensions according to
352 * @width: pointer to width that will be adjusted if needed.
353 * @wmin: minimum width.
354 * @wmax: maximum width.
355 * @walign: least significant bit on width.
361 * :math:`width * height`).
363 * Clip an image to have @width between @wmin and @wmax, and @height between
366 * Additionally, the @width will be a multiple of :math:`2^{walign}`,
368 * size :math:`width * height` will be a multiple of :math:`2^{salign}`.
385 void v4l_bound_align_image(unsigned int *width, unsigned int wmin,
392 * v4l2_find_nearest_size - Find the nearest size among a discrete
397 * @width_field: the name of the width field in the driver specific struct
399 * @width: desired width.
402 * Finds the closest resolution to minimize the width and height differences
403 * between what requested and the supported resolutions. The size of the width
410 width, height) \ argument
412 BUILD_BUG_ON(sizeof((array)->width_field) != sizeof(u32) || \
413 sizeof((array)->height_field) != sizeof(u32)); \
418 width, height); \
423 size_t height_offset, s32 width, s32 height);
426 * v4l2_g_parm_cap - helper routine for vidioc_g_parm to fill this in by
431 * @vdev: the struct video_device pointer. Used to determine the device caps.
432 * @sd: the sub-device pointer.
439 * v4l2_s_parm_cap - helper routine for vidioc_s_parm to fill this in by
444 * @vdev: the struct video_device pointer. Used to determine the device caps.
445 * @sd: the sub-device pointer.
456 /* ------------------------------------------------------------------------- */
461 * enum v4l2_pixel_encoding - specifies the pixel encoding value
463 * @V4L2_PIXEL_ENC_UNKNOWN: Pixel encoding is unknown/un-initialized
476 * struct v4l2_format_info - information about a V4L2 format
481 * @bpp: Array of per-plane bytes per pixel
484 * @block_w: Per-plane macroblock pixel width (optional)
485 * @block_h: Per-plane macroblock pixel height (optional)
501 return f && f->pixel_enc == V4L2_PIXEL_ENC_RGB; in v4l2_is_format_rgb()
506 return f && f->pixel_enc == V4L2_PIXEL_ENC_YUV; in v4l2_is_format_yuv()
511 return f && f->pixel_enc == V4L2_PIXEL_ENC_BAYER; in v4l2_is_format_bayer()
515 void v4l2_apply_frmsize_constraints(u32 *width, u32 *height,
518 u32 width, u32 height);
520 u32 width, u32 height);
523 * v4l2_get_link_freq - Get link rate from transmitter
527 * D-PHY, samples per clock on parallel. 0 otherwise.
529 * times two on D-PHY, 1 on parallel. 0 otherwise.
532 * transmitter sub-devices. It returns the link rate, either from the
537 * -ENOENT: Link frequency or pixel rate control not found
538 * -EINVAL: Invalid link frequency value
546 * When the timestamp comes from 32-bit user space, there may be in v4l2_buffer_get_timestamp()
550 return buf->timestamp.tv_sec * NSEC_PER_SEC + in v4l2_buffer_get_timestamp()
551 (u32)buf->timestamp.tv_usec * NSEC_PER_USEC; in v4l2_buffer_get_timestamp()
559 buf->timestamp.tv_sec = ts.tv_sec; in v4l2_buffer_set_timestamp()
560 buf->timestamp.tv_usec = ts.tv_nsec / NSEC_PER_USEC; in v4l2_buffer_set_timestamp()