Go to the documentation of this file.
38 #define DRIVER_NAME "stk11xx"
39 #define DRIVER_VERSION "v2.0.0"
40 #define DRIVER_VERSION_NUM 0x020000
41 #define DRIVER_DESC "Syntek USB Video Camera"
42 #define DRIVER_AUTHOR "Nicolas VIVIEN"
43 #define PREFIX DRIVER_NAME ": "
45 #define USB_SYNTEK1_VENDOR_ID 0x174f
46 #define USB_SYNTEK2_VENDOR_ID 0x05e1
48 #define USB_STK_A311_PRODUCT_ID 0xa311
49 #define USB_STK_A821_PRODUCT_ID 0xa821
50 #define USB_STK_6A31_PRODUCT_ID 0x6a31
51 #define USB_STK_6A33_PRODUCT_ID 0x6a33
52 #define USB_STK_6A51_PRODUCT_ID 0x6a51
53 #define USB_STK_6A54_PRODUCT_ID 0x6a54
54 #define USB_STK_6D51_PRODUCT_ID 0x6d51
56 #define USB_STK_0501_PRODUCT_ID 0x0501
65 #define VID_HARDWARE_STK11XX 88
83 #define MAX_ISO_BUFS 16
84 #define ISO_FRAMES_PER_DESC 10
85 #define ISO_MAX_FRAME_SIZE 3 * 1024
86 #define ISO_BUFFER_SIZE (ISO_FRAMES_PER_DESC * ISO_MAX_FRAME_SIZE)
96 #define STK11XX_MAX_IMAGES 10
97 #define STK11XX_FRAME_SIZE (1280 * 1024 * 4)
111 #define DRIVER_SUPPORT "Syntek USB Camera : STK-1135"
133 #ifndef CONFIG_STK11XX_DEBUG
134 #define CONFIG_STK11XX_DEBUG 0
137 #if CONFIG_STK11XX_DEBUG
139 #define STK_INFO(str, args...) printk(KERN_INFO PREFIX str, ##args)
140 #define STK_ERROR(str, args...) printk(KERN_ERR PREFIX str, ##args)
141 #define STK_WARNING(str, args...) printk(KERN_WARNING PREFIX str, ##args)
142 #define STK_DEBUG(str, args...) printk(KERN_DEBUG PREFIX str, ##args)
146 #define STK_INFO(str, args...) printk(KERN_INFO PREFIX str, ##args)
147 #define STK_ERROR(str, args...) printk(KERN_ERR PREFIX str, ##args)
148 #define STK_WARNING(str, args...) printk(KERN_WARNING PREFIX str, ##args)
149 #define STK_DEBUG(str, args...) do { } while(0)
162 #ifndef CONFIG_STK11XX_DEBUG_STREAM
163 #define CONFIG_STK11XX_DEBUG_STREAM 0
166 #if CONFIG_STK11XX_DEBUG_STREAM
168 #define STK_STREAM(str, args...) printk(KERN_DEBUG PREFIX str, ##args)
172 #define STK_STREAM(str, args...) do { } while(0)
224 STK11XX_PALETTE_RGB24,
225 STK11XX_PALETTE_RGB32,
226 STK11XX_PALETTE_BGR24,
227 STK11XX_PALETTE_BGR32,
228 STK11XX_PALETTE_UYVY,
289 int default_brightness;
290 int default_contrast;
292 int default_whiteness;
330 struct semaphore
mutex;
353 unsigned int nbuffers;
354 unsigned int len_per_image;
367 #define STK11XX_PERCENT(x,y) ( ((int)x * (int)y) / 100)
374 #define to_stk11xx_dev(d) container_of(d, struct usb_stk11xx, kref)
int stk11xx_reset_buffers(struct usb_stk11xx *)
Reset all ISOC buffers.
unsigned char * int_in_buffer
int v4l_stk11xx_unregister_video_device(struct usb_stk11xx *)
Unregister the video device.
int dev_stk11xx_camera_settings(struct usb_stk11xx *)
This function permits to modify the settings of the camera.
int v4l_stk11xx_select_video_mode(struct usb_stk11xx *, int, int)
Select a video mode.
int usb_stk11xx_read_registry(struct usb_stk11xx *, __u16, int *)
Read a 16-bits value from a 16-bits register.
int dev_stk11xx_watchdog_camera(struct usb_stk11xx *)
A espece of software watchdog.
void stk11xx_next_image(struct usb_stk11xx *)
Prepare the next image.
int dev_stk11xx_set_camera_fps(struct usb_stk11xx *)
This function permits to modify the fps of the camera.
int stk11xx_free_buffers(struct usb_stk11xx *)
Release all buffers.
int usb_stk11xx_set_configuration(struct usb_stk11xx *)
Send the message SET_CONFIGURATION.
#define STK11XX_MAX_IMAGES
int dev_stk11xx_camera_on(struct usb_stk11xx *)
This function switchs on the camera.
int stk11xx_next_frame(struct usb_stk11xx *)
Prepare the next frame.
struct usb_interface * interface
void usb_stk11xx_isoc_handler(struct urb *)
ISOC handler.
int stk11xx_create_sysfs_files(struct video_device *)
Create the 'sys' entries.
int stk11xx_clear_buffers(struct usb_stk11xx *)
Clear current buffers.
void usb_stk11xx_isoc_cleanup(struct usb_stk11xx *)
Clean-up all the ISOC buffers.
__u8 isoc_in_endpointAddr
void stk11xx_remove_sysfs_files(struct video_device *)
Remove the 'sys' entries.
struct video_device * vdev
int dev_stk11xx_reconf_camera(struct usb_stk11xx *)
Reconfigure the camera before the stream.
int usb_stk11xx_write_registry(struct usb_stk11xx *, __u16, __u16)
Write a 16-bits value to a 16-bits register.
int dev_stk11xx_set_camera_quality(struct usb_stk11xx *)
This function permits to modify the quality video of the camera.
int dev_stk11xx_camera_off(struct usb_stk11xx *)
This function switchs off the camera.
int dev_stk11xx_camera_asleep(struct usb_stk11xx *)
Wake-up the camera.
int dev_stk11xx_stop_stream(struct usb_stk11xx *)
This function sets the device to stop the stream.
int stk11xx_decompress(struct usb_stk11xx *)
Decompress a frame.
wait_queue_head_t wait_frame
int dev_stk11xx_check_device(struct usb_stk11xx *, int)
This function permits to check the device in reading the register 0x0201.
int usb_stk11xx_isoc_init(struct usb_stk11xx *)
Initilize an isochronous pipe.
const struct stk11xx_coord stk11xx_image_sizes[STK11XX_NBR_SIZES]
int stk11xx_handle_frame(struct usb_stk11xx *)
Handler frame.
int stk11xx_allocate_buffers(struct usb_stk11xx *)
Allocate all ISOC buffers.
int v4l_stk11xx_register_video_device(struct usb_stk11xx *)
Register the video device.
struct stk11xx_video vsettings
int usb_stk11xx_set_feature(struct usb_stk11xx *, int)
Send the message SET_FEATURE and choose the interface.
int dev_stk11xx_start_stream(struct usb_stk11xx *)
This function sets the device to start the stream.
int dev_stk11xx_initialize_device(struct usb_stk11xx *)
This function permits to initialize the device.
int dev_stk11xx_init_camera(struct usb_stk11xx *)
This function initializes the device for the stream.