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/vmalloc.h>
#include <linux/mm.h>
#include <linux/usb.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include "stk11xx.h"
Go to the source code of this file.
Functions | |
void * | stk11xx_rvmalloc (unsigned long size) |
Allocate a buffer. More... | |
void | stk11xx_rvfree (void *mem, unsigned long size) |
Free a buffer. More... | |
int | stk11xx_allocate_buffers (struct usb_stk11xx *dev) |
Allocate all ISOC buffers. More... | |
int | stk11xx_reset_buffers (struct usb_stk11xx *dev) |
Reset all ISOC buffers. More... | |
int | stk11xx_clear_buffers (struct usb_stk11xx *dev) |
Clear current buffers. More... | |
int | stk11xx_free_buffers (struct usb_stk11xx *dev) |
Release all buffers. More... | |
void | stk11xx_next_image (struct usb_stk11xx *dev) |
Prepare the next image. More... | |
int | stk11xx_next_frame (struct usb_stk11xx *dev) |
Prepare the next frame. More... | |
int | stk11xx_handle_frame (struct usb_stk11xx *dev) |
Handler frame. More... | |
Variables | |
static int | default_nbrframebuf = 3 |
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-buf.c.
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.
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_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_watchdog_camera(), usb_stk11xx::spinlock, stk11xx_decompress(), and STK_STREAM.
Referenced by 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_read().
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 stk11xx_rvfree | ( | void * | mem, |
unsigned long | size | ||
) |
Free a buffer.
mem | Memory address |
size | Size of allocated memory |
This function permits to free a buffer.
Definition at line 100 of file stk11xx-buf.c.
Referenced by stk11xx_free_buffers().
void* stk11xx_rvmalloc | ( | unsigned long | size | ) |
Allocate a buffer.
size | Size of memory |
This function permits to allocate a buffer in memory.
Definition at line 67 of file stk11xx-buf.c.
Referenced by stk11xx_allocate_buffers().
|
static |
Number of frame buffer by default
Definition at line 55 of file stk11xx-buf.c.
Referenced by stk11xx_allocate_buffers(), and stk11xx_free_buffers().