Some V4L2 settings are missing/broken compared to the available MMAL settings

Open
#3,988 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, linux

Research direction

Start by comparing the documented raspistill controls with v4l2-ctl -L, then inspect the affected bcm2835_v4l2 and bcm2835_mmal_vchiq kernel modules. Track each listed setting across both interfaces; done means the missing controls are exposed through V4L2 and the reported controls behave correctly, including MJPEG quality and shutter speeds.

Written by the indexing model from the issue text.

Description

Describe the bug

I would expect that all raspistill (which uses MMAL directly) would work for the V4L2 interface as well: https://www.raspberrypi.org/documentation/raspbian/applications/camera.md

To reproduce
Compare https://www.raspberrypi.org/documentation/raspbian/applications/camera.md with v4l2-ctl -L

Expected behaviour
Ideally all MMAL settings would be exposed to V4L2 as well

Actual behaviour

Compared to MMAL/raspistill/raspivid, v4l2-ctl is missing the following settings:

Exposure mode (scene_mode)

Only 3 values available:

  • 0: None
  • 8: Night
  • 11: Sports

Whereas raspistill offers:

  • auto: use automatic exposure mode
  • night: select setting for night shooting
  • nightpreview:
  • backlight: select setting for backlit subject
  • spotlight:
  • sports: select setting for sports (fast shutter etc.)
  • snow: select setting optimised for snowy scenery
  • beach: select setting optimised for beach
  • verylong: select setting for long exposures
  • fixedfps: constrain fps to a fixed value
  • antishake: antishake mode
  • fireworks: select setting optimised for fireworks

Color effects (color_effects)

The following effects don't work:

  • 4: Emboss
  • 5: Sketch
  • 6: Sky Blue (pastel)
  • 7: Grass Green (watercolour)
  • 9: Vivid (saturation)
  • 11: Art Freeze (hatch)
  • 12: Silhouette

The following effects are missing:

  • posterise: posterise the image
  • whiteboard: whiteboard effect
  • blackboard: blackboard effect
  • denoise: denoise the image
  • hatch: hatch sketch effect
  • gpen: graphite sketch effect
  • watercolour: watercolour effect
  • blur: blur the image

Colour effect (color_effects_cbcr)

Does not seem to have any effect

JPEG Quality (compression_quality)

Does not have any effect on MJPEG stream

Video stabilisation (image_stabilization)

Does not seem to have any effect

Metering (exposure_metering_mode)

Matrix metering is missing

Exposure mode (auto_exposure)

The following setting are missing:

  • night: select setting for night shooting
  • nightpreview:
  • backlight: select setting for backlit subject
  • spotlight:
  • sports: select setting for sports (fast shutter etc.)
  • snow: select setting optimised for snowy scenery
  • beach: select setting optimised for beach
  • verylong: select setting for long exposures
  • fixedfps: constrain fps to a fixed value
  • antishake: antishake mode
  • fireworks: select setting optimised for fireworks

Shutter speed (exposure_time_absolute)

Doesn't seem to have any effect above 800

Dynamic range compression

Does not exist in V4L2

Analog gain

Does not exist in V4L2

Digital gain

Does not exist in V4L2

Sensor mode

Does not exist in V4L2. Could be interesting for higher resolutions than 1080p with 2x2 binning

System

Affects all systems with 5.4.73 or later and the Raspberry HQ Camera.

The following kernel modules are affected:

  • bcm2835_v4l2
  • bcm2835_mmal_vchiq
Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.