Skip to content

indi-libcamera: Add Gain Conversion control for IMX290-family sensors#1345

Open
OLEGsandrMB wants to merge 1 commit into
indilib:masterfrom
OLEGsandrMB:feature/gain-conversion
Open

indi-libcamera: Add Gain Conversion control for IMX290-family sensors#1345
OLEGsandrMB wants to merge 1 commit into
indilib:masterfrom
OLEGsandrMB:feature/gain-conversion

Conversation

@OLEGsandrMB

Copy link
Copy Markdown

Summary

This PR adds a Gain Conversion property to the indi-libcamera driver for Sony IMX290-family image sensors.

The property allows switching between:

  • Dynamic Range (LCG)
  • Low Noise (HCG)

The driver reads the current gain conversion mode when the camera connects, updates the INDI property accordingly, and writes the selected mode through the existing kernel interface.

Supported sensors

This feature is intended for Sony IMX290-family sensors, such as:

  • IMX290
  • IMX327
  • IMX462

Motivation

These sensors support two analog gain conversion modes.

  • LCG (Low Conversion Gain) provides higher dynamic range.
  • HCG (High Conversion Gain) provides lower read noise, which is especially useful for astrophotography.

Until now this functionality was not available through the INDI LibCamera driver.

Notes

The current implementation uses the existing kernel parameter:

/sys/module/imx290/parameters/hcg_mode

Writing this parameter requires appropriate system permissions. If writing fails, the driver reports an informative error message.

A future improvement would be exposing Gain Conversion as a standard V4L2/libcamera control, removing the need for direct sysfs access.

Tested

Tested successfully on:

  • Raspberry Pi
  • Sony IMX462
  • Raspberry Pi imx290 kernel driver
  • INDI Control Panel

Verified:

  • Current mode is read correctly on connection.
  • Switching between Dynamic Range (LCG) and Low Noise (HCG) updates the kernel parameter.
  • The INDI property stays synchronized with the actual hardware state.

Add a Gain Conversion property for IMX290-family sensors to allow
switching between Dynamic Range (LCG) and Low Noise (HCG).

The driver reads the current gain conversion mode on connect,
updates the UI accordingly, and writes the selected mode through
the existing kernel interface.

The implementation includes proper error reporting when the gain
conversion mode cannot be changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant