stk11xx.h File Reference

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   "v2.0.0"
#define DRIVER_VERSION_NUM   0x020000
#define DRIVER_DESC   "Syntek USB Video Camera"
#define DRIVER_AUTHOR   "Nicolas VIVIEN"
#define PREFIX   DRIVER_NAME ": "
#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_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_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
}
enum  T_STK11XX_VIDEOMODE { STK11XX_VGA, STK11XX_SXGA, STK11XX_UXGA }
enum  T_STK11XX_RESOLUTION {
  STK11XX_80x60, STK11XX_128x96, STK11XX_160x120, STK11XX_213x160,
  STK11XX_320x240, STK11XX_640x480, 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_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]


Detailed Description

Driver for Syntek USB video camera.

Author:
Nicolas VIVIEN
Date:
2006-10-23
Version:
v2.0.x
Note:
Copyright (C) Nicolas VIVIEN
Licences
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

SubVersion
Date
2009-03-25 15:13:05 +0100 (mer 25 mar 2009)
Revision
84
Author
nicklas79
HeadURL
https://syntekdriver.svn.sourceforge.net/svnroot/syntekdriver/tags/2.1.0/stk11xx.h

Definition in file stk11xx.h.


Define Documentation

#define CONFIG_STK11XX_DEBUG   0

Enable / Disable the debug mode.

Definition at line 134 of file stk11xx.h.

#define CONFIG_STK11XX_DEBUG_STREAM   0

Enable / Disable the debug mode about the stream.

Definition at line 163 of file stk11xx.h.

#define DRIVER_AUTHOR   "Nicolas VIVIEN"

Author of this driver

Definition at line 42 of file stk11xx.h.

#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"

Name of this driver

Definition at line 38 of file stk11xx.h.

#define DRIVER_SUPPORT   "Syntek USB Camera : STK-1135"

List of supported device

  • DC1125 : USB2.0 Syntek chipset

Definition at line 111 of file stk11xx.h.

#define DRIVER_VERSION   "v2.0.0"

Version of this driver

Definition at line 39 of file stk11xx.h.

Referenced by usb_stk11xx_init().

#define DRIVER_VERSION_NUM   0x020000

Version numerical of this driver

Definition at line 40 of file stk11xx.h.

Referenced by v4l_stk11xx_do_ioctl().

#define ISO_BUFFER_SIZE   (ISO_FRAMES_PER_DESC * ISO_MAX_FRAME_SIZE)

Maximal size of buffer

Definition at line 86 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 84 of file stk11xx.h.

Referenced by usb_stk11xx_isoc_init().

#define ISO_MAX_FRAME_SIZE   3 * 1024

Maximale size of frame

Definition at line 85 of file stk11xx.h.

Referenced by usb_stk11xx_isoc_init().

#define MAX_ISO_BUFS   16

Number maximal of ISOC buffers

Definition at line 83 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 ": "

Prefix use for the STK "printk"

Definition at line 43 of file stk11xx.h.

#define STK11XX_FRAME_SIZE   (1280 * 1024 * 4)

Maximum size after decompression

Definition at line 97 of file stk11xx.h.

Referenced by stk11xx_allocate_buffers().

#define STK11XX_MAX_IMAGES   10

Absolute maximum number of buffers available for mmap()

Definition at line 96 of file stk11xx.h.

Referenced by stk11xx_allocate_buffers(), and v4l_stk11xx_mmap().

#define STK11XX_PERCENT ( x,
 )     ( ((int)x * (int)y) / 100)

Calculate a value from a percent

Definition at line 359 of file stk11xx.h.

Referenced by usb_stk11xx_default_settings().

#define STK_DEBUG ( str,
args...   )     do { } while(0)

#define STK_ERROR ( str,
args...   )     printk(KERN_ERR PREFIX str, ##args)

#define STK_INFO ( str,
args...   )     printk(KERN_INFO PREFIX str, ##args)

#define STK_STREAM ( str,
args...   )     do { } while(0)

Print stream debug message. Use this function like the function printf.

Definition at line 172 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)

Print warning message. Use this function like the function printf.

