--- zzzz-none-000/linux-3.10.107/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml 2021-02-04 17:41:59.000000000 +0000 @@ -62,18 +62,29 @@ control over buffers is required. This ioctl can be called multiple times to create buffers of different sizes. - To allocate device buffers applications initialize relevant fields of -the v4l2_create_buffers structure. They set the -type field in the -&v4l2-format; structure, embedded in this -structure, to the respective stream or buffer type. -count must be set to the number of required buffers. -memory specifies the required I/O method. The -format field shall typically be filled in using -either the VIDIOC_TRY_FMT or -VIDIOC_G_FMT ioctl(). Additionally, applications can adjust -sizeimage fields to fit their specific needs. The -reserved array must be zeroed. + To allocate the device buffers applications must initialize the +relevant fields of the v4l2_create_buffers structure. +The count field must be set to the number of +requested buffers, the memory field specifies the +requested I/O method and the reserved array must be +zeroed. + + The format field specifies the image format +that the buffers must be able to handle. The application has to fill in this +&v4l2-format;. Usually this will be done using the +VIDIOC_TRY_FMT or VIDIOC_G_FMT ioctl() +to ensure that the requested format is supported by the driver. Unsupported +formats will result in an error. + + The buffers created by this ioctl will have as minimum size the size +defined by the format.pix.sizeimage field. If the +format.pix.sizeimage field is less than the minimum +required for the given format, then sizeimage will be +increased by the driver to that minimum to allocate the buffers. If it is +larger, then the value will be used as-is. The same applies to the +sizeimage field of the +v4l2_plane_pix_format structure in the case of +multiplanar formats. When the ioctl is called with a pointer to this structure the driver will attempt to allocate up to the requested number of buffers and store the @@ -123,7 +134,8 @@ __u32 reserved[8] - A place holder for future extensions. + A place holder for future extensions. Drivers and applications +must set the array to zero. @@ -144,9 +156,9 @@ EINVAL - The buffer type (type field) or the -requested I/O method (memory) is not -supported. + The buffer type (format.type field), +requested I/O method (memory) or format +(format field) is not valid.