Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
usbvision-core.c File Reference
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/timer.h>
#include <linux/gfp.h>
#include <linux/mm.h>
#include <linux/highmem.h>
#include <linux/vmalloc.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/io.h>
#include <linux/videodev2.h>
#include <linux/i2c.h>
#include <media/saa7115.h>
#include <media/v4l2-common.h>
#include <media/tuner.h>
#include <linux/workqueue.h>
#include "usbvision.h"

Go to the source code of this file.

Macros

#define ENABLE_HEXDUMP   0 /* Enable if you need it */
 
#define PDEBUG(level, fmt, args...)
 
#define DBG_HEADER   (1 << 0)
 
#define DBG_IRQ   (1 << 1)
 
#define DBG_ISOC   (1 << 2)
 
#define DBG_PARSE   (1 << 3)
 
#define DBG_SCRATCH   (1 << 4)
 
#define DBG_FUNC   (1 << 5)
 
#define DEFAULT_SCRATCH_BUF_SIZE   (0x20000) /* 128kB memory scratch buffer */
 
#define USBVISION_STRIP_MAGIC   0x5A
 
#define USBVISION_STRIP_LEN_MAX   400
 
#define USBVISION_STRIP_HEADER_LEN   3
 

Functions

 module_param (core_debug, int, 0644)
 
 MODULE_PARM_DESC (core_debug,"enable debug messages [core]")
 
 module_param (adjust_compression, int, 0444)
 
 MODULE_PARM_DESC (adjust_compression," Set the ADPCM compression for the device. Default: 1 (On)")
 
 module_param (switch_svideo_input, int, 0444)
 
 MODULE_PARM_DESC (switch_svideo_input," Set the S-Video input. Some cables and input device are wired differently. Default: 0 (Off)")
 
 module_param (adjust_x_offset, int, 0644)
 
 MODULE_PARM_DESC (adjust_x_offset,"adjust X offset display [core]")
 
 module_param (adjust_y_offset, int, 0644)
 
 MODULE_PARM_DESC (adjust_y_offset,"adjust Y offset display [core]")
 
int usbvision_scratch_alloc (struct usb_usbvision *usbvision)
 
void usbvision_scratch_free (struct usb_usbvision *usbvision)
 
int usbvision_decompress_alloc (struct usb_usbvision *usbvision)
 
void usbvision_decompress_free (struct usb_usbvision *usbvision)
 
int usbvision_read_reg (struct usb_usbvision *usbvision, unsigned char reg)
 
int usbvision_write_reg (struct usb_usbvision *usbvision, unsigned char reg, unsigned char value)
 
int usbvision_power_off (struct usb_usbvision *usbvision)
 
int usbvision_set_output (struct usb_usbvision *usbvision, int width, int height)
 
int usbvision_frames_alloc (struct usb_usbvision *usbvision, int number_of_frames)
 
void usbvision_frames_free (struct usb_usbvision *usbvision)
 
void usbvision_empty_framequeues (struct usb_usbvision *usbvision)
 
int usbvision_stream_interrupt (struct usb_usbvision *usbvision)
 
int usbvision_set_input (struct usb_usbvision *usbvision)
 
int usbvision_power_on (struct usb_usbvision *usbvision)
 
void usbvision_init_power_off_timer (struct usb_usbvision *usbvision)
 
void usbvision_set_power_off_timer (struct usb_usbvision *usbvision)
 
void usbvision_reset_power_off_timer (struct usb_usbvision *usbvision)
 
int usbvision_begin_streaming (struct usb_usbvision *usbvision)
 
int usbvision_restart_isoc (struct usb_usbvision *usbvision)
 
int usbvision_audio_off (struct usb_usbvision *usbvision)
 
int usbvision_set_audio (struct usb_usbvision *usbvision, int audio_channel)
 
int usbvision_setup (struct usb_usbvision *usbvision, int format)
 
int usbvision_set_alternate (struct usb_usbvision *dev)
 
int usbvision_init_isoc (struct usb_usbvision *usbvision)
 
void usbvision_stop_isoc (struct usb_usbvision *usbvision)
 
int usbvision_muxsel (struct usb_usbvision *usbvision, int channel)
 

Macro Definition Documentation

#define DBG_FUNC   (1 << 5)

Definition at line 89 of file usbvision-core.c.

#define DBG_HEADER   (1 << 0)

Definition at line 84 of file usbvision-core.c.

#define DBG_IRQ   (1 << 1)

Definition at line 85 of file usbvision-core.c.

#define DBG_ISOC   (1 << 2)

Definition at line 86 of file usbvision-core.c.

#define DBG_PARSE   (1 << 3)

Definition at line 87 of file usbvision-core.c.

#define DBG_SCRATCH   (1 << 4)

Definition at line 88 of file usbvision-core.c.

#define DEFAULT_SCRATCH_BUF_SIZE   (0x20000) /* 128kB memory scratch buffer */

Definition at line 102 of file usbvision-core.c.

