SyntekUSBVideoCamera
|
Driver for Syntek USB video camera. More...
Go to the source code of this file.
Data Structures | |
struct | stk11xx_iso_buf |
struct | stk11xx_frame_buf |
struct | stk11xx_image_buf |
struct | stk11xx_coord |
struct | stk11xx_video |
struct | usb_stk11xx |
Defines | |
#define | DRIVER_NAME "stk11xx" |
#define | DRIVER_VERSION "v3.0.0" |
#define | DRIVER_VERSION_NUM 0x030000 |
#define | DRIVER_YEAR 2012 |
#define | DRIVER_DESC "Syntek USB Video Camera" |
#define | DRIVER_AUTHOR "Nicolas VIVIEN" |
#define | PREFIX DRIVER_NAME ": " |
#define | DRIVER_URL "http://sourceforge.net/projects/syntekdriver/" |
#define | USB_SYNTEK1_VENDOR_ID 0x174f |
#define | USB_SYNTEK2_VENDOR_ID 0x05e1 |
#define | USB_STK_A311_PRODUCT_ID 0xa311 |
#define | USB_STK_A821_PRODUCT_ID 0xa821 |
#define | USB_STK_AA11_PRODUCT_ID 0xaa11 |
#define | USB_STK_6A31_PRODUCT_ID 0x6a31 |
#define | USB_STK_6A33_PRODUCT_ID 0x6a33 |
#define | USB_STK_6A51_PRODUCT_ID 0x6a51 |
#define | USB_STK_6A54_PRODUCT_ID 0x6a54 |
#define | USB_STK_6D51_PRODUCT_ID 0x6d51 |
#define | USB_STK_0408_PRODUCT_ID 0x0408 |
#define | USB_STK_0500_PRODUCT_ID 0x0500 |
#define | USB_STK_0501_PRODUCT_ID 0x0501 |
#define | VID_HARDWARE_STK11XX 88 |
#define | MAX_ISO_BUFS 16 |
#define | ISO_FRAMES_PER_DESC 10 |
#define | ISO_MAX_FRAME_SIZE 3 * 1024 |
#define | ISO_BUFFER_SIZE (ISO_FRAMES_PER_DESC * ISO_MAX_FRAME_SIZE) |
#define | STK11XX_MAX_IMAGES 10 |
#define | STK11XX_FRAME_SIZE (1280 * 1024 * 4) |
#define | DRIVER_SUPPORT "Syntek USB Camera : STK-1135" |
#define | CONFIG_STK11XX_DEBUG 0 |
#define | STK_INFO(str, args...) printk(KERN_INFO PREFIX str, ##args) |
#define | STK_ERROR(str, args...) printk(KERN_ERR PREFIX str, ##args) |
#define | STK_WARNING(str, args...) printk(KERN_WARNING PREFIX str, ##args) |
#define | STK_DEBUG(str, args...) do { } while(0) |
#define | CONFIG_STK11XX_DEBUG_STREAM 0 |
#define | STK_STREAM(str, args...) do { } while(0) |
#define | STK11XX_PERCENT(x, y) ( ((int)x * (int)y) / 100) |
#define | to_stk11xx_dev(d) container_of(d, struct usb_stk11xx, kref) |
Enumerations | |
enum | T_SYNTEK_DEVICE { SYNTEK_STK_M811 = 1, SYNTEK_STK_A311 = 2, SYNTEK_STK_A821 = 3, SYNTEK_STK_6A31 = 4, SYNTEK_STK_6A33 = 5, SYNTEK_STK_6A51 = 6, SYNTEK_STK_6A54 = 7, SYNTEK_STK_6D51 = 8, SYNTEK_STK_0500 = 9, SYNTEK_STK_0408 = 10, SYNTEK_STK_AA11 = 11 } |
enum | T_STK11XX_VIDEOMODE { STK11XX_VGA, STK11XX_SXGA, STK11XX_PAL, STK11XX_UXGA } |
enum | T_STK11XX_RESOLUTION { STK11XX_80x60, STK11XX_128x96, STK11XX_160x120, STK11XX_213x160, STK11XX_320x240, STK11XX_640x480, STK11XX_720x576, STK11XX_800x600, STK11XX_1024x768, STK11XX_1280x1024, STK11XX_NBR_SIZES } |
enum | T_STK11XX_PALETTE { STK11XX_PALETTE_RGB24, STK11XX_PALETTE_RGB32, STK11XX_PALETTE_BGR24, STK11XX_PALETTE_BGR32, STK11XX_PALETTE_UYVY, STK11XX_PALETTE_YUYV } |
Functions | |
int | usb_stk11xx_write_registry (struct usb_stk11xx *, __u16, __u16) |
Write a 16-bits value to a 16-bits register. | |
int | usb_stk11xx_read_registry (struct usb_stk11xx *, __u16, int *) |
Read a 16-bits value from a 16-bits register. | |
int | usb_stk11xx_set_feature (struct usb_stk11xx *, int) |
Send the message SET_FEATURE and choose the interface. | |
int | usb_stk11xx_set_configuration (struct usb_stk11xx *) |
Send the message SET_CONFIGURATION. | |
int | usb_stk11xx_isoc_init (struct usb_stk11xx *) |
Initilize an isochronous pipe. | |
void | usb_stk11xx_isoc_handler (struct urb *) |
ISOC handler. | |
void | usb_stk11xx_isoc_cleanup (struct usb_stk11xx *) |
Clean-up all the ISOC buffers. | |
int | dev_stk11xx_decompress (struct usb_stk11xx *) |
Decompress/convert a frame from the video stream. | |
int | dev_stk11xx_initialize_device (struct usb_stk11xx *) |
This function permits to initialize the device. | |
int | dev_stk11xx_start_stream (struct usb_stk11xx *) |
This function sets the device to start the stream. | |
int | dev_stk11xx_stop_stream (struct usb_stk11xx *) |
This function sets the device to stop the stream. | |
int | dev_stk11xx_check_device (struct usb_stk11xx *, int) |
This function permits to check the device in reading the register 0x0201. | |
int | dev_stk11xx_camera_on (struct usb_stk11xx *) |
This function switchs on 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_init_camera (struct usb_stk11xx *) |
This function initializes the device for the stream. | |
int | dev_stk11xx_reconf_camera (struct usb_stk11xx *) |
Reconfigure the camera before the stream. | |
int | dev_stk11xx_camera_settings (struct usb_stk11xx *) |
This function permits to modify the settings of the camera. | |
int | dev_stk11xx_set_camera_quality (struct usb_stk11xx *) |
This function permits to modify the quality video of the camera. | |
int | dev_stk11xx_set_camera_fps (struct usb_stk11xx *) |
This function permits to modify the fps of the camera. | |
int | dev_stk11xx_watchdog_camera (struct usb_stk11xx *) |
A espece of software watchdog. | |
int | v4l_stk11xx_select_video_mode (struct usb_stk11xx *, int, int) |
Select a video mode. | |
int | v4l_stk11xx_register_video_device (struct usb_stk11xx *) |
Register the video device. | |
int | v4l_stk11xx_unregister_video_device (struct usb_stk11xx *) |
Unregister the video device. | |
int | stk11xx_create_sysfs_files (struct video_device *) |
Create the 'sys' entries. | |
void | stk11xx_remove_sysfs_files (struct video_device *) |
Remove the 'sys' entries. | |
int | stk11xx_allocate_buffers (struct usb_stk11xx *) |
Allocate all ISOC buffers. | |
int | stk11xx_reset_buffers (struct usb_stk11xx *) |
Reset all ISOC buffers. | |
int | stk11xx_clear_buffers (struct usb_stk11xx *) |
Clear current buffers. | |
int | stk11xx_free_buffers (struct usb_stk11xx *) |
Release all buffers. | |
void | stk11xx_next_image (struct usb_stk11xx *) |
Prepare the next image. | |
int | stk11xx_next_frame (struct usb_stk11xx *) |
Prepare the next frame. | |
int | stk11xx_handle_frame (struct usb_stk11xx *) |
Handler frame. | |
int | stk11xx_decompress (struct usb_stk11xx *) |
Decompress a frame. | |
Variables | |
struct stk11xx_coord | stk11xx_image_sizes [STK11XX_NBR_SIZES] |
Driver for Syntek USB video camera.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Definition in file stk11xx.h.
#define CONFIG_STK11XX_DEBUG 0 |
#define CONFIG_STK11XX_DEBUG_STREAM 0 |
#define DRIVER_AUTHOR "Nicolas VIVIEN" |
#define DRIVER_DESC "Syntek USB Video Camera" |
Short description of this driver
Definition at line 41 of file stk11xx.h.
Referenced by usb_stk11xx_init(), and v4l_stk11xx_register_video_device().
#define DRIVER_NAME "stk11xx" |
#define DRIVER_SUPPORT "Syntek USB Camera : STK-1135" |
#define DRIVER_URL "http://sourceforge.net/projects/syntekdriver/" |
Project page URL of this driver
Definition at line 44 of file stk11xx.h.
Referenced by usb_stk11xx_init().
#define DRIVER_VERSION "v3.0.0" |
#define DRIVER_VERSION_NUM 0x030000 |
Version numerical of this driver
Definition at line 39 of file stk11xx.h.
Referenced by v4l_stk11xx_do_ioctl().
#define DRIVER_YEAR 2012 |
Last year of source code edition
Definition at line 40 of file stk11xx.h.
Referenced by usb_stk11xx_init().
#define ISO_BUFFER_SIZE (ISO_FRAMES_PER_DESC * ISO_MAX_FRAME_SIZE) |
Maximal size of buffer
Definition at line 91 of file stk11xx.h.
Referenced by stk11xx_allocate_buffers(), and usb_stk11xx_isoc_init().
#define ISO_FRAMES_PER_DESC 10 |
Number frames per ISOC descriptor
Definition at line 89 of file stk11xx.h.
Referenced by usb_stk11xx_isoc_init().
#define ISO_MAX_FRAME_SIZE 3 * 1024 |
Maximale size of frame
Definition at line 90 of file stk11xx.h.
Referenced by usb_stk11xx_isoc_init().
#define MAX_ISO_BUFS 16 |
Number maximal of ISOC buffers
Definition at line 88 of file stk11xx.h.
Referenced by stk11xx_allocate_buffers(), stk11xx_free_buffers(), usb_stk11xx_isoc_cleanup(), and usb_stk11xx_isoc_init().
#define PREFIX DRIVER_NAME ": " |
#define STK11XX_FRAME_SIZE (1280 * 1024 * 4) |
Maximum size after decompression. Warning, we use a big buffer to be able to work with a image resolution 1280x1024 ! If your device doesn't support these resolutions or that you work in an embedded device, you should use a smaller buffer. TODO : Allocate a buffer with a dynamical size adapted for the current resolution...
Definition at line 106 of file stk11xx.h.
Referenced by stk11xx_allocate_buffers(), and usb_stk11xx_probe().
#define STK11XX_MAX_IMAGES 10 |
Absolute maximum number of buffers available for mmap()
Definition at line 105 of file stk11xx.h.
Referenced by stk11xx_allocate_buffers(), and v4l_stk11xx_mmap().
#define STK11XX_PERCENT | ( | x, | |
y | |||
) | ( ((int)x * (int)y) / 100) |
Calculate a value from a percent
Definition at line 386 of file stk11xx.h.
Referenced by usb_stk11xx_default_settings().
#define STK_DEBUG | ( | str, | |
args... | |||
) | do { } while(0) |
Print debug message. Use this function like the function printf.
Definition at line 158 of file stk11xx.h.
Referenced by dev_stk0408_set_camera_quality(), dev_stk0500_configure_device(), dev_stk0500_set_camera_quality(), dev_stk11xx_watchdog_camera(), dev_stk6a31_configure_device(), dev_stk6a31_set_camera_quality(), dev_stk6a33_configure_device(), dev_stk6a33_initialize_device(), dev_stk6a33_set_camera_quality(), dev_stk6a51_configure_device(), dev_stk6a51_initialize_device(), dev_stk6a51_set_camera_quality(), dev_stk6a54_configure_device(), dev_stk6d51_configure_device(), dev_stk6d51_set_camera_quality(), dev_stka311_camera_settings(), dev_stka311_configure_device(), dev_stka311_initialize_device(), dev_stka311_set_camera_quality(), dev_stka821_configure_device(), dev_stka821_initialize_device(), dev_stka821_set_camera_quality(), stk11xx_allocate_buffers(), stk11xx_free_buffers(), stk11xx_reset_buffers(), usb_stk11xx_init(), usb_stk11xx_isoc_cleanup(), usb_stk11xx_isoc_handler(), usb_stk11xx_isoc_init(), usb_stk11xx_probe(), usb_stk11xx_set_configuration(), usb_stk11xx_set_feature(), v4l_stk11xx_do_ioctl(), v4l_stk11xx_ioctl(), v4l_stk11xx_open(), and v4l_stk11xx_select_video_mode().
Print error message. Use this function like the function printf.
Definition at line 156 of file stk11xx.h.
Referenced by dev_stk0408_sensor_settings(), dev_stk0500_sensor_settings(), dev_stk11xx_camera_off(), dev_stk11xx_camera_on(), dev_stk11xx_check_device(), dev_stk6a31_sensor_settings(), dev_stk6a33_sensor_settings(), dev_stk6a54_sensor_settings(), dev_stka311_sensor_settings(), dev_stka821_sensor_settings(), stk11xx_allocate_buffers(), stk11xx_next_frame(), usb_stk11xx_init(), usb_stk11xx_isoc_handler(), usb_stk11xx_isoc_init(), usb_stk11xx_probe(), usb_stk11xx_read_registry(), usb_stk11xx_set_configuration(), usb_stk11xx_set_feature(), usb_stk11xx_write_registry(), v4l_stk11xx_do_ioctl(), v4l_stk11xx_mmap(), v4l_stk11xx_open(), v4l_stk11xx_register_video_device(), and v4l_stk11xx_release().
Print information message. Use this function like the function printf.
Definition at line 155 of file stk11xx.h.
Referenced by dev_stk0408_initialize_device(), dev_stk0500_initialize_device(), dev_stk6a31_initialize_device(), dev_stk6a33_initialize_device(), dev_stk6a51_initialize_device(), dev_stk6a54_initialize_device(), dev_stk6d51_initialize_device(), dev_stka311_initialize_device(), dev_stka821_initialize_device(), usb_stk11xx_disconnect(), usb_stk11xx_exit(), usb_stk11xx_init(), usb_stk11xx_probe(), v4l_stk11xx_register_video_device(), and v4l_stk11xx_unregister_video_device().
#define STK_STREAM | ( | str, | |
args... | |||
) | do { } while(0) |
Print stream debug message. Use this function like the function printf.
Definition at line 181 of file stk11xx.h.
Referenced by stk11xx_handle_frame(), stk11xx_next_frame(), stk11xx_next_image(), usb_stk11xx_isoc_handler(), v4l_stk11xx_mmap(), v4l_stk11xx_poll(), and v4l_stk11xx_read().
#define STK_WARNING | ( | str, | |
args... | |||
) | printk(KERN_WARNING PREFIX str, ##args) |
#define to_stk11xx_dev | ( | d | ) | container_of(d, struct usb_stk11xx, kref) |
#define USB_STK_0408_PRODUCT_ID 0x0408 |
Product ID of the camera STK-1160
Definition at line 59 of file stk11xx.h.
Referenced by usb_stk11xx_probe().
#define USB_STK_0500_PRODUCT_ID 0x0500 |
Product ID of the camera DC-1125
Definition at line 60 of file stk11xx.h.
Referenced by usb_stk11xx_probe().
#define USB_STK_0501_PRODUCT_ID 0x0501 |
Product ID of the camera DC-1125
Definition at line 61 of file stk11xx.h.
Referenced by usb_stk11xx_probe().
#define USB_STK_6A31_PRODUCT_ID 0x6a31 |
Product ID of the camera DC-NEW
Definition at line 53 of file stk11xx.h.
Referenced by usb_stk11xx_probe().
#define USB_STK_6A33_PRODUCT_ID 0x6a33 |
Product ID of the camera DC-NEW
Definition at line 54 of file stk11xx.h.
Referenced by usb_stk11xx_probe().
#define USB_STK_6A51_PRODUCT_ID 0x6a51 |
Product ID of the camera DC-NEW
Definition at line 55 of file stk11xx.h.
Referenced by usb_stk11xx_probe().
#define USB_STK_6A54_PRODUCT_ID 0x6a54 |
Product ID of the camera DC-NEW
Definition at line 56 of file stk11xx.h.
Referenced by usb_stk11xx_probe().
#define USB_STK_6D51_PRODUCT_ID 0x6d51 |
Product ID of the camera DC-NEW
Definition at line 57 of file stk11xx.h.
Referenced by usb_stk11xx_probe().
#define USB_STK_A311_PRODUCT_ID 0xa311 |
Product ID of the camera STK-1125
Definition at line 50 of file stk11xx.h.
Referenced by usb_stk11xx_probe().
#define USB_STK_A821_PRODUCT_ID 0xa821 |
Product ID of the camera STK-1135
Definition at line 51 of file stk11xx.h.
Referenced by usb_stk11xx_probe().
#define USB_STK_AA11_PRODUCT_ID 0xaa11 |
Product ID of the camera STK-1135
Definition at line 52 of file stk11xx.h.
Referenced by usb_stk11xx_probe().
#define USB_SYNTEK1_VENDOR_ID 0x174f |
#define USB_SYNTEK2_VENDOR_ID 0x05e1 |
#define VID_HARDWARE_STK11XX 88 |
enum T_STK11XX_PALETTE |
enum T_STK11XX_RESOLUTION |
enum T_STK11XX_VIDEOMODE |
enum T_SYNTEK_DEVICE |
int dev_stk11xx_camera_asleep | ( | struct usb_stk11xx * | dev | ) |
Wake-up the camera.
dev | Device structure |
This function permits to wake-up the device.
Definition at line 303 of file stk11xx-dev.c.
References dev_stk0408_camera_asleep(), dev_stk0500_camera_asleep(), dev_stk6a31_camera_asleep(), dev_stk6a33_camera_asleep(), dev_stk6a51_camera_asleep(), dev_stk6a54_camera_asleep(), dev_stk6d51_camera_asleep(), dev_stka311_camera_asleep(), dev_stka821_camera_asleep(), and usb_stk11xx::webcam_model.
Referenced by v4l_stk11xx_do_ioctl(), and v4l_stk11xx_release().
int dev_stk11xx_camera_off | ( | struct usb_stk11xx * | dev | ) |
This function switchs off the camera.
dev | Device structure |
In fact, we choose the alternate interface '0'.
Definition at line 280 of file stk11xx-dev.c.
References STK_ERROR, and usb_stk11xx::udev.
Referenced by dev_stk0408_configure_device(), dev_stk0500_init_camera(), dev_stk6a31_init_camera(), dev_stk6a33_init_camera(), dev_stk6a51_init_camera(), dev_stka311_init_camera(), dev_stka821_init_camera(), usb_stk11xx_probe(), v4l_stk11xx_do_ioctl(), and v4l_stk11xx_release().
int dev_stk11xx_camera_on | ( | struct usb_stk11xx * | dev | ) |
This function switchs on the camera.
dev | Device structure |
In fact, we choose the alternate interface '5'.
Definition at line 257 of file stk11xx-dev.c.
References STK_ERROR, and usb_stk11xx::udev.
Referenced by dev_stk0408_configure_device(), usb_stk11xx_probe(), v4l_stk11xx_do_ioctl(), and v4l_stk11xx_open().
int dev_stk11xx_camera_settings | ( | struct usb_stk11xx * | dev | ) |
This function permits to modify the settings of the camera.
dev | Device structure |
This functions permits to modify the settings :
Definition at line 366 of file stk11xx-dev.c.
References dev_stk0408_camera_settings(), dev_stk0500_camera_settings(), dev_stk6a31_camera_settings(), dev_stk6a33_camera_settings(), dev_stk6a51_camera_settings(), dev_stk6a54_camera_settings(), dev_stk6d51_camera_settings(), dev_stka311_camera_settings(), dev_stka821_camera_settings(), and usb_stk11xx::webcam_model.
Referenced by dev_stk0408_reconf_camera(), dev_stk6a31_reconf_camera(), dev_stk6a33_reconf_camera(), dev_stk6a51_reconf_camera(), dev_stk6a54_reconf_camera(), dev_stk6d51_reconf_camera(), dev_stka311_reconf_camera(), dev_stka821_reconf_camera(), v4l_stk11xx_do_ioctl(), and v4l_stk11xx_open().
int dev_stk11xx_check_device | ( | struct usb_stk11xx * | dev, |
int | nbr | ||
) |
This function permits to check the device in reading the register 0x0201.
dev | Device structure |
nbr | Number of tries |
When we configure the stk11xx, this function is used to check the device status.
Definition at line 186 of file stk11xx-dev.c.
References STK_ERROR, and usb_stk11xx_read_registry().
Referenced by dev_stk0408_initialize_device(), dev_stk0500_configure_device(), dev_stk0500_initialize_device(), dev_stk0500_sensor_settings(), dev_stk0500_set_camera_quality(), dev_stk6a31_camera_settings(), dev_stk6a31_configure_device(), dev_stk6a31_initialize_device(), dev_stk6a31_sensor_settings(), dev_stk6a31_set_camera_quality(), dev_stk6a33_camera_settings(), dev_stk6a33_initialize_device(), dev_stk6a33_sensor_settings(), dev_stk6a33_set_camera_quality(), dev_stk6a51_configure_device(), dev_stk6a51_initialize_device(), dev_stk6a51_sensor_settings(), dev_stk6a51_set_camera_quality(), dev_stk6a54_initialize_device(), dev_stk6a54_sensor_settings(), dev_stk6d51_initialize_device(), dev_stk6d51_sensor_settings(), dev_stk6d51_set_camera_quality(), dev_stka311_camera_settings(), dev_stka311_configure_device(), dev_stka311_init_camera(), dev_stka311_initialize_device(), dev_stka311_sensor_settings(), dev_stka821_camera_settings(), dev_stka821_configure_device(), dev_stka821_initialize_device(), dev_stka821_sensor_settings(), and dev_stka821_set_camera_quality().
int dev_stk11xx_decompress | ( | struct usb_stk11xx * | dev | ) |
Decompress/convert a frame from the video stream.
dev | Device structure |
dev | Device structure |
Definition at line 727 of file stk11xx-dev.c.
References stk11xx_decompress(), and usb_stk11xx::webcam_model.
Referenced by stk11xx_handle_frame().
int dev_stk11xx_init_camera | ( | struct usb_stk11xx * | dev | ) |
This function initializes the device for the stream.
dev | Device structure |
It's the start. This function has to be called at first, before enabling the video stream.
Definition at line 123 of file stk11xx-dev.c.
References dev_stk0408_init_camera(), dev_stk0500_init_camera(), dev_stk6a31_init_camera(), dev_stk6a33_init_camera(), dev_stk6a51_init_camera(), dev_stk6a54_init_camera(), dev_stk6d51_init_camera(), dev_stka311_init_camera(), dev_stka821_init_camera(), and usb_stk11xx::webcam_model.
Referenced by v4l_stk11xx_do_ioctl(), and v4l_stk11xx_open().
int dev_stk11xx_initialize_device | ( | struct usb_stk11xx * | dev | ) |
This function permits to initialize the device.
dev | Device structure |
This function must be called at first. It's the start of the initialization process. After this process, the device is completly initalized and it's ready.
This function is written from the USB log.
Definition at line 63 of file stk11xx-dev.c.
References dev_stk0408_initialize_device(), dev_stk0500_initialize_device(), dev_stk6a31_initialize_device(), dev_stk6a33_initialize_device(), dev_stk6a51_initialize_device(), dev_stk6a54_initialize_device(), dev_stk6d51_initialize_device(), dev_stka311_initialize_device(), dev_stka821_initialize_device(), and usb_stk11xx::webcam_model.
Referenced by usb_stk11xx_probe().
int dev_stk11xx_reconf_camera | ( | struct usb_stk11xx * | dev | ) |
Reconfigure the camera before the stream.
dev | Device structure |
Before enabling the video stream, you have to reconfigure the device.
Definition at line 608 of file stk11xx-dev.c.
References dev_stk0408_reconf_camera(), dev_stk0500_reconf_camera(), dev_stk6a31_reconf_camera(), dev_stk6a33_reconf_camera(), dev_stk6a51_reconf_camera(), dev_stk6a54_reconf_camera(), dev_stk6d51_reconf_camera(), dev_stka311_reconf_camera(), dev_stka821_reconf_camera(), and usb_stk11xx::webcam_model.
Referenced by v4l_stk11xx_do_ioctl(), and v4l_stk11xx_open().
int dev_stk11xx_set_camera_fps | ( | struct usb_stk11xx * | dev | ) |
This function permits to modify the fps of the camera.
dev | Device structure |
This functions permits to modify the frame rate per second of the camera. So the number of images per second.
Definition at line 489 of file stk11xx-dev.c.
References dev_stk0408_set_camera_fps(), dev_stk0500_set_camera_fps(), dev_stk6a31_set_camera_fps(), dev_stk6a33_set_camera_fps(), dev_stk6a51_set_camera_fps(), dev_stk6a54_set_camera_fps(), dev_stk6d51_set_camera_fps(), dev_stka311_set_camera_fps(), dev_stka821_set_camera_fps(), and usb_stk11xx::webcam_model.
int dev_stk11xx_set_camera_quality | ( | struct usb_stk11xx * | dev | ) |
This function permits to modify the quality video of the camera.
dev | Device structure |
This functions permits to modify the settings :
Definition at line 429 of file stk11xx-dev.c.
References dev_stk0408_set_camera_quality(), dev_stk0500_set_camera_quality(), dev_stk6a31_set_camera_quality(), dev_stk6a33_set_camera_quality(), dev_stk6a51_set_camera_quality(), dev_stk6a54_set_camera_quality(), dev_stk6d51_set_camera_quality(), dev_stka311_set_camera_quality(), dev_stka821_set_camera_quality(), and usb_stk11xx::webcam_model.
Referenced by store_brightness(), store_colour(), store_contrast(), and store_whitebalance().
int dev_stk11xx_start_stream | ( | struct usb_stk11xx * | dev | ) |
This function sets the device to start the stream.
dev | Device structure |
After the initialization of the device and the initialization of the video stream, this function permits to enable the stream.
Definition at line 549 of file stk11xx-dev.c.
References dev_stk0408_start_stream(), dev_stk0500_start_stream(), dev_stk6a31_start_stream(), dev_stk6a33_start_stream(), dev_stk6a51_start_stream(), dev_stk6a54_start_stream(), dev_stk6d51_start_stream(), dev_stka311_start_stream(), dev_stka821_start_stream(), and usb_stk11xx::webcam_model.
Referenced by v4l_stk11xx_do_ioctl(), and v4l_stk11xx_open().
int dev_stk11xx_stop_stream | ( | struct usb_stk11xx * | dev | ) |
This function sets the device to stop the stream.
dev | Device structure |
You use the function start_stream to enable the video stream. So you have to use the function stop_strem to disable the video stream.
Definition at line 668 of file stk11xx-dev.c.
References dev_stk0408_stop_stream(), dev_stk0500_stop_stream(), dev_stk6a31_stop_stream(), dev_stk6a33_stop_stream(), dev_stk6a51_stop_stream(), dev_stk6a54_stop_stream(), dev_stk6d51_stop_stream(), dev_stka311_stop_stream(), dev_stka821_stop_stream(), and usb_stk11xx::webcam_model.
Referenced by v4l_stk11xx_do_ioctl(), and v4l_stk11xx_release().
int dev_stk11xx_watchdog_camera | ( | struct usb_stk11xx * | dev | ) |
A espece of software watchdog.
dev | Device structure |
This function reads periodically the value of register 0x0001.
We don't know the purpose. I assume that it seems to a software watchdog.
Definition at line 234 of file stk11xx-dev.c.
References STK_DEBUG, and usb_stk11xx_read_registry().
Referenced by stk11xx_handle_frame().
int stk11xx_allocate_buffers | ( | struct usb_stk11xx * | dev | ) |
Allocate all ISOC buffers.
dev | Device structure |
This function permits to reserved the memory for each ISOC buffer.
Definition at line 128 of file stk11xx-buf.c.
References default_nbrframebuf, ISO_BUFFER_SIZE, MAX_ISO_BUFS, stk11xx_image_buf::offset, STK11XX_FRAME_SIZE, STK11XX_MAX_IMAGES, stk11xx_rvmalloc(), STK_DEBUG, STK_ERROR, and stk11xx_image_buf::vma_use_count.
Referenced by v4l_stk11xx_open().
int stk11xx_clear_buffers | ( | struct usb_stk11xx * | dev | ) |
Clear current buffers.
dev | Device structure |
This function permits to clear the memory.
Definition at line 270 of file stk11xx-buf.c.
Referenced by v4l_stk11xx_do_ioctl().
int stk11xx_create_sysfs_files | ( | struct video_device * | vdev | ) |
Create the 'sys' entries.
This function permits to create all the entries in the 'sys' filesystem.
vdev | Video device structure |
Definition at line 505 of file stk11xx-sysfs.c.
Referenced by usb_stk11xx_probe().
int stk11xx_decompress | ( | struct usb_stk11xx * | dev | ) |
Decompress a frame.
This function permits to decompress a frame from the video stream.
dev | Device structure |
Definition at line 155 of file stk11xx-bayer.c.
References stk11xx_video::brightness, stk11xx_video::depth, stk11xx_video::hflip, stk11xx_image_buf::offset, stk11xx_video::palette, stk11xx_b2bgr24(), stk11xx_b2bgr32(), stk11xx_b2rgb24(), stk11xx_b2rgb32(), stk11xx_b2uyvy(), stk11xx_b2yuyv(), stk11xx_correct_brightness(), stk11xx_video::vflip, usb_stk11xx::vsettings, stk11xx_coord::x, and stk11xx_coord::y.
Referenced by dev_stk11xx_decompress().
int stk11xx_free_buffers | ( | struct usb_stk11xx * | dev | ) |
Release all buffers.
dev | Device structure |
This function permits to release and free the memory for each ISOC buffer.
Definition at line 287 of file stk11xx-buf.c.
References default_nbrframebuf, MAX_ISO_BUFS, stk11xx_rvfree(), and STK_DEBUG.
Referenced by v4l_stk11xx_open(), and v4l_stk11xx_release().
int stk11xx_handle_frame | ( | struct usb_stk11xx * | dev | ) |
Handler frame.
dev | Device structure |
This function gets called for the isochronous pipe. This function is only called when a frame is ready. So we have to be fast to decompress the data.
Definition at line 407 of file stk11xx-buf.c.
References dev_stk11xx_decompress(), dev_stk11xx_watchdog_camera(), usb_stk11xx::spinlock, and STK_STREAM.
Referenced by v4l_stk11xx_do_ioctl(), and v4l_stk11xx_read().
int stk11xx_next_frame | ( | struct usb_stk11xx * | dev | ) |
Prepare the next frame.
dev | Device structure |
This function is called when a frame is ready, so as to prepare the next frame.
Definition at line 352 of file stk11xx-buf.c.
References usb_stk11xx::spinlock, STK_ERROR, and STK_STREAM.
Referenced by usb_stk11xx_isoc_handler().
void stk11xx_next_image | ( | struct usb_stk11xx * | dev | ) |
Prepare the next image.
dev | Device structure |
This function is called when an image is ready, so as to prepare the next image.
Definition at line 334 of file stk11xx-buf.c.
References STK_STREAM.
Referenced by v4l_stk11xx_do_ioctl(), and v4l_stk11xx_read().
void stk11xx_remove_sysfs_files | ( | struct video_device * | vdev | ) |
Remove the 'sys' entries.
This function permits to remove all the entries in the 'sys' filesystem.
vdev | Video device structure |
Definition at line 533 of file stk11xx-sysfs.c.
Referenced by usb_stk11xx_disconnect().
int stk11xx_reset_buffers | ( | struct usb_stk11xx * | dev | ) |
Reset all ISOC buffers.
dev | Device structure |
This function permits to reset all ISOC buffers.
Definition at line 221 of file stk11xx-buf.c.
References usb_stk11xx::spinlock, and STK_DEBUG.
Referenced by v4l_stk11xx_open().
void usb_stk11xx_isoc_cleanup | ( | struct usb_stk11xx * | dev | ) |
Clean-up all the ISOC buffers.
dev | Device structure |
This function permits to clean-up all the ISOC buffers.
Definition at line 449 of file stk11xx-usb.c.
References MAX_ISO_BUFS, and STK_DEBUG.
Referenced by v4l_stk11xx_do_ioctl(), v4l_stk11xx_open(), and v4l_stk11xx_release().
void usb_stk11xx_isoc_handler | ( | struct urb * | urb | ) |
ISOC handler.
urb | URB structure |
This function is called as an URB transfert is complete (Isochronous pipe). So, the traitement is done in interrupt time, so it has be fast, not crash, ans not stall. Neat.
Definition at line 252 of file stk11xx-usb.c.
References stk11xx_next_frame(), STK_DEBUG, STK_ERROR, STK_STREAM, usb_stk11xx::udev, usb_stk11xx::vframes_dumped, usb_stk11xx::vframes_error, usb_stk11xx::visoc_errors, and usb_stk11xx::wait_frame.
Referenced by usb_stk11xx_isoc_init().
int usb_stk11xx_isoc_init | ( | struct usb_stk11xx * | dev | ) |
Initilize an isochronous pipe.
dev | Device structure |
This function permits to initialize an URB transfert (or isochronous pipe).
Definition at line 133 of file stk11xx-usb.c.
References ISO_BUFFER_SIZE, ISO_FRAMES_PER_DESC, ISO_MAX_FRAME_SIZE, usb_stk11xx::isoc_in_endpointAddr, usb_stk11xx::isoc_in_size, MAX_ISO_BUFS, STK_DEBUG, STK_ERROR, usb_stk11xx::udev, and usb_stk11xx_isoc_handler().
Referenced by v4l_stk11xx_do_ioctl(), and v4l_stk11xx_open().
int usb_stk11xx_read_registry | ( | struct usb_stk11xx * | dev, |
__u16 | index, | ||
int * | value | ||
) |
Read a 16-bits value from a 16-bits register.
dev | |
index | |
value |
This function permits to read a 16-bits value from a 16-bits register on the USB bus.
Definition at line 590 of file stk11xx-usb.c.
References STK_ERROR, and usb_stk11xx::udev.
Referenced by dev_stk0408_camera_asleep(), dev_stk0408_configure_device(), dev_stk0408_initialize_device(), dev_stk0408_start_stream(), dev_stk0408_stop_stream(), dev_stk0500_camera_asleep(), dev_stk0500_configure_device(), dev_stk0500_sensor_settings(), dev_stk0500_set_camera_quality(), dev_stk0500_start_stream(), dev_stk0500_stop_stream(), dev_stk11xx_check_device(), dev_stk11xx_watchdog_camera(), dev_stk6a31_camera_asleep(), dev_stk6a31_camera_settings(), dev_stk6a31_configure_device(), dev_stk6a31_sensor_settings(), dev_stk6a31_set_camera_quality(), dev_stk6a31_start_stream(), dev_stk6a33_camera_asleep(), dev_stk6a33_camera_settings(), dev_stk6a33_configure_device(), dev_stk6a33_initialize_device(), dev_stk6a33_sensor_settings(), dev_stk6a33_set_camera_quality(), dev_stk6a33_start_stream(), dev_stk6a33_stop_stream(), dev_stk6a51_camera_asleep(), dev_stk6a51_configure_device(), dev_stk6a51_initialize_device(), dev_stk6a51_sensor_settings(), dev_stk6a51_set_camera_quality(), dev_stk6a51_start_stream(), dev_stk6a54_camera_asleep(), dev_stk6a54_configure_device(), dev_stk6a54_initialize_device(), dev_stk6a54_sensor_settings(), dev_stk6d51_camera_asleep(), dev_stk6d51_configure_device(), dev_stk6d51_initialize_device(), dev_stk6d51_sensor_settings(), dev_stk6d51_set_camera_quality(), dev_stka311_camera_asleep(), dev_stka311_configure_device(), dev_stka311_init_camera(), dev_stka311_initialize_device(), dev_stka311_sensor_settings(), dev_stka311_start_stream(), dev_stka311_stop_stream(), dev_stka821_camera_asleep(), dev_stka821_camera_settings(), dev_stka821_configure_device(), dev_stka821_initialize_device(), dev_stka821_sensor_settings(), dev_stka821_set_camera_quality(), dev_stka821_start_stream(), and dev_stka821_stop_stream().
int usb_stk11xx_set_configuration | ( | struct usb_stk11xx * | dev | ) |
Send the message SET_CONFIGURATION.
dev | Device structure |
This function permits to send the message SET_CONFIGURATION on the USB bus.
Definition at line 524 of file stk11xx-usb.c.
References STK_DEBUG, STK_ERROR, and usb_stk11xx::udev.
int usb_stk11xx_set_feature | ( | struct usb_stk11xx * | dev, |
int | index | ||
) |
Send the message SET_FEATURE and choose the interface.
dev | Device structure |
index | Choice of the interface |
This function permits to send the message SET_FEATURE on the USB bus.
Definition at line 492 of file stk11xx-usb.c.
References STK_DEBUG, STK_ERROR, and usb_stk11xx::udev.
Referenced by dev_stk0408_initialize_device(), dev_stk0500_init_camera(), dev_stk0500_initialize_device(), dev_stk6a31_init_camera(), dev_stk6a31_initialize_device(), dev_stk6a33_init_camera(), dev_stk6a33_initialize_device(), dev_stk6a51_init_camera(), dev_stk6a51_initialize_device(), dev_stk6a54_initialize_device(), dev_stk6d51_initialize_device(), dev_stka311_init_camera(), dev_stka311_initialize_device(), dev_stka821_init_camera(), and dev_stka821_initialize_device().
int usb_stk11xx_write_registry | ( | struct usb_stk11xx * | dev, |
__u16 | index, | ||
__u16 | value | ||
) |
Write a 16-bits value to a 16-bits register.
dev | |
index | |
value |
This function permits to write a 16-bits value to a 16-bits register on the USB bus.
Definition at line 558 of file stk11xx-usb.c.
References STK_ERROR, and usb_stk11xx::udev.
Referenced by dev_stk0408_camera_asleep(), dev_stk0408_configure_device(), dev_stk0408_initialize_device(), dev_stk0408_set_camera_quality(), dev_stk0408_start_stream(), dev_stk0408_stop_stream(), dev_stk0500_camera_asleep(), dev_stk0500_configure_device(), dev_stk0500_init_camera(), dev_stk0500_initialize_device(), dev_stk0500_sensor_settings(), dev_stk0500_set_camera_quality(), dev_stk0500_start_stream(), dev_stk0500_stop_stream(), dev_stk6a31_camera_asleep(), dev_stk6a31_camera_settings(), dev_stk6a31_configure_device(), dev_stk6a31_init_camera(), dev_stk6a31_initialize_device(), dev_stk6a31_sensor_settings(), dev_stk6a31_set_camera_quality(), dev_stk6a31_start_stream(), dev_stk6a33_camera_asleep(), dev_stk6a33_camera_settings(), dev_stk6a33_configure_device(), dev_stk6a33_init_camera(), dev_stk6a33_initialize_device(), dev_stk6a33_sensor_settings(), dev_stk6a33_set_camera_quality(), dev_stk6a33_start_stream(), dev_stk6a33_stop_stream(), dev_stk6a51_camera_asleep(), dev_stk6a51_configure_device(), dev_stk6a51_init_camera(), dev_stk6a51_initialize_device(), dev_stk6a51_sensor_settings(), dev_stk6a51_set_camera_quality(), dev_stk6a51_start_stream(), dev_stk6a54_camera_asleep(), dev_stk6a54_configure_device(), dev_stk6a54_initialize_device(), dev_stk6a54_sensor_settings(), dev_stk6d51_camera_asleep(), dev_stk6d51_configure_device(), dev_stk6d51_initialize_device(), dev_stk6d51_sensor_settings(), dev_stk6d51_set_camera_quality(), dev_stka311_camera_asleep(), dev_stka311_configure_device(), dev_stka311_init_camera(), dev_stka311_initialize_device(), dev_stka311_sensor_settings(), dev_stka311_set_camera_fps(), dev_stka311_set_camera_quality(), dev_stka311_start_stream(), dev_stka311_stop_stream(), dev_stka821_camera_asleep(), dev_stka821_camera_settings(), dev_stka821_configure_device(), dev_stka821_init_camera(), dev_stka821_initialize_device(), dev_stka821_sensor_settings(), dev_stka821_set_camera_quality(), dev_stka821_start_stream(), and dev_stka821_stop_stream().
int v4l_stk11xx_register_video_device | ( | struct usb_stk11xx * | dev | ) |
Register the video device.
dev | Device structure |
This function permits to register the USB device to the video device.
Definition at line 1497 of file stk11xx-v4l.c.
References DRIVER_DESC, usb_stk11xx::interface, STK_ERROR, STK_INFO, v4l_stk11xx_fops, and usb_stk11xx::vdev.
Referenced by usb_stk11xx_probe().
int v4l_stk11xx_select_video_mode | ( | struct usb_stk11xx * | dev, |
int | width, | ||
int | height | ||
) |
Select a video mode.
dev | |
width | Width of wished resolution |
height | Height of wished resolution |
This function permits to check and select a video mode.
Definition at line 156 of file stk11xx-v4l.c.
References stk11xx_video::palette, STK11XX_PAL, STK11XX_SXGA, STK11XX_VGA, STK_DEBUG, usb_stk11xx::vsettings, usb_stk11xx::webcam_type, stk11xx_coord::x, and stk11xx_coord::y.
Referenced by v4l_stk11xx_do_ioctl(), and v4l_stk11xx_open().
int v4l_stk11xx_unregister_video_device | ( | struct usb_stk11xx * | dev | ) |
Unregister the video device.
dev | Device structure |
This function permits to unregister the video device.
Definition at line 1530 of file stk11xx-v4l.c.
References STK_INFO, and usb_stk11xx::vdev.
Referenced by usb_stk11xx_disconnect().
struct stk11xx_coord stk11xx_image_sizes[STK11XX_NBR_SIZES] |
List of all resolutions supported by the driver
Definition at line 59 of file stk11xx-v4l.c.