# v4l2 control settings ar0144 with v4l-ctrl # PHYTEC 2021, V0.5 # show all v4l Controls # ====================== v4l2-ctl [CAM_DEVICE] --all (list all) v4l2-ctl [CAM_DEVICE] -L (list all detail) v4l2-ctl [CAM_DEVICE] -H (help) [CAM_DEVICE] = ipux_csix capture device for example: v4l2-ctl -d /dev/v4l-subdev2 --all # set AR0144 SHUTTER # =================== # Number of Rows (if AEC off), Period of time, specified in rows, in which the exposure takes place. v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=exposure=800 # set AR0144 FLIP # ================ # Set readout flip row and/or column, v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=horizontal_flip=0 v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=vertical_flip=0 # set AR0144 SHUTTER FINE # ======================== # Delay the Shutter in Pixel (if AEC off). Additional period of time, (after the last in exposure defined row) in columns, # in which the exposure takes place. v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=exposure_fine=10 # set AR0144 AEC MIN/MAX # ======================= # Min/Max values for AEC (if AEC is on) v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=auto_exposure_min=1 v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=auto_exposure_max=800 # set AR0144 AEC AVERAGE LUMA # ============================ # Average Gr target value to be reached by the auto exposure. (if AEC is on) v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=auto_exposure_target=20480 # get AR0144 CURRENT AEC VALUE # ============================= # Read Current Exposure Value, Period of time, specified in rows, in which the exposure takes place. v4l2-ctl -d /dev/v4l-subdev2 --get-ctrl=auto_exposure_cur # set AR0144 AEC on/off # ====================== # 0 = AEC on / 1 = AEC off v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=auto_exposure=0 # set AR0144 AGC ANALOG on/off # ============================= # 0 = AGCa off / 1 = AGCa on v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=autogain_analogue=1 # set AR0144 AGC DIGITAL on/off # ============================== # 0 = AGCd off / 1 = AGCd on v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=autogain_digital=1 # set AR0144 AGC ANALOG MIN # ========================= # Minimum analog gain to be used by AE Algorithm, 0=1x, 1=2x, 2=4x, 3=8x v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=analogue_gain_auto_min=0 ## set AR0144 ROW BINNING # ======================= # Set readout with row binning, 0 = off / 1 = average, Recommend when row−wise skipping is enabled. v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=row_binning=0 ## set AR0144 COL BINNING # ======================= # Set readout with col binning, 0 = off / 1 = average / 2 = summed, Recommend when column−wise skipping is enabled. v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=col_binning=0 ## set AR0144 COMPANDING # ====================== # activate A-Law compression, Note: Effect only in MIPI mode, 0 = off / 1 = companding on v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=compading=0 # set AR0144 DIGITAL GAIN # ======================= # Value/1000 = Digital Gain, Range [1000..15999] # digital gain global v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=digital_gain=1000 # digital gain color components (e.g. for white balance) v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=digital_gain_red=1000 v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=digital_gain_green_red=1000 v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=digital_gain_blue=1000 v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=digital_gain_green_blue=1000 # set AR0144 BLACK LEVEL CORRECTION # ================================= # 0 = BLC off / 1 = BLC = on v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=black_level_correction=1 # set AR0144 DYNAMIC DEFECT PIXEL CORRECTION # ========================================== # 0 = DDPC off / 1 = DDPC on, Note: Used only sensor is stopped v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=dynamic_defect_pixel_correction=0 # set AR052x TRIGGER MODE # ======================= # 0 = Off / 1 = On v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=trigger_mode=0 ## set AR0144 FLASH/STROBE # ======================== # 0 = FLASH off / 1 = FLASH = on (Note: embedded_data must be off) v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=led_mode=0 ## set AR0144 START POSITION OF FLASH/STROBE # ========================================== # start position of flash based on "start of integration" in row_time/2, Range [-128..127] # row_time/2 for default line_length (1488) and PixCLK (74.25MHz) = 10,02us v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=flash_delay=0 # set AR0144 VERTICAL BLANKING # ============================= # number of blank rows, Note: Used only sensor is stopped v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=vertical_blanking=27 # set AR0144 HORIZONTAL BLANKING # =============================== # number of blank columns, Note: Used only sensor is stopped v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=horizontal_blanking=208 # set AR0144 ANALOG GAIN # ====================== # Value/1000 = Analog Gain, Range [1000..16000] v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=analogue_gain=2000 # set AR0144 TEST PATTERN # ======================== # testpattern range [0-4], xxx_pixel_value range [0-65535] # for test_pattern=1 set the color via v4l2-ctl xxx_pixel_value v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=test_pattern=0 v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=red_pixel_value=0 v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=green_red_pixel_value=0 v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=blue_pixel_value=0 v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl=green_blue_pixel_value=0 # get AR0144 CURRENT LINK FREQUENCY # ================================== # Read Current link frequency (only for MIPI importent) v4l2-ctl -d /dev/v4l-subdev2 --get-ctrl=link_frequency # get AR0144 PIXEL RATE # ===================== # read pixel rate (read only) v4l2-ctl -d /dev/v4l-subdev2 --get-ctrl=pixel_rate