Hi Guys,
I have necessary document to set brightness value for different level. now i want to read brightness level using ioctl_g_ctrl in application. can anybody share idea on this one.
regards,
Ganesh Biradar
Set brightness:
v4l2_control control;
control.id = V4L2_CID_BRIGHTNESS;
control.value = value;
if (ioctl(fd, VIDIOC_S_CTRL, &control))
log_error("Failed configure image brightness, errno %d (%s)", errno, strerror(errno));
And please read documentation ioctl VIDIOC_G_CTRL, VIDIOC_S_CTRL
Hi BrilliantovKirillVladimirovich i did that but now i have to read back the value their i'm getting error. in ov5640_mipi.c i have set the vc->value but when i'm trying to read i'm getting zero.
Hi Ganesh
ioctl_g_ctrl (V4L2_CID_BRIGHTNESS) reads current values from the
video_control[] array, check ov5640.c :
to read from sensor one will have to add function using ov5640_read_reg()
from SDE CTRL7,8
Best regards
igor
Hi igorpadykov
igorpadykov wrote:
Hi Ganesh
ioctl_g_ctrl (V4L2_CID_BRIGHTNESS) reads current values from the
video_control[] array, check ov5640.c :
to read from sensor one will have to add function using ov5640_read_reg()
from SDE CTRL7,8
Best regards
igor
what you said is correct i did that earlier only but ov5640_read_reg() is returning zero and the variable which i'm passing as argument beside register tor ead is also returning zero. that's why i ask how to read brightness value. from ov5640 datasheet i'm reading 0x5587 register for brightness. correct me if i'm wrong.