#define ENABLE_HEXDUMP   0 /* Enable if you need it */

Definition at line 71 of file usbvision-core.c.

#define PDEBUG (   level,
  fmt,
  args... 
)
Value:
{ \
if (core_debug & (level)) \
printk(KERN_INFO KBUILD_MODNAME ":[%s:%d] " fmt, \
__func__, __LINE__ , ## args); \
}

Definition at line 75 of file usbvision-core.c.

#define USBVISION_STRIP_HEADER_LEN   3
#define USBVISION_STRIP_LEN_MAX   400
#define USBVISION_STRIP_MAGIC   0x5A

Function Documentation

module_param ( core_debug  ,
int  ,
0644   
)
module_param ( adjust_compression  ,
int  ,
0444   
)
module_param ( switch_svideo_input  ,
int  ,
0444   
)
module_param ( adjust_x_offset  ,
int  ,
0644   
)
module_param ( adjust_y_offset  ,
int  ,
0644   
)
MODULE_PARM_DESC ( core_debug  ,
"enable debug messages "  [core] 
)
MODULE_PARM_DESC ( adjust_compression  ,
" Set the ADPCM compression for the device. Default: 1 (On)"   
)
MODULE_PARM_DESC ( switch_svideo_input  ,
" Set the S-Video input. Some cables and input device are wired differently. Default: 0 (Off)"   
)
MODULE_PARM_DESC ( adjust_x_offset  ,
"adjust X offset display [core] 
)
MODULE_PARM_DESC ( adjust_y_offset  ,
"adjust Y offset display [core] 
)
int usbvision_audio_off ( struct usb_usbvision usbvision)

Definition at line 2263 of file usbvision-core.c.

int usbvision_begin_streaming ( struct usb_usbvision usbvision)

Definition at line 2224 of file usbvision-core.c.

int usbvision_decompress_alloc ( struct usb_usbvision usbvision)

Definition at line 391 of file usbvision-core.c.

void usbvision_decompress_free ( struct usb_usbvision usbvision)

Definition at line 410 of file usbvision-core.c.

void usbvision_empty_framequeues ( struct usb_usbvision usbvision)

Definition at line 1842 of file usbvision-core.c.

int usbvision_frames_alloc ( struct usb_usbvision usbvision,
int  number_of_frames 
)

Definition at line 1779 of file usbvision-core.c.

void usbvision_frames_free ( struct usb_usbvision usbvision)

Definition at line 1826 of file usbvision-core.c.

int usbvision_init_isoc ( struct usb_usbvision usbvision)

Definition at line 2333 of file usbvision-core.c.

void usbvision_init_power_off_timer ( struct usb_usbvision usbvision)

Definition at line 2201 of file usbvision-core.c.

int usbvision_muxsel ( struct usb_usbvision usbvision,
int  channel 
)

Definition at line 2470 of file usbvision-core.c.

int usbvision_power_off ( struct usb_usbvision usbvision)

Definition at line 1575 of file usbvision-core.c.

int usbvision_power_on ( struct usb_usbvision usbvision)

Definition at line 2141 of file usbvision-core.c.

int usbvision_read_reg ( struct usb_usbvision usbvision,
unsigned char  reg 
)

Definition at line 1367 of file usbvision-core.c.

void usbvision_reset_power_off_timer ( struct usb_usbvision usbvision)

Definition at line 2213 of file usbvision-core.c.

int usbvision_restart_isoc ( struct usb_usbvision usbvision)

Definition at line 2237 of file usbvision-core.c.

int usbvision_scratch_alloc ( struct usb_usbvision usbvision)

Definition at line 367 of file usbvision-core.c.

void usbvision_scratch_free ( struct usb_usbvision usbvision)

Definition at line 380 of file usbvision-core.c.

int usbvision_set_alternate ( struct usb_usbvision dev)

Definition at line 2301 of file usbvision-core.c.

int usbvision_set_audio ( struct usb_usbvision usbvision,
int  audio_channel 
)

Definition at line 2274 of file usbvision-core.c.

int usbvision_set_input ( struct usb_usbvision usbvision)

Definition at line 1951 of file usbvision-core.c.

int usbvision_set_output ( struct usb_usbvision usbvision,
int  width,
int  height 
)

Definition at line 1680 of file usbvision-core.c.

void usbvision_set_power_off_timer ( struct usb_usbvision usbvision)

Definition at line 2208 of file usbvision-core.c.

int usbvision_setup ( struct usb_usbvision usbvision,
int  format 
)

Definition at line 2286 of file usbvision-core.c.

void usbvision_stop_isoc ( struct usb_usbvision usbvision)

Definition at line 2423 of file usbvision-core.c.

int usbvision_stream_interrupt ( struct usb_usbvision usbvision)

Definition at line 1859 of file usbvision-core.c.

int usbvision_write_reg ( struct usb_usbvision usbvision,
unsigned char  reg,
unsigned char  value 
)

Definition at line 1396 of file usbvision-core.c.