Hi Gilles, On Thursday 19 February 2009 23:38:32 Gilles GIGAN wrote: > Laurent, > > > > Is there a way to make these changes when mapping the controls, or do > > > they have to be coded in the driver itself ? > > > > Switching the Pan Reset and Tilt Reset from integers to button should > > require a modification of the logitech.xml file only (although it might > > also trigger bugs in yet unused code paths of libwebcam/uvcdynctrl). > > I gave that a go: > I changed the v4l2_type element from V4L2_CTRL_TYPE_INTEGER to > V4L2_CTRL_TYPE_BUTTON for both the Pan Reset and Tilt Reset mappings. > Not sure how to get uvcvideo to unmap existing controls, so I > rmmod/modprobe (trace=1023) it,
Unmapping controls isn't supported at the moment, rmmod/modprobe is the only option. > and confirmed it lacks these mappings. Then > I had to modify libwebcam to support the V4L2_CTRL_TYPE_BUTTON. To be > precise, libwebcam already had the code for that but it was commented out > (lines 446 to 456 in dynctrl.c). I then imported the dynamic controls with > uvcdynctrl -i, and it went fine. Pan & Tilt Reset are reported as buttons, Could you please report that to Martin Rubli on www.quickcamteam.net ? > but setting a value on them does nothing and these lines are added to > syslog: > > kernel: [57399.195259] v4l2 ioctl VIDIOC_S_CTRL, dir=rw (0xc008561c) > kernel: [57399.202594] uvcvideo: Control 9/2 failure change len 6. This means the webcam sent an unsolicited message to report a control change failure. You can check the failure reason by printing data[5] in uvc_event_control. Possible values are 0x00: No error 0x01: Not ready 0x02: Wrong state 0x03: Power 0x04: Out of range 0x05: Invalid unit 0x06: Invalid control 0x07: Invalid Request 0x08-0xFE: Reserved for future use 0xFF: Unknown > I m not sure what the implications of the change to V4L2_CTRL_TYPE_BUTTON > are (besides modifying the reported v4l2_queryctrl struct) within the > driver and the way it send control values to the device. Is it anything > that can be fixed ? If so how can I help ? Best regards, Laurent Pinchart _______________________________________________ Linux-uvc-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
