34 #include <linux/module.h>
35 #include <linux/init.h>
36 #include <linux/kernel.h>
37 #include <linux/version.h>
38 #include <linux/errno.h>
39 #include <linux/slab.h>
40 #include <linux/kref.h>
42 #include <linux/usb.h>
43 #include <media/v4l2-common.h>
44 #include <media/v4l2-ioctl.h>
101 case SYNTEK_STK_0500:
128 case SYNTEK_STK_0408:
131 case SYNTEK_STK_M811:
132 case SYNTEK_STK_A311:
136 case SYNTEK_STK_A821:
137 case SYNTEK_STK_AA11:
141 case SYNTEK_STK_6A31:
145 case SYNTEK_STK_6A33:
149 case SYNTEK_STK_6A51:
153 case SYNTEK_STK_6A54:
157 case SYNTEK_STK_6D51:
161 case SYNTEK_STK_0500:
191 for (i=0; i<nbr; i++) {
196 else if ((value == 0x11) || (value == 0x14)) {
198 else if ((value == 0x30) || (value == 0x31)) {
200 else if ((value == 0x51)) {
202 else if ((value == 0x70) || (value == 0x71)) {
204 else if ((value == 0x91)) {
206 else if (value == 0x01) {
209 else if ((value == 0x04) || (value == 0x05))
211 else if (value == 0x15)
214 STK_ERROR(
"Check device return error (0x0201 = %02X) !\n", value);
241 STK_DEBUG(
"Error : Register 0x0001 = %02X\n", value);
260 struct usb_device *udev = dev->
udev;
262 ret = usb_set_interface(udev, 0, 5);
265 STK_ERROR(
"usb_set_interface failed !\n");
283 struct usb_device *udev = dev->
udev;
285 ret = usb_set_interface(udev, 0, 0);
288 STK_ERROR(
"usb_set_interface failed !\n");
308 case SYNTEK_STK_0408:
311 case SYNTEK_STK_M811:
312 case SYNTEK_STK_A311:
316 case SYNTEK_STK_A821:
317 case SYNTEK_STK_AA11:
321 case SYNTEK_STK_6A31:
325 case SYNTEK_STK_6A33:
329 case SYNTEK_STK_6A51:
333 case SYNTEK_STK_6A54:
337 case SYNTEK_STK_6D51:
341 case SYNTEK_STK_0500:
371 case SYNTEK_STK_0408:
374 case SYNTEK_STK_M811:
375 case SYNTEK_STK_A311:
379 case SYNTEK_STK_A821:
380 case SYNTEK_STK_AA11:
384 case SYNTEK_STK_6A31:
388 case SYNTEK_STK_6A33:
392 case SYNTEK_STK_6A51:
396 case SYNTEK_STK_6A54:
400 case SYNTEK_STK_6D51:
404 case SYNTEK_STK_0500:
434 case SYNTEK_STK_0408:
437 case SYNTEK_STK_M811:
438 case SYNTEK_STK_A311:
442 case SYNTEK_STK_A821:
443 case SYNTEK_STK_AA11:
447 case SYNTEK_STK_6A31:
451 case SYNTEK_STK_6A33:
455 case SYNTEK_STK_6A51:
459 case SYNTEK_STK_6A54:
463 case SYNTEK_STK_6D51:
467 case SYNTEK_STK_0500:
494 case SYNTEK_STK_0408:
497 case SYNTEK_STK_M811:
498 case SYNTEK_STK_A311:
502 case SYNTEK_STK_A821:
503 case SYNTEK_STK_AA11:
507 case SYNTEK_STK_6A31:
511 case SYNTEK_STK_6A33:
515 case SYNTEK_STK_6A51:
519 case SYNTEK_STK_6A54:
523 case SYNTEK_STK_6D51:
527 case SYNTEK_STK_0500:
554 case SYNTEK_STK_0408:
557 case SYNTEK_STK_M811:
558 case SYNTEK_STK_A311:
562 case SYNTEK_STK_A821:
563 case SYNTEK_STK_AA11:
567 case SYNTEK_STK_6A31:
571 case SYNTEK_STK_6A33:
575 case SYNTEK_STK_6A51:
579 case SYNTEK_STK_6A54:
583 case SYNTEK_STK_6D51:
587 case SYNTEK_STK_0500:
613 case SYNTEK_STK_0408:
616 case SYNTEK_STK_M811:
617 case SYNTEK_STK_A311:
621 case SYNTEK_STK_A821:
622 case SYNTEK_STK_AA11:
626 case SYNTEK_STK_6A31:
630 case SYNTEK_STK_6A33:
634 case SYNTEK_STK_6A51:
638 case SYNTEK_STK_6A54:
642 case SYNTEK_STK_6D51:
646 case SYNTEK_STK_0500:
673 case SYNTEK_STK_0408:
676 case SYNTEK_STK_M811:
677 case SYNTEK_STK_A311:
681 case SYNTEK_STK_A821:
682 case SYNTEK_STK_AA11:
686 case SYNTEK_STK_6A31:
690 case SYNTEK_STK_6A33:
694 case SYNTEK_STK_6A51:
698 case SYNTEK_STK_6A54:
702 case SYNTEK_STK_6D51:
706 case SYNTEK_STK_0500:
732 case SYNTEK_STK_0408:
734 ret = dev_stk0408_decode(dev);
737 case SYNTEK_STK_M811:
738 case SYNTEK_STK_A311:
739 case SYNTEK_STK_A821:
740 case SYNTEK_STK_AA11:
741 case SYNTEK_STK_6A31:
742 case SYNTEK_STK_6A33:
743 case SYNTEK_STK_6A51:
744 case SYNTEK_STK_6A54:
745 case SYNTEK_STK_6D51:
int dev_stk11xx_decompress(struct usb_stk11xx *dev)
Decompress/convert a frame from the video stream.
int dev_stk0408_initialize_device(struct usb_stk11xx *dev)
This function initializes the device.
int dev_stk11xx_camera_asleep(struct usb_stk11xx *dev)
Wake-up the camera.
int dev_stk0408_camera_asleep(struct usb_stk11xx *dev)
Wake-up the camera.
int dev_stk11xx_camera_off(struct usb_stk11xx *dev)
This function switchs off the camera.
int dev_stk0500_camera_settings(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk11xx_camera_on(struct usb_stk11xx *dev)
This function switchs on the camera.
int dev_stk6a51_stop_stream(struct usb_stk11xx *dev)
This function sets the device to stop the stream.
int dev_stk0500_start_stream(struct usb_stk11xx *dev)
This function sets the device to start the stream.
int dev_stk0500_initialize_device(struct usb_stk11xx *dev)
This function permits to initialize the device.
int dev_stk11xx_camera_settings(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk11xx_start_stream(struct usb_stk11xx *dev)
This function sets the device to start the stream.
int dev_stk6d51_init_camera(struct usb_stk11xx *dev)
This function initializes the device for the stream.
int dev_stk6d51_stop_stream(struct usb_stk11xx *dev)
This function sets the device to stop the stream.
int dev_stk0408_camera_settings(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk6a31_initialize_device(struct usb_stk11xx *dev)
This function permits to initialize the device.
int dev_stk6a33_camera_asleep(struct usb_stk11xx *dev)
Wake-up the camera.
int dev_stk11xx_watchdog_camera(struct usb_stk11xx *dev)
A espece of software watchdog.
int dev_stk6a54_initialize_device(struct usb_stk11xx *dev)
This function permits to initialize the device.
int dev_stk11xx_init_camera(struct usb_stk11xx *dev)
This function initializes the device for the stream.
int dev_stka821_set_camera_quality(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stka311_camera_asleep(struct usb_stk11xx *dev)
Wake-up the camera.
int dev_stk6a33_stop_stream(struct usb_stk11xx *dev)
This function sets the device to stop the stream.
int dev_stk6a54_init_camera(struct usb_stk11xx *dev)
This function initializes the device for the stream.
#define STK_DEBUG(str, args...)
int dev_stk6a33_camera_settings(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk6a33_reconf_camera(struct usb_stk11xx *dev)
Reconfigure the camera before the stream.
#define STK_ERROR(str, args...)
int dev_stk6a31_camera_settings(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stka311_stop_stream(struct usb_stk11xx *dev)
This function sets the device to stop the stream.
int dev_stka821_camera_asleep(struct usb_stk11xx *dev)
Wake-up the camera.
int dev_stk6a54_start_stream(struct usb_stk11xx *dev)
This function sets the device to start the stream.
int dev_stk11xx_stop_stream(struct usb_stk11xx *dev)
This function sets the device to stop the stream.
int dev_stk0500_set_camera_quality(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk6a31_set_camera_quality(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stka821_init_camera(struct usb_stk11xx *dev)
This function initializes the device for the stream.
int dev_stk0408_init_camera(struct usb_stk11xx *dev)
This function initializes the device for the stream.
int dev_stk6d51_set_camera_fps(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk6a31_set_camera_fps(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stka311_camera_settings(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk6a31_stop_stream(struct usb_stk11xx *dev)
This function sets the device to stop the stream.
int dev_stk6a51_initialize_device(struct usb_stk11xx *dev)
This function permits to initialize the device.
int dev_stk6d51_camera_settings(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk11xx_check_device(struct usb_stk11xx *dev, int nbr)
This function permits to check the device in reading the register 0x0201.
int dev_stk6a33_set_camera_fps(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk6a51_reconf_camera(struct usb_stk11xx *dev)
Reconfigure the camera before the stream.
int dev_stk6a31_init_camera(struct usb_stk11xx *dev)
This function initializes the device for the stream.
int dev_stk6a51_camera_settings(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stka821_stop_stream(struct usb_stk11xx *dev)
This function sets the device to stop the stream.
int dev_stk0500_camera_asleep(struct usb_stk11xx *dev)
Wake-up the camera.
int dev_stk0500_init_camera(struct usb_stk11xx *dev)
This function initializes the device for the stream.
int dev_stk6a51_camera_asleep(struct usb_stk11xx *dev)
Wake-up the camera.
int dev_stka821_initialize_device(struct usb_stk11xx *dev)
This function permits to initialize the device.
int dev_stk6a54_set_camera_fps(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk11xx_reconf_camera(struct usb_stk11xx *dev)
Reconfigure the camera before the stream.
int dev_stk6a33_init_camera(struct usb_stk11xx *dev)
This function initializes the device for the stream.
int dev_stka821_reconf_camera(struct usb_stk11xx *dev)
Reconfigure the camera before the stream.
int dev_stk6a33_start_stream(struct usb_stk11xx *dev)
This function sets the device to start the stream.
int dev_stk6a31_camera_asleep(struct usb_stk11xx *dev)
Wake-up the camera.
int dev_stka311_reconf_camera(struct usb_stk11xx *dev)
Reconfigure the camera before the stream.
int dev_stk6a54_camera_settings(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk6a31_start_stream(struct usb_stk11xx *dev)
This function sets the device to start the stream.
int dev_stk0408_reconf_camera(struct usb_stk11xx *dev)
Reconfigure the camera before the stream.
int dev_stk6a54_reconf_camera(struct usb_stk11xx *dev)
Reconfigure the camera before the stream.
int dev_stk11xx_set_camera_fps(struct usb_stk11xx *dev)
This function permits to modify the fps of the camera.
int dev_stk6d51_camera_asleep(struct usb_stk11xx *dev)
Wake-up the camera.
int dev_stk6a51_set_camera_quality(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk6d51_set_camera_quality(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk0408_stop_stream(struct usb_stk11xx *dev)
This function sets the device to stop the stream.
int dev_stk6a31_reconf_camera(struct usb_stk11xx *dev)
Reconfigure the camera before the stream.
int dev_stk6a51_start_stream(struct usb_stk11xx *dev)
This function sets the device to start the stream.
int dev_stk6d51_start_stream(struct usb_stk11xx *dev)
This function sets the device to start the stream.
int stk11xx_decompress(struct usb_stk11xx *dev)
Decompress a frame.
int dev_stka821_set_camera_fps(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stka311_start_stream(struct usb_stk11xx *dev)
This function sets the device to start the stream.
int dev_stk6a51_init_camera(struct usb_stk11xx *dev)
This function initializes the device for the stream.
int dev_stk0408_start_stream(struct usb_stk11xx *dev)
This function sets the device to start the stream.
int dev_stk0500_stop_stream(struct usb_stk11xx *dev)
This function sets the device to stop the stream.
int dev_stka311_set_camera_quality(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk6a54_stop_stream(struct usb_stk11xx *dev)
This function sets the device to stop the stream.
int dev_stk6a33_initialize_device(struct usb_stk11xx *dev)
This function permits to initialize the device.
int dev_stka311_set_camera_fps(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stka821_start_stream(struct usb_stk11xx *dev)
This function sets the device to start the stream.
int dev_stk6d51_initialize_device(struct usb_stk11xx *dev)
This function permits to initialize the device.
int dev_stka311_init_camera(struct usb_stk11xx *dev)
This function initializes the device for the stream.
int dev_stk6a54_set_camera_quality(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk0500_reconf_camera(struct usb_stk11xx *dev)
Reconfigure the camera before the stream.
int dev_stka821_camera_settings(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk6a54_camera_asleep(struct usb_stk11xx *dev)
Wake-up the camera.
int usb_stk11xx_read_registry(struct usb_stk11xx *dev, __u16 index, int *value)
Read a 16-bits value from a 16-bits register.
Driver for Syntek USB video camera.
int dev_stk6d51_reconf_camera(struct usb_stk11xx *dev)
Reconfigure the camera before the stream.
int dev_stka311_initialize_device(struct usb_stk11xx *dev)
This function permits to initialize the device.
int dev_stk11xx_initialize_device(struct usb_stk11xx *dev)
This function permits to initialize the device.
Driver for Syntek USB video camera.
int dev_stk11xx_set_camera_quality(struct usb_stk11xx *dev)
This function permits to modify the quality video of the camera.
int dev_stk6a33_set_camera_quality(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk0408_set_camera_quality(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk0500_set_camera_fps(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk6a51_set_camera_fps(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
int dev_stk0408_set_camera_fps(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.