Definition at line 148 of file stk11xx.h.

#define to_stk11xx_dev (  )     container_of(d, struct usb_stk11xx, kref)

Cast a member of a structure out to the containing structure

Definition at line 366 of file stk11xx.h.

#define USB_STK_0501_PRODUCT_ID   0x0501

Product ID of the camera DC-1125

Definition at line 56 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 50 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 51 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 52 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 53 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 54 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 48 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 49 of file stk11xx.h.

Referenced by usb_stk11xx_probe().

#define USB_SYNTEK1_VENDOR_ID   0x174f

Vendor ID of the camera

Definition at line 45 of file stk11xx.h.

Referenced by usb_stk11xx_probe().

#define USB_SYNTEK2_VENDOR_ID   0x05e1

Vendor ID of the camera

Definition at line 46 of file stk11xx.h.

Referenced by usb_stk11xx_probe().

#define VID_HARDWARE_STK11XX   88

This value must be inserted into the kernel headers linux/videodev.h It's useful only for the support of V4L v1

Definition at line 65 of file stk11xx.h.


Enumeration Type Documentation

Color palette

Definition at line 223 of file stk11xx.h.

Video resolution

Definition at line 206 of file stk11xx.h.

Video feature supported by camera

Enumerator:
STK11XX_VGA  For VGA video camera
STK11XX_SXGA  For SXGA video camera 1.3M
STK11XX_UXGA  For UXGA video camera 2M

Definition at line 196 of file stk11xx.h.

Video camera supported by the driver

Definition at line 181 of file stk11xx.h.


Function Documentation

int dev_stk11xx_camera_asleep ( struct usb_stk11xx *  dev  ) 

Wake-up the camera.

Parameters:
dev Device structure
Returns:
0 if all is OK
This function permits to wake-up the device.

Definition at line 287 of file stk11xx-dev.c.

References dev_stk6a31_camera_asleep(), dev_stk6a33_camera_asleep(), dev_stk6a51_camera_asleep(), dev_stk6a54_camera_asleep(), dev_stk6d51_camera_asleep(), dev_stka311_camera_asleep(), and dev_stka821_camera_asleep().

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.

Parameters:
dev Device structure
Returns:
0 if all is OK
In fact, we choose the alternate interface '0'.

Definition at line 264 of file stk11xx-dev.c.

References STK_ERROR.

Referenced by 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.

Parameters:
dev Device structure
Returns:
0 if all is OK
In fact, we choose the alternate interface '5'.

Definition at line 241 of file stk11xx-dev.c.

References STK_ERROR.

Referenced by usb_stk11xx_probe(), v4l_stk11xx_do_ioctl(), and v4l_stk11xx_open().

int dev_stk11xx_camera_settings ( struct usb_stk11xx *  dev  ) 

int dev_stk11xx_check_device ( struct usb_stk11xx *  dev,
int  nbr 
)

int dev_stk11xx_init_camera ( struct usb_stk11xx *  dev  ) 

This function initializes the device for the stream.

Parameters:
dev Device structure
Returns:
0 if all is OK
It's the start. This function has to be called at first, before enabling the video stream.

Definition at line 115 of file stk11xx-dev.c.

References dev_stk6a31_init_camera(), dev_stk6a33_init_camera(), dev_stk6a51_init_camera(), dev_stk6a54_init_camera(), dev_stk6d51_init_camera(), dev_stka311_init_camera(), and dev_stka821_init_camera().

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.

Parameters:
dev Device structure
Returns:
0 if all is OK
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_stk6a31_initialize_device(), dev_stk6a33_initialize_device(), dev_stk6a51_initialize_device(), dev_stk6a54_initialize_device(), dev_stk6d51_initialize_device(), dev_stka311_initialize_device(), and dev_stka821_initialize_device().

Referenced by usb_stk11xx_probe().

int dev_stk11xx_reconf_camera ( struct usb_stk11xx *  dev  ) 

Reconfigure the camera before the stream.

Parameters:
dev Device structure
Returns:
0 if all is OK
Before enabling the video stream, you have to reconfigure the device.

Definition at line 552 of file stk11xx-dev.c.

