SyntekUSBVideoCamera
|
Driver for Syntek USB video camera. More...
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/kref.h>
#include <linux/usb.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include "stk11xx.h"
#include "stk11xx-dev.h"
Go to the source code of this file.
Functions | |
int | dev_stk11xx_initialize_device (struct usb_stk11xx *dev) |
This function permits to initialize the device. More... | |
int | dev_stk11xx_init_camera (struct usb_stk11xx *dev) |
This function initializes the device for the stream. More... | |
int | dev_stk11xx_check_device (struct usb_stk11xx *dev, int nbr) |
This function permits to check the device in reading the register 0x0201. More... | |
int | dev_stk11xx_watchdog_camera (struct usb_stk11xx *dev) |
A espece of software watchdog. More... | |
int | dev_stk11xx_camera_on (struct usb_stk11xx *dev) |
This function switchs on the camera. More... | |
int | dev_stk11xx_camera_off (struct usb_stk11xx *dev) |
This function switchs off the camera. More... | |
int | dev_stk11xx_camera_asleep (struct usb_stk11xx *dev) |
Wake-up the camera. More... | |
int | dev_stk11xx_camera_settings (struct usb_stk11xx *dev) |
This function permits to modify the settings of the camera. More... | |
int | dev_stk11xx_set_camera_quality (struct usb_stk11xx *dev) |
This function permits to modify the quality video of the camera. More... | |
int | dev_stk11xx_set_camera_fps (struct usb_stk11xx *dev) |
This function permits to modify the fps of the camera. More... | |
int | dev_stk11xx_start_stream (struct usb_stk11xx *dev) |
This function sets the device to start the stream. More... | |
int | dev_stk11xx_reconf_camera (struct usb_stk11xx *dev) |
Reconfigure the camera before the stream. More... | |
int | dev_stk11xx_stop_stream (struct usb_stk11xx *dev) |
This function sets the device to stop the stream. More... | |
int | dev_stk11xx_decompress (struct usb_stk11xx *dev) |
Decompress/convert a frame from the video stream. More... | |
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-dev.c.
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().