18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ci.. _v4l2-meta-fmt-params-rkisp1: 48c2ecf20Sopenharmony_ci.. _v4l2-meta-fmt-stat-rkisp1: 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci***************************************************************************** 78c2ecf20Sopenharmony_ciV4L2_META_FMT_RK_ISP1_PARAMS ('rk1p'), V4L2_META_FMT_RK_ISP1_STAT_3A ('rk1s') 88c2ecf20Sopenharmony_ci***************************************************************************** 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciConfiguration parameters 118c2ecf20Sopenharmony_ci======================== 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ciThe configuration parameters are passed to the 148c2ecf20Sopenharmony_ci:ref:`rkisp1_params <rkisp1_params>` metadata output video node, using 158c2ecf20Sopenharmony_cithe :c:type:`v4l2_meta_format` interface. The buffer contains 168c2ecf20Sopenharmony_cia single instance of the C structure :c:type:`rkisp1_params_cfg` defined in 178c2ecf20Sopenharmony_ci``rkisp1-config.h``. So the structure can be obtained from the buffer by: 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci.. code-block:: c 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci struct rkisp1_params_cfg *params = (struct rkisp1_params_cfg*) buffer; 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci.. rkisp1_stat_buffer 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci3A and histogram statistics 268c2ecf20Sopenharmony_ci=========================== 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ciThe ISP1 device collects different statistics over an input Bayer frame. 298c2ecf20Sopenharmony_ciThose statistics are obtained from the :ref:`rkisp1_stats <rkisp1_stats>` 308c2ecf20Sopenharmony_cimetadata capture video node, 318c2ecf20Sopenharmony_ciusing the :c:type:`v4l2_meta_format` interface. The buffer contains a single 328c2ecf20Sopenharmony_ciinstance of the C structure :c:type:`rkisp1_stat_buffer` defined in 338c2ecf20Sopenharmony_ci``rkisp1-config.h``. So the structure can be obtained from the buffer by: 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci.. code-block:: c 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci struct rkisp1_stat_buffer *stats = (struct rkisp1_stat_buffer*) buffer; 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ciThe statistics collected are Exposure, AWB (Auto-white balance), Histogram and 408c2ecf20Sopenharmony_ciAF (Auto-focus). See :c:type:`rkisp1_stat_buffer` for details of the statistics. 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ciThe 3A statistics and configuration parameters described here are usually 438c2ecf20Sopenharmony_ciconsumed and produced by dedicated user space libraries that comprise the 448c2ecf20Sopenharmony_ciimportant tuning tools using software control loop. 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_cirkisp1 uAPI data types 478c2ecf20Sopenharmony_ci====================== 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci.. kernel-doc:: drivers/staging/media/rkisp1/uapi/rkisp1-config.h 50