Allied Vision CSI V4L2 Subdevice Driver v1.3
The standard controls only support 32-bit integer values. Therefore, most controls use the extended v4l2 control interface.
The Subdevice driver provides the following standard compliant controls:
Additionally, it exposes the following standard V4L2 controls as 64-bit controls:
These controls are only accessible through the extended controls API.
The base address of the custom controls in the Subdevice driver is V4L2_CID_CAMERA_CLASS_BASE+40. All Allied Vision custom v4l2 controls use the prefix AVT instead of V4L2.
The following custom controls are available in the Subdevice driver:
AVT_CID_EXPOSURE_AUTO_MIN (V4L2_CID_CAMERA_CLASS_BASE+40, integer64): Minimum exposure time set can be set by the auto exposure algorithm.
AVT_CID_EXPOSURE_AUTO_MAX (V4L2_CID_CAMERA_CLASS_BASE+41, integer64): Maximum exposure time set can be set by the auto exposure algorithm.
AVT_CID_GAIN_AUTO_MIN (V4L2_CID_CAMERA_CLASS_BASE+42, integer64): Minimum gain that can be set by the auto gain algorithm.
AVT_CID_GAIN_AUTO_MAX (V4L2_CID_CAMERA_CLASS_BASE+43, integer64): Maximum gain that can be set by the auto gain algorithm.
AVT_CID_EXPOSURE_ACTIVE_LINE_MODE (V4L2_CID_CAMERA_CLASS_BASE+44, boolean): When enabled, the exposure active signal is outputted to the line selected by AVT_CID_EXPOSURE_ACTIVE_LINE_SELECTOR.
AVT_CID_EXPOSURE_ACTIVE_LINE_SELECTOR (V4L2_CID_CAMERA_CLASS_BASE+45, enum): Selects the GPIO line for the exposure active signal output. Available values:
AVT_EXPOSURE_ACTIVE_LINE0 = 1
AVT_EXPOSURE_ACTIVE_LINE1 = 2
AVT_EXPOSURE_ACTIVE_LINE2 = 3
AVT_EXPOSURE_ACTIVE_LINE3 = 4AVT_CID_EXPOSURE_ACTIVE_INVERT (V4L2_CID_CAMERA_CLASS_BASE+46, boolean): True inverts the exposure active signal.
AVT_CID_TRIGGER_MODE (V4L2_CID_CAMERA_CLASS_BASE+47, boolean): Selects whether the trigger mode is enabled or not.
AVT_CID_TRIGGER_ACTIVATION (V4L2_CID_CAMERA_CLASS_BASE+48, enum): Selects the event type to active the trigger:
AVT_CID_TRIGGER_SOURCE (V4L2_CID_CAMERA_CLASS_BASE+49, enum): Selects the input of the trigger:
AVT_CID_TRIGGER_SOFTWARE (V4L2_CID_CAMERA_CLASS_BASE+50, button): Executes a software trigger pulse on activation.
AVT_CID_DEVICE_TEMPERATURE (V4L2_CID_CAMERA_CLASS_BASE+51, integer64): Reads the current temperature from the camera.
AVT_CID_BINNING_MODE (V4L2_CID_CAMERA_CLASS_BASE+52, enum): Current binning mode used:
AVT_BINNING_MODE_AVG = 1
AVT_BINNING_MODE_SUM = 2AVT_CID_BINNING_SETTING (V4L2_CID_CAMERA_CLASS_BASE+53, area): Reads the current binning settings (e.g 2x2 or 4x4) from the camera.
AVT_CID_FIRMWARE_VERSION (V4L2_CID_CAMERA_CLASS_BASE+54, string): Reads the firmware version from the camera.
AVT_CID_CAMERA_NAME (V4L2_CID_CAMERA_CLASS_BASE+55, string): Reads the name from the camera.
AVT_CID_SERIAL_NUMBER (V4L2_CID_CAMERA_CLASS_BASE+56, string): Read the serial number from the camera.
AVT_CID_ACQUISITION_STATUS (V4L2_CID_CAMERA_CLASS_BASE+57, bool): Reads the acquisition status from the camera. Returns true if the camera is currently streaming, otherwise false.
AVT_CID_BINNING_SELECTOR (V4L2_CID_CAMERA_CLASS+58, enum): Selects if digital or sensor binning should be used:
AVT_BINNING_DIGITAL = 1
AVT_BINNING_SENSOR = 2AVT_CID_INTENSITY_AUTO_PRECEDENCE (V4L2_CID_CAMERA_CLASS+59, enum): Selects the priority of exposure, gain and iris in the controls loop for auto intensity:
AVT_ INTENSITY_AUTO_PRECEDENCE_MINIMIZE_NOISE = 1
AVT_ INTENSITY_AUTO_PRECEDENCE_MINIMIZE_BLUR = 2
AVT_ INTENSITY_AUTO_PRECEDENCE_MAXIMIZE_DOF = 3AVT_CID_INTENSITY_AUTO_PRECEDENCE_TARGET (V4L2_CID_CAMERA_CLASS+60, integer): Sets the target intensity value for the auto intensity control.
AVT_CID_INTENSITY_CONTROLLER_REGION (V4L2_CID_CAMERA_CLASS+80, enum): Selects the region for the intensity controller to work on. Available options:
AVT_INTENSITY_CONTROLLER_REGION_FULL_IMAGE = 1
AVT_INTENSITY_CONTROLLER_REGION_AUTO_REGION = 2AVT_CID_TEST_PATTERN (V4L2_CID_CAMERA_CLASS+61, enum): Selects the sensor test pattern. If a test pattern is selected, it is streamed instead of the real image. Available options:
AVT_TEST_PATTERN_OFF = 1
AVT_TEST_PATTERN_BLACK = 2
AVT_TEST_PATTERN_WHITE = 3
AVT_TEST_PATTERN_GREY = 4
AVT_TEST_PATTERN_RED = 5
AVT_TEST_PATTERN_GREEN = 6
AVT_TEST_PATTERN_BLUE = 7
AVT_TEST_PATTERN_COLOR_HBAR = 8
AVT_TEST_PATTERN_COLOR_VBAR = 9 = 10
AVT_TEST_PATTERN_GREY_ALT_STRIPE = 11
AVT_TEST_PATTERN_GREY_ALT_PIXEL = 12
AVT_TEST_PATTERN_GREY_VBAR1 = 13
AVT_TEST_PATTERN_GREY_VBAR2 = 14
AVT_TEST_PATTERN_GREY_HRAMP = 15
AVT_TEST_PATTERN_GREY_DRAMP_MOVING = 16
AVT_TEST_PATTERN_GREY_DRAMP = 17AVT_CID_DO_EXPOSURE_AUTO_ONCE (V4L2_CID_CAMERA_CLASS+62, button): Perfom auto exposure once, when button control is executed.
AVT_CID_COLOR_TRANSFORM_MATRIX_ENABLE (V4L2_CID_CAMERA_CLASS+63, bool): Enable user supplied color transform matrix.
AVT_CID_COLOR_TRANSFORM_MATRIX (V4L2_CID_CAMERA_CLASS+64, integer[]): Array control for the color transform matrix
AVT_CID_DEVICE_STATUS (V4L2_CID_CAMERA_CLASS+65, bitmask): Contains the value of the device status register. Available flags:
AVT_DEVICE_STATUS_BACKEND_BUFFER_OKAY = 1
AVT_DEVICE_STATUS_MAINBOARD_TEMPERATURE_OKAY = 2
AVT_DEVICE_STATUS_STREAM_READY = 3
AVT_DEVICE_STATUS_MIPI_PHY_OKAY = 4
AVT_DEVICE_STATUS_SENSORBOARD_TEMPERATURE_OKAY = 5
AVT_DEVICE_STATUS_SENSOR_COMMUNICATION_OKAY = 6AVT_CID_REVISION_ID (V4L2_CID_CAMERA_CLASS+66, string): Customer specific revision id.
AVT_CID_USER_DATA_STORAGE (V4L2_CID_CAMERA_CLASS+67, u32[]): U32 array control for accessing the user data storage space inside the camera flash.
AVT_CID_FRAME_TRIGGER_WAIT_LINE_MODE (V4L2_CID_CAMERA_CLASS+68, bool): Enable frame trigger wait line mode.
AVT_CID_FRAME_TRIGGER_WAIT_LINE_SELECTOR (V4L2_CID_CAMERA_CLASS+69, enum): Selects the io line to ouput the frame trigger wait signal on. Available options:
AVT_FRAME_TRIGGER_WAIT_LINE0 = 1
AVT_FRAME_TRIGGER_WAIT_LINE1 = 2
AVT_FRAME_TRIGGER_WAIT_LINE2 = 3
AVT_FRAME_TRIGGER_WAIT_LINE3 = 4AVT_CID_FRAME_TRIGGER_WAIT_INVERT (V4L2_CID_CAMERA_CLASS+70, bool): Invert frame trigger signal output.
AVT_CID_AUTO_REGION_LEFT (V4L2_CID_CAMERA_CLASS+71, integer): Auto region offset X.
AVT_CID_AUTO_REGION_TOP (V4L2_CID_CAMERA_CLASS+72, integer): Auto region offset Y.
AVT_CID_AUTO_REGION_WIDTH (V4L2_CID_CAMERA_CLASS+73, integer): Auto region width.
AVT_CID_AUTO_REGION_HEIGHT (V4L2_CID_CAMERA_CLASS+74, integer): Auto region height.
AVT_CID_SENSORBOARD_TEMPERATURE (V4L2_CID_CAMERA_CLASS+75, integer): Current value of the temperature sensor on the image sensor board.
AVT_CID_SENSORBOARD_TEMPERATURE_WARNING_LEVEL (V4L2_CID_CAMERA_CLASS+81, interger): Threshold for the sensorboard temperature warning.
AVT_CID_MAINBOARD_TEMPERATURE_WARNING_LEVEL (V4L2_CID_CAMERA_CLASS+76, integer): Threshold for the mainboard temperature warning.
AVT_CID_DPC_ENABLE (V4L2_CID_CAMERA_CLASS+77, bool): Enable Defect Pixel Correction inside the camera.
AVT_CID_EXPOSURE_GAIN (V4L2_CID_CAMERA_CLASS+78, integer64): Combined exposure time and gain value. Only needs one register access to change both.
AVT_CID_POWER_SAVE_MODE (V4L2_CID_CAMERA_CLASS+79, enum): Alvium power save mode setting. Available options:
AVT_POWER_SAVE_DISABLED = 1
AVT_POWER_SAVE_STANDBY = 2| V4L2 Control | Value Register | Minimum Register | Maximum Register | Increment Register | Comment |
|---|---|---|---|---|---|
| V4L2_CID_AUTOGAIN | Gain Auto (0x1E8) | N/A | N/A | N/A | Optional, feature inquiry bit 12. |
| V4L2_CID_AUTO_WHITE_BALANCE | White Balance Auto (0x2E0) | N/A | N/A | N/A | Optional, feature inquiry bit 13. Value Mapping: False <-> Off (0) True <-> Continuous (2) |
| V4L2_CID_DO_WHITE_BALANCE | White Balance Auto (0x2E0) | N/A | N/A | N/A | Optional, feature inquiry bit 13. Value Mapping: Triggered <-> Once (1) |
| V4L2_CID_EXPOSURE_ABSOLUTE | Exposure Time (0x180) | Exposure Time Min Value (0x188) | Exposure Time Max Value (0x190) | Fixed to 1 | Control value in 100 us units, converted to register unit (ns). A fixed increment of 1 is used, because the exposure time increment is variable. Flags: Volatile |
| V4L2_CID_EXPOSURE_AUTO | Exposure Auto (0x1A0) | N/A | N/A | N/A | Optional, feature inquiry bit 11. Value Mapping: V4L2_EXPOSURE_AUTO <-> Continuous (2) V4L2_EXPOSURE_MANUAL <-> Off (0) |
| V4L2_CID_BRIGHTNESS | Black Level (0x1B8) | Black Level Min Value (0x1BC) | Black Level Max Value (0x1C0) | Black Level Increment (0x1C4) | Optional, feature inquiry bit 3. Disabled during streaming. |
| V4L2_CID_SATURATION | Saturation (0x240) | Saturation Min Value (0x244) | Saturation Max Value (0x248) | Saturation Increment (0x24C) | Optional, feature inquiry bit 7. |
| V4L2_CID_CONTRAST | Contrast Value (0x214) | Contrast Value Min Value (0x218) | Contrast Value Max Value (0x21C) | Contrast Value Increment (0x220) | Optional, feature inquiry bit 6. |
| V4L2_CID_HUE | Hue (0x250) | Hue Min Value (0x254) | Hue Max Value (0x258) | Hue Increment (0x25C) | Optional, feature inquiry bit 8. |
| V4L2_CID_RED_BALANCE | Red Balance Ratio (0x280) | Red Balance Ratio Min Value (0x288) | Red Balance Ratio Max Value (0x290) | Red Balance Increment (0x298) | Optional, feature inquiry bit 9. Only available for color cameras. Flags: Volatile |
| V4L2_CID_BLUE_BALANCE | Blue Balance Ratio (0x2C0) | Blue Balance Ratio Min Value (0x2C8) | Blue Balance Ratio Max Value (0x2D0) | Blue Balance Increment (0x2D8) | Optional, feature inquiry bit 9. Only available for color cameras. Flags: Volatile |
| V4L2_CID_GAMMA | Gamma (0x1F0) | Gamma Min Value (0x1F8) | Gamma Max Value (0x200) | Gamma Increment (0x208) | Optional, feature inquiry bit 5. |
| V4L2_CID_EXPOSURE | Exposure Time (0x180) | Exposure Time Min Value (0x188) | Exposure Time Max Value (0x190) | Fixed to 1 | A fixed increment of 1 is used, because the exposure time increment
is variable. Disabled if V4L2_CID_EXPOSURE_AUTO is set to V4L2_EXPOSURE_AUTO. Flags: Volatile |
| V4L2_CID_GAIN | Gain (0x1C8) | Gain Min Value (0x1D0) | Gain Max Value (0x1D8) | Gain Increment (0x1E0) | Optional, feature inquiry bit 4. Disabled if V4L2_CID_AUTOGAIN is set to true. Flags: Volatile |
| V4L2_CID_HFLIP | Reverse X (0x158) | N/A | N/A | N/A | Optional, feature inquiry bit 0. |
| V4L2_CID_VFLIP | Reverse Y (0x15C) | N/A | N/A | N/A | Optional, feature inquiry bit 1. |
| AVT_CID_EXPOSURE_AUTO_MIN | Exposure Auto Min (0x330) | Exposure Time Min Value (0x188) | Exposure Auto Max (0x338) | Fixed 1. | Optional, feature inquiry bit 11. A fixed increment of 1 is used, because the exposure time increment is variable. |
| AVT_CID_EXPOSURE_AUTO_MAX | Exposure Auto Max (0x338) | Exposure Auto Min (0x330) | Exposure Time Max Value (0x190) | Fixed 1. | Optional, feature inquiry bit 11. A fixed increment of 1 is used, because the exposure time increment is variable. |
| AVT_CID_GAIN_AUTO_MIN | Gain Auto Min (0x340) | Gain Min Value (0x1D0) | Gain Auto Max (0x348) | Gain Increment (0x1E0) | Optional, feature inquiry bit 12. |
| AVT_CID_GAIN_AUTO_MAX | Gain Auto Max (0x348) | Gain Auto Min (0x338) | Gain Max Value (0x1D8) | Gain Increment (0x1E0) | Optional, feature inquiry bit 12. |
| AVT_CID_EXPOSURE_ACTIVE_LINE_MODE | Exposure Active Line Mode (0x0C4) | N/A | N/A | N/A | Optional, feature inquiry bit 18. |
| AVT_CID_EXPOSURE_ACTIVE_LINE_SELECTOR | Exposure Active Output Line (0x0CC) | N/A | N/A | N/A | Optional, feature inquiry bit 18. |
| AVT_CID_EXPOSURE_ACTIVE_INVERT | Line Configuration (0x0D0) | N/A | N/A | N/A | Optional, feature inquiry bit 18. Set the inverted/not inverted bit for the line selected by the “exposure active line selector” control. |
| AVT_CID_TRIGGER_MODE | Frame Start Trigger Mode (0x0B4) | N/A | N/A | N/A | Optional, feature inquiry bit 17. Disabled during streaming. |
| AVT_CID_TRIGGER_ACTIVATION | Frame Start Trigger Activation (0x0BC) | N/A | N/A | N/A | Optional, feature inquiry bit 17. Disabled during streaming. Disable when trigger mode is true. |
| AVT_CID_TRIGGER_SOURCE | Frame Start Trigger Source (0x0B8) | N/A | N/A | N/A | Optional, feature inquiry bit 17. Disabled during streaming. Disable when trigger mode is true. |
| AVT_CID_TRIGGER_SOFTWARE | Frame Start Trigger Software (0x0C0) | N/A | N/A | N/A | Optional, feature inquiry bit 17. Writes 1 to the register on execute. Only enable when trigger mode is true, trigger source is software and acquisition is started |
| AVT_CID_DEVICE_TEMPERATURE | Device Temperature (0x310) | N/A | N/A | N/A | Optional, feature inquiry bit 14. Flags: Volatile Read only |
| AVT_CID_BINNING_MODE | Binning Mode (0x178) | N/A | N/A | N/A | Disabled during streaming. |
| AVT_CID_BINNING_SETTING | Binning Setting (0x174) | N/A | N/A | N/A | Register value mapped to corresponding v4l2
area. Flags: Volatile Read only |
| AVT_CID_FIRMWARE_VERSION | Device Firmware Version (0x010) | N/A | N/A | N/A | Flags: Read only |
| AVT_CID_ACQUISITION_STATUS | Acquisition Status (0x08C) | N/A | N/A | N/A | Flags: Volatile Read only |
| AVT_CID_BINNING_SELECTOR | Binning Setting (0x174) | N/A | N/A | N/A | Disabled during streaming. Depending on the value either the Digital or Sensor binning settings can be used. |
| AVT_CID_INTENSITY_AUTO_PRECEDENCE | Intensity Auto Precedence (0x1A4) | N/A | N/A | N/A | Optional, feature inquiry bit 2. |
| AVT_CID_INTENSITY_AUTO_PRECEDENCE_TARGET | Intensity Auto Precedence Target Value (0x1A8) | Intensity Auto Precedence Min Target Value (0x1AC) | Intensity Auto Precedence Max Target Value (0x1B0) | Intensity Auto Precedence Increment Target Value (0x1B4) | Optional, feature inquiry bit 2. |
| AVT_CID_TEST_PATTERN | Test Pattern Setting (0x3B4) | N/A | N/A | N/A | Available options defined by “Test Pattern Inquiry
(0x3B0)”. Minimum Firmware Version 14. |
| AVT_CID_COLOR_TRANSFORM_MATRIX_ENABLE | Color Transform Matrix Enable (0x2E4) | N/A | N/A | N/A | Optional, feature inquiry bit 21. |
| AVT_CID_COLOR_TRANSFORMAT_MATRIX | Color Transform Matrix Values (0x2E8 – 0x2F8) | N/A | N/A | N/A | Optional, feature inquiry bit 21. |
| AVT_CID_DEVICE_STATUS | Device Status (0x0024) | N/A | N/A | N/A | Optional, feature inquiry bit 23. |
| AVT_CID_REVISION_ID | Reserved (0x0028) | N/A | N/A | N/A | Optional, feature inquiry bit 24. |
| AVT_CID_USER_DATA_STORAGE | User Data Index (0x001c) User Data Value (0x0020) |
N/A | N/A | N/A | Optional, feature inquiry bit 22. User data slots mapped to array control in driver. |
| AVT_CID_FRAME_TRIGGER_WAIT_LINE_MODE | Frame Trigger Wait Line Mode (0x00DC) | N/A | N/A | N/A | Optional, feature inquiry bit 20. |
| AVT_CID_FRAME_TRIGGER_WAIT_LINE_SELECTOR | Frame Trigger Wait Output Line (0x00D8) | N/A | N/A | N/A | Optional, feature inquiry bit 20. |
| AVT_CID_FRAME_TRIGGER_WAIT_INVERT | Line Configuration (0x0D0) | N/A | N/A | N/A | Optional, feature inquiry bit 20. Line invert activated based on line selected as frame trigger wait output. Line configuration handling shared with trigger and exposure active output. |
| AVT_CID_AUTO_REGION_LEFT | Auto Region Offset X (0x0370) | Auto Region Offset X Min Value (0x0374) | Auto Region Offset X Max Value (0x0378) | Auto Region Offset X Increment (0x037C) | Optional, feature inquiry bit 19. |
| AVT_CID_AUTO_REGION_TOP | Auto Region Offset Y (0x0380) | Auto Region Offset Y Min Value (0x0384) | Auto Region Offset Y Max Value (0x0388) | Auto Region Offset Y Increment (0x038C) | Optional, feature inquiry bit 19. |
| AVT_CID_AUTO_REGION_WIDTH | Auto Region Width (0x0350) | Auto Region Width Min Value (0x0354) | Auto Region Width Max Value (0x0358) | Auto Region Width Increment (0x35C) | Optional, feature inquiry bit 19. |
| AVT_CID_AUTO_REGION_HEIGHT | Auto Region Height (0x0360) | Auto Region Height Min Value (0x0364) | Auto Region Height Max Value (0x0368) | Auto Region Height Increment (0x036C) | Optional, feature inquiry bit 19. |
| AVT_CID_SENSORBOARD_TEMPERATURE | Sensorboard Temperature (0x0390) | N/A | N/A | N/A | Optional, feature inquiry bit 28. |
| AVT_CID_MAINBOARD_TEMPERATURE_WARNING_LEVEL | Mainboard Temperature Warning Level (0x0394) | N/A | N/A | N/A | Optional, feature inquiry bit 29. |
| AVT_CID_DPC_ENABLE | DPC Enable (0x00E4) | N/A | N/A | N/A | Optional, feature inquiry bit 31. |
| AVT_CID_EXPOSURE_GAIN | Exposure Time & Gain combined (0x0224) | N/A | N/A | N/A | Optional, feature inquiry bit 30. |
| AVT_CID_POWER_SAVE_MODE | Device Power Save Mode (0x0034) | N/A | N/A | N/A | Optional, feature inquiry bit 27. |
| AVT_CID_INTENSITY_CONROLLER_REGION | Intensity Controller Region (0x022C) | N/A | N/A | N/A | Optional, feature inquiry bit 19. |
| AVT_CID_SENSORBOARD_TEMPERATURE_WARNING_LEVEL | Sensorboard Temperature Warning Level (0x0398) | N/A | N/A | N/A | Optional, feature inquiry bit 32. |
| V4L2 Control | Value Register | Minimum Register | Maximum Register | Increment Register | Comment |
|---|---|---|---|---|---|
| AVT_CID_CAMERA_NAME | Model Name (0x098) Family name (0x0D8) |
- | - | - | Value: “ Flags: Read only |
| AVT_CID_SERIAL_NUMBER | Serial Number (0x198) | - | - | - | Flags: Read only |
The configuration of the camera CSI2 interface (clock frequency and lane count) is read from the device tree during initialization and cannot be changed.
Using these standard properties ensures compatibility to mainline video drivers.
The pixel format can be read / changed using the
get_/set_fmt v4l2 subdevice pad operations. With
get_fmt v4l2 operation, it is also possible to read current
width and height of the image.
set_fmt operation.