My camera driver support 2 modes :1280x720 and 1920x1280,but it always work in mode0 (1280x720).
Run command : v4l2-ctl --list0formats-ext
ioctl:VIDIOC_ENUM_FMT
Index:0
…
…
Size :Discrete 1280x720
…
Size :Discrete 1920x1280
…
I tried to specify mode1,run command :v4l2-ctl --device=/dev/video0 --set-fmt-video=width=1920,height=1280,pixelformat=UYVY --set-ctrl=sensor_modes=1 --verbose
It reported to me:
VIDIOC_QUERYCAP:OK
VIDIOC_S_EXT_CTRLS:failed :Permission denied
Error setting controls :Permission denied
…:OK
…:OK
Format Video Capture :
Width/Hright :1280/720
…
…
…
How do I solve this problem?
hello JerryChang,
I tried to use --set-ctrl=sensor_modes only
It reported :
VIDIOC_QUERYCAP:OK
VIDIOC_S_EXT_CTRLS:failed :Permission denied
Error setting controls :Permission denied
if I use set-fmt-video only(…–set-fmt-video=width=1920,heught=1280…),It reported:
VIDIOC_QUERYCAP:OK
VIDIOC_G_FMT:OK
VIDIOC_S_FMT:OK
Format Video Capture:
Width/Height:1280/720 …not 1920/1280
FYI, there’s another CID control, sensor_mode “without” s to call TEGRA_CAMERA_CID_SENSOR_MODE_ID operation.
you may review your sensor driver to implement that CID controls.
could you please share the details of $ v4l2-ctl -d /dev/video0 --list-formats-ext for reference,
thanks