References dev_stk6a31_reconf_camera(), dev_stk6a33_reconf_camera(), dev_stk6a51_reconf_camera(), dev_stk6a54_reconf_camera(), dev_stk6d51_reconf_camera(), dev_stka311_reconf_camera(), and dev_stka821_reconf_camera().

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.

Parameters:
dev Device structure
Returns:
0 if all is OK
This functions permits to modify the frame rate per second of the camera. So the number of images per second.

Definition at line 449 of file stk11xx-dev.c.

References 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(), and dev_stka821_set_camera_fps().

int dev_stk11xx_set_camera_quality ( struct usb_stk11xx *  dev  ) 

This function permits to modify the quality video of the camera.

Parameters:
dev Device structure
Returns:
0 if all is OK
This functions permits to modify the settings :
  • brightness
  • contrast
  • white balance
  • ...

Definition at line 397 of file stk11xx-dev.c.

References 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(), and dev_stka821_set_camera_quality().

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.

Parameters:
dev Device structure
Returns:
0 if all is OK
After the initialization of the device and the initialization of the video stream, this function permits to enable the stream.

Definition at line 501 of file stk11xx-dev.c.

References dev_stk6a31_start_stream(), dev_stk6a33_start_stream(), dev_stk6a51_start_stream(), dev_stk6a54_start_stream(), dev_stk6d51_start_stream(), dev_stka311_start_stream(), and dev_stka821_start_stream().

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.

Parameters:
dev Device structure
Returns:
0 if all is OK
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 604 of file stk11xx-dev.c.

References dev_stk6a31_stop_stream(), dev_stk6a33_stop_stream(), dev_stk6a51_stop_stream(), dev_stk6a54_stop_stream(), dev_stk6d51_stop_stream(), dev_stka311_stop_stream(), and dev_stka821_stop_stream().

Referenced by v4l_stk11xx_do_ioctl(), and v4l_stk11xx_release().

int dev_stk11xx_watchdog_camera ( struct usb_stk11xx *  dev  ) 

A espece of software watchdog.

Parameters:
dev Device structure
Returns:
Value of register 0x0001
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 218 of file stk11xx-dev.c.

References STK_ERROR, and usb_stk11xx_read_registry().

Referenced by stk11xx_handle_frame().

int stk11xx_allocate_buffers ( struct usb_stk11xx *  dev  ) 

Allocate all ISOC buffers.

Parameters:
dev Device structure
Returns:
0 if all is OK
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_FRAME_SIZE, STK11XX_MAX_IMAGES, stk11xx_rvmalloc(), STK_DEBUG, and STK_ERROR.

Referenced by v4l_stk11xx_open().

int stk11xx_clear_buffers ( struct usb_stk11xx *  dev  ) 

Clear current buffers.

Parameters:
dev Device structure
Returns:
0 if all is OK
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.

Parameters:
vdev Video device structure
Returns:
0 if all is OK

Definition at line 503 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.

Parameters:
dev Device structure
Returns:
0 if all is OK

Definition at line 155 of file stk11xx-bayer.c.

References stk11xx_b2bgr24(), stk11xx_b2bgr32(), stk11xx_b2rgb24(), stk11xx_b2rgb32(), stk11xx_b2uyvy(), stk11xx_b2yuyv(), and stk11xx_correct_brightness().

Referenced by stk11xx_handle_frame().

int stk11xx_free_buffers ( struct usb_stk11xx *  dev  ) 

Release all buffers.

Parameters:
dev Device structure
Returns:
0 if all is OK
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.

Parameters:
dev Device structure
Returns:
0 if all is OK
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_watchdog_camera(), stk11xx_decompress(), 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.

Parameters:
dev Device structure
Returns:
0 if all is OK
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 STK_ERROR, and STK_STREAM.

Referenced by usb_stk11xx_isoc_handler().

void stk11xx_next_image ( struct usb_stk11xx *  dev  ) 

Prepare the next image.

Parameters:
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.

Parameters:
vdev Video device structure
Returns:
0 if all is OK

Definition at line 531 of file stk11xx-sysfs.c.

Referenced by usb_stk11xx_disconnect().

int stk11xx_reset_buffers ( struct usb_stk11xx *  dev  ) 

Reset all ISOC buffers.

Parameters:
dev Device structure
Returns:
0 if all is OK
This function permits to reset all ISOC buffers.

Definition at line 221 of file stk11xx-buf.c.

References STK_DEBUG.

Referenced by v4l_stk11xx_open().

void usb_stk11xx_isoc_cleanup ( struct usb_stk11xx *  dev  ) 

Clean-up all the ISOC buffers.

Parameters:
dev Device structure
This function permits to clean-up all the ISOC buffers.

Definition at line 431 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.

Parameters:
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 243 of file stk11xx-usb.c.

References stk11xx_next_frame(), STK_DEBUG, STK_ERROR, and STK_STREAM.

Referenced by usb_stk11xx_isoc_init().

int usb_stk11xx_isoc_init ( struct usb_stk11xx *  dev  ) 

Initilize an isochronous pipe.

Parameters:
dev Device structure
Returns:
0 if all is OK
This function permits to initialize an URB transfert (or isochronous pipe).

Definition at line 124 of file stk11xx-usb.c.

References ISO_BUFFER_SIZE, ISO_FRAMES_PER_DESC, ISO_MAX_FRAME_SIZE, MAX_ISO_BUFS, STK_DEBUG, STK_ERROR, 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.

Parameters:
dev 
index 
value 
Returns:
0 if all is OK
This function permits to read a 16-bits value from a 16-bits register on the USB bus.

Definition at line 572 of file stk11xx-usb.c.

References STK_ERROR.

Referenced by 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.

Parameters:
dev Device structure
Returns:
0 if all is OK
This function permits to send the message SET_CONFIGURATION on the USB bus.

Definition at line 506 of file stk11xx-usb.c.

References STK_DEBUG, and STK_ERROR.

int usb_stk11xx_set_feature ( struct usb_stk11xx *  dev,
int  index 
)

Send the message SET_FEATURE and choose the interface.

Parameters:
dev Device structure
index Choice of the interface
Returns:
0 if all is OK
This function permits to send the message SET_FEATURE on the USB bus.

Definition at line 474 of file stk11xx-usb.c.

References STK_DEBUG, and STK_ERROR.

Referenced by 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.

Parameters:
dev 
index 
value 
Returns:
0 if all is OK
This function permits to write a 16-bits value to a 16-bits register on the USB bus.

Definition at line 540 of file stk11xx-usb.c.

References STK_ERROR.

Referenced by 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.

Parameters:
dev Device structure
Returns:
0 if all is OK
This function permits to register the USB device to the video device.

Definition at line 1679 of file stk11xx-v4l.c.

References DRIVER_DESC, STK_ERROR, STK_INFO, and v4l_stk11xx_fops.

Referenced by usb_stk11xx_probe().

int v4l_stk11xx_select_video_mode ( struct usb_stk11xx *  dev,
int  width,
int  height 
)

Select a video mode.

Parameters:
dev 
width Width of wished resolution
height Height of wished resolution
Returns:
0 if all is OK
This function permits to check and select a video mode.

Definition at line 128 of file stk11xx-v4l.c.

References stk11xx_image_sizes, STK11XX_SXGA, STK11XX_VGA, and STK_DEBUG.

Referenced by v4l_stk11xx_do_ioctl(), and v4l_stk11xx_open().

int v4l_stk11xx_unregister_video_device ( struct usb_stk11xx *  dev  ) 

Unregister the video device.

Parameters:
dev Device structure
Returns:
0 if all is OK
This function permits to unregister the video device.

Definition at line 1712 of file stk11xx-v4l.c.

References STK_INFO.

Referenced by usb_stk11xx_disconnect().


Variable Documentation

struct stk11xx_coord stk11xx_image_sizes[STK11XX_NBR_SIZES]

List of all resolutions supported by the driver

Definition at line 60 of file stk11xx-v4l.c.


Generated on Wed Nov 11 13:36:59 2009 for SyntekUSBVideoCamera by  doxygen 1.5.9