1.12. Flash Control Reference¶
The V4L2 flash controls are intended to provide generic access to flash controller devices. Flash controller devices are typically used in digital cameras.
The interface can support both LED and xenon flash devices. As of writing this, there is no xenon flash driver using this interface.
1.12.1. Supported use cases¶
22.214.171.124. Unsynchronised LED flash (software strobe)¶
Unsynchronised LED flash is controlled directly by the host as the sensor. The flash must be enabled by the host before the exposure of the image starts and disabled once it ends. The host is fully responsible for the timing of the flash.
Example of such device: Nokia N900.
126.96.36.199. Synchronised LED flash (hardware strobe)¶
The synchronised LED flash is pre-programmed by the host (power and timeout) but controlled by the sensor through a strobe signal from the sensor to the flash.
The sensor controls the flash duration and timing. This information typically must be made available to the sensor.
188.8.131.52. LED flash as torch¶
LED flash may be used as torch in conjunction with another use case involving camera or individually.
184.108.40.206. Flash Control IDs¶
- The FLASH class descriptor.
- Defines the mode of the flash LED, the high-power white LED attached to the flash controller. Setting this control may not be possible in presence of some faults. See V4L2_CID_FLASH_FAULT.
||Torch mode. See V4L2_CID_FLASH_TORCH_INTENSITY.|
- Defines the source of the flash LED strobe.
||The flash strobe is triggered by using the V4L2_CID_FLASH_STROBE control.|
||The flash strobe is triggered by an external source. Typically this is a sensor, which makes it possible to synchronise the flash strobe start to exposure start.|
- Strobe flash. Valid when V4L2_CID_FLASH_LED_MODE is set to V4L2_FLASH_LED_MODE_FLASH and V4L2_CID_FLASH_STROBE_SOURCE is set to V4L2_FLASH_STROBE_SOURCE_SOFTWARE. Setting this control may not be possible in presence of some faults. See V4L2_CID_FLASH_FAULT.
- Stop flash strobe immediately.
- Strobe status: whether the flash is strobing at the moment or not. This is a read-only control.
- Hardware timeout for flash. The flash strobe is stopped after this period of time has passed from the start of the strobe.
- Intensity of the flash strobe when the flash LED is in flash mode (V4L2_FLASH_LED_MODE_FLASH). The unit should be milliamps (mA) if possible.
- Intensity of the flash LED in torch mode (V4L2_FLASH_LED_MODE_TORCH). The unit should be milliamps (mA) if possible. Setting this control may not be possible in presence of some faults. See V4L2_CID_FLASH_FAULT.
- Intensity of the indicator LED. The indicator LED may be fully independent of the flash LED. The unit should be microamps (uA) if possible.
- Faults related to the flash. The faults tell about specific problems in the flash chip itself or the LEDs attached to it. Faults may prevent further use of some of the flash controls. In particular, V4L2_CID_FLASH_LED_MODE is set to V4L2_FLASH_LED_MODE_NONE if the fault affects the flash LED. Exactly which faults have such an effect is chip dependent. Reading the faults resets the control and returns the chip to a usable state if possible.
||Flash controller voltage to the flash LED has exceeded the limit specific to the flash controller.|
||The flash strobe was still on when the timeout set by the user — V4L2_CID_FLASH_TIMEOUT control — has expired. Not all flash controllers may set this in all such conditions.|
||The flash controller has overheated.|
||The short circuit protection of the flash controller has been triggered.|
||Current in the LED power supply has exceeded the limit specific to the flash controller.|
||The flash controller has detected a short or open circuit condition on the indicator LED.|
||Flash controller voltage to the flash LED has been below the minimum limit specific to the flash controller.|
||The input voltage of the flash controller is below the limit under which strobing the flash at full current will not be possible.The condition persists until this flag is no longer set.|
||The temperature of the LED has exceeded its allowed upper limit.|
- Enable or disable charging of the xenon flash capacitor.
- Is the flash ready to strobe? Xenon flashes require their capacitors charged before strobing. LED flashes often require a cooldown period after strobe during which another strobe will not be possible. This is a read-only control.