1.. SPDX-License-Identifier: GPL-2.0 2.. c:namespace:: V4L 3 4.. _v4l2-meta-fmt-rk-isp1-stat-3a: 5 6************************************************************************************************************************ 7V4L2_META_FMT_RK_ISP1_PARAMS ('rk1p'), V4L2_META_FMT_RK_ISP1_STAT_3A ('rk1s'), V4L2_META_FMT_RK_ISP1_EXT_PARAMS ('rk1e') 8************************************************************************************************************************ 9 10======================== 11Configuration parameters 12======================== 13 14The configuration of the RkISP1 ISP is performed by userspace by providing 15parameters for the ISP to the driver using the :c:type:`v4l2_meta_format` 16interface. 17 18There are two methods that allow to configure the ISP, the `fixed parameters` 19configuration format and the `extensible parameters` configuration 20format. 21 22.. _v4l2-meta-fmt-rk-isp1-params: 23 24Fixed parameters configuration format 25===================================== 26 27When using the fixed configuration format, parameters are passed to the 28:ref:`rkisp1_params <rkisp1_params>` metadata output video node, using 29the `V4L2_META_FMT_RK_ISP1_PARAMS` meta format. 30 31The buffer contains a single instance of the C structure 32:c:type:`rkisp1_params_cfg` defined in ``rkisp1-config.h``. So the structure can 33be obtained from the buffer by: 34 35.. code-block:: c 36 37 struct rkisp1_params_cfg *params = (struct rkisp1_params_cfg*) buffer; 38 39This method supports a subset of the ISP features only, new applications should 40use the extensible parameters method. 41 42.. _v4l2-meta-fmt-rk-isp1-ext-params: 43 44Extensible parameters configuration format 45========================================== 46 47When using the extensible configuration format, parameters are passed to the 48:ref:`rkisp1_params <rkisp1_params>` metadata output video node, using 49the `V4L2_META_FMT_RK_ISP1_EXT_PARAMS` meta format. 50 51The buffer contains a single instance of the C structure 52:c:type:`rkisp1_ext_params_cfg` defined in ``rkisp1-config.h``. The 53:c:type:`rkisp1_ext_params_cfg` structure is designed to allow userspace to 54populate the data buffer with only the configuration data for the ISP blocks it 55intends to configure. The extensible parameters format design allows developers 56to define new block types to support new configuration parameters, and defines a 57versioning scheme so that it can be extended and versioned without breaking 58compatibility with existing applications. 59 60For these reasons, this configuration method is preferred over the `fixed 61parameters` format alternative. 62 63.. rkisp1_stat_buffer 64 65=========================== 663A and histogram statistics 67=========================== 68 69The ISP1 device collects different statistics over an input Bayer frame. 70Those statistics are obtained from the :ref:`rkisp1_stats <rkisp1_stats>` 71metadata capture video node, 72using the :c:type:`v4l2_meta_format` interface. The buffer contains a single 73instance of the C structure :c:type:`rkisp1_stat_buffer` defined in 74``rkisp1-config.h``. So the structure can be obtained from the buffer by: 75 76.. code-block:: c 77 78 struct rkisp1_stat_buffer *stats = (struct rkisp1_stat_buffer*) buffer; 79 80The statistics collected are Exposure, AWB (Auto-white balance), Histogram and 81AF (Auto-focus). See :c:type:`rkisp1_stat_buffer` for details of the statistics. 82 83The 3A statistics and configuration parameters described here are usually 84consumed and produced by dedicated user space libraries that comprise the 85important tuning tools using software control loop. 86 87rkisp1 uAPI data types 88====================== 89 90.. kernel-doc:: include/uapi/linux/rkisp1-config.h 91