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 "stk11xx.h"
#include "stk11xx-dev.h"
Go to the source code of this file.
Defines | |
#define | CLAMP(x) x < 0 ? 0 : x > 255 ? 255 : x |
Functions | |
int | dev_stk0408_check_device (struct usb_stk11xx *dev) |
int | dev_stk0408_select_input (struct usb_stk11xx *dev, int input) |
int | dev_stk0408_write0 (struct usb_stk11xx *dev, int mask, int val) |
int | dev_stk0408_initialize_device (struct usb_stk11xx *dev) |
This function initializes the device. | |
int | dev_stk0408_write_208 (struct usb_stk11xx *dev, int val) |
int | dev_stk0408_write_saa (struct usb_stk11xx *dev, int reg, int val) |
int | dev_stk0408_set_resolution (struct usb_stk11xx *dev) |
int | dev_stk0408_configure_device (struct usb_stk11xx *dev, int step) |
This function configures the device. | |
int | dev_stk0408_camera_asleep (struct usb_stk11xx *dev) |
Wake-up the camera. | |
int | dev_stk0408_init_camera (struct usb_stk11xx *dev) |
This function initializes the device for the stream. | |
int | dev_stk0408_sensor_settings (struct usb_stk11xx *dev) |
This function sets the default sensor settings. | |
int | dev_stk0408_camera_settings (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_stk0408_set_camera_fps (struct usb_stk11xx *dev) |
This function permits to modify the settings of the camera. | |
int | dev_stk0408_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_stk0408_stop_stream (struct usb_stk11xx *dev) |
This function sets the device to stop the stream. | |
void | stk11xx_copy_uvyv (uint8_t *src, uint8_t *rgb, struct stk11xx_coord *image, struct stk11xx_coord *view, const int hflip, const int vflip, const int hfactor, const int vfactor, bool order, bool field) |
void | stk11xx_copy_rgb (uint8_t *src, uint8_t *rgb, struct stk11xx_coord *image, struct stk11xx_coord *view, const int hflip, const int vflip, const int hfactor, const int vfactor, bool order, bool four, bool field) |
int | dev_stk0408_decode (struct usb_stk11xx *dev) |
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-0408.c.
int dev_stk0408_camera_asleep | ( | struct usb_stk11xx * | dev | ) |
Wake-up the camera.
dev | Device structure |
This function permits to wake-up the device.
Definition at line 600 of file stk11xx-dev-0408.c.
References usb_stk11xx_read_registry(), and usb_stk11xx_write_registry().
Referenced by dev_stk0408_init_camera(), dev_stk0408_initialize_device(), and dev_stk11xx_camera_asleep().
int dev_stk0408_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 736 of file stk11xx-dev-0408.c.
References dev_stk0408_set_camera_quality().
Referenced by dev_stk11xx_camera_settings().
int dev_stk0408_configure_device | ( | struct usb_stk11xx * | dev, |
int | step | ||
) |
This function configures the device.
dev | Device structure |
step | The step of configuration [0-6] |
This is called multiple times through intitialisation and configuration there appear to be six distinct steps
Definition at line 319 of file stk11xx-dev-0408.c.
References dev_stk0408_sensor_settings(), dev_stk0408_set_camera_quality(), dev_stk0408_start_stream(), dev_stk11xx_camera_off(), dev_stk11xx_camera_on(), stk11xx_video::input, stk11xx_video::norm, usb_stk11xx_read_registry(), usb_stk11xx_write_registry(), and usb_stk11xx::vsettings.
Referenced by dev_stk0408_init_camera(), dev_stk0408_initialize_device(), and dev_stk0408_reconf_camera().
int dev_stk0408_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 637 of file stk11xx-dev-0408.c.
References dev_stk0408_camera_asleep(), and dev_stk0408_configure_device().
Referenced by dev_stk11xx_init_camera().
int dev_stk0408_initialize_device | ( | struct usb_stk11xx * | dev | ) |
This function initializes 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 74 of file stk11xx-dev-0408.c.
References dev_stk0408_camera_asleep(), dev_stk0408_configure_device(), dev_stk11xx_check_device(), STK_INFO, usb_stk11xx_read_registry(), usb_stk11xx_set_feature(), and usb_stk11xx_write_registry().
Referenced by dev_stk11xx_initialize_device().
int dev_stk0408_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 835 of file stk11xx-dev-0408.c.
References dev_stk0408_configure_device(), and dev_stk11xx_camera_settings().
Referenced by dev_stk11xx_reconf_camera().
int dev_stk0408_sensor_settings | ( | struct usb_stk11xx * | dev | ) |
This function sets the default sensor settings.
dev | Device structure |
We set some registers in using a I2C bus. WARNING, the sensor settings can be different following the situation.
Definition at line 687 of file stk11xx-dev-0408.c.
References stk11xx_video::norm, STK_ERROR, and usb_stk11xx::vsettings.
Referenced by dev_stk0408_configure_device().
int dev_stk0408_set_camera_fps | ( | struct usb_stk11xx * | dev | ) |
This function permits to modify the settings of the camera.
dev | Device structure |
This functions permits to modify the frame rate per second.
Definition at line 784 of file stk11xx-dev-0408.c.
Referenced by dev_stk11xx_set_camera_fps().
int dev_stk0408_set_camera_quality | ( | struct usb_stk11xx * | dev | ) |
This function permits to modify the settings of the camera.
dev | Device structure |
Definition at line 752 of file stk11xx-dev-0408.c.
References stk11xx_video::brightness, stk11xx_video::colour, stk11xx_video::contrast, stk11xx_video::hue, STK_DEBUG, usb_stk11xx_write_registry(), and usb_stk11xx::vsettings.
Referenced by dev_stk0408_camera_settings(), dev_stk0408_configure_device(), and dev_stk11xx_set_camera_quality().
int dev_stk0408_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 801 of file stk11xx-dev-0408.c.
References usb_stk11xx_read_registry(), and usb_stk11xx_write_registry().
Referenced by dev_stk0408_configure_device(), and dev_stk11xx_start_stream().
int dev_stk0408_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 856 of file stk11xx-dev-0408.c.
References usb_stk11xx_read_registry(), and usb_stk11xx_write_registry().
Referenced by dev_stk11xx_stop_stream().