Hi all
There is device list in my Linux system

and Im going to set exposure to my camera sensor. I work on C/C++ application.
I can make a picture and set exposure from command this way:
v4l2-ctl --device=/dev/v4l-subdev0 --get-ctrl=exposure
v4l2-ctl -d /dev/v4l-subdev0 --set-ctrl exposure=512
v4l2-ctl --device=/dev/v4l-subdev0 --get-ctrl=analogue_gain
it uses subdevice concept.
And there is my piece of code, here I work with video0.
open(...) works ok but I can not set any parameter like exposure.
The v4l2_ioctl(...) returns errno= ENOTTY (the same errno I get with ioct(...) )
ENOTTY - Not a typewriter
char *videodevice = (char*)"/dev/video0";
v4l2_control c;
int descriptor;
descriptor = open(videodevice, O_RDWR);
if(descriptor < 0){
printf("Error Opening VideoDevice, errno=%d\n",errno);
}
c.id = V4L2_CID_EXPOSURE_ABSOLUTE;
c.value = 300;
if(v4l2_ioctl(descriptor, VIDIOC_S_CTRL, &c) == 0)
printf("V4L2_CID_EXPOSURE_ABSOLUTE: Value : %d \n",c.value);
else
printf("V4L2_CID_EXPOSURE_ABSOLUTE fail, errno=%d\n",errno);
What is wrong ? What can I check/debug ?