Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
sonixj.c File Reference
#include <linux/input.h>
#include "gspca.h"
#include "jpeg.h"
#include "autogain_functions.h"

Go to the source code of this file.

Data Structures

struct  sd
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define MODULE_NAME   "sonixj"
 
#define QUALITY_MIN   25
 
#define QUALITY_MAX   90
 
#define QUALITY_DEF   70
 
#define AG_CNT_START   13
 
#define BRIDGE_SN9C102P   0
 
#define BRIDGE_SN9C105   1
 
#define BRIDGE_SN9C110   2
 
#define BRIDGE_SN9C120   3
 
#define F_PDN_INV   0x01 /* inverse pin S_PWR_DN / sn_xxx tables */
 
#define F_ILLUM   0x02 /* presence of illuminator */
 
#define S_PWR_DN   0x01 /* sensor power down */
 
#define S_PDN_INV   0x02 /* inverse pin S_PWR_DN */
 
#define V_TX_EN   0x04 /* video transfer enable */
 
#define LED   0x08 /* output to pin LED */
 
#define SCL_SEL_OD   0x20 /* open-drain mode */
 
#define SYS_SEL_48M   0x40 /* system clock 0: 24MHz, 1: 48MHz */
 
#define MCK_SIZE_MASK   0x1f /* sensor master clock */
 
#define SEN_CLK_EN   0x20 /* enable sensor clock */
 
#define DEF_EN   0x80 /* defect pixel by 0: soft, 1: hard */
 
#define CONTRAST_MAX   127
 
#define COLORS_DEF   25
 
#define GAMMA_DEF   20
 
#define DELAY   0xdd
 
#define WANT_REGULAR_AUTOGAIN
 
#define BS(bridge, sensor)
 
#define BSF(bridge, sensor, flags)
 

Enumerations

enum  e_ctrl {
  BRIGHTNESS, CONTRAST, COLORS, BLUE,
  RED, GAMMA, EXPOSURE, AUTOGAIN,
  GAIN, HFLIP, VFLIP, SHARPNESS,
  ILLUM, FREQ, NCTRLS
}
 
enum  sensors {
  CPIA2_SENSOR_410, CPIA2_SENSOR_500, OV9650_SENSOR = 1, S5K83A_SENSOR = 2,
  S5K4AA_SENSOR = 3, MT9M111_SENSOR = 4, PO1030_SENSOR = 5, OV7660_SENSOR = 6,
  SEN_OV2610, SEN_OV2610AE, SEN_OV3610, SEN_OV6620,
  SEN_OV6630, SEN_OV66308AF, SEN_OV7610, SEN_OV7620,
  SEN_OV7620AE, SEN_OV7640, SEN_OV7648, SEN_OV7660,
  SEN_OV7670, SEN_OV76BE, SEN_OV8610, SEN_OV9600,
  SENSOR_OV767x, SENSOR_OV772x, NSENSORS, SENSOR_OV965x,
  SENSOR_OV971x, SENSOR_OV562x, NSENSORS, SENSOR_ADCM1700,
  SENSOR_GC0307, SENSOR_HV7131R, SENSOR_MI0360, SENSOR_MI0360B,
  SENSOR_MO4000, SENSOR_MT9V111, SENSOR_OM6802, SENSOR_OV7630,
  SENSOR_OV7648, SENSOR_OV7660, SENSOR_PO1030, SENSOR_PO2030N,
  SENSOR_SOI768, SENSOR_SP80708, SENSOR_ICX098BQ, SENSOR_LZ24BP,
  SENSOR_MI0360, SENSOR_MT9V111, SENSOR_OV7660, SENSOR_OV9630,
  SENSOR_OM6802, SENSOR_OTHER, SENSOR_TAS5130A, SENSOR_LT168G,
  SENSOR_CX0342, SENSOR_SOI763A, NSENSORS, SENSOR_HV7131R,
  SENSOR_MI0360, SENSOR_MI1310_SOC, SENSOR_MI1320, SENSOR_MI1320_SOC,
  SENSOR_OV7660, SENSOR_OV7670, SENSOR_PO1200, SENSOR_PO3130NC,
  SENSOR_POxxxx, NSENSORS, SENSOR_ADCM2700, SENSOR_CS2102,
  SENSOR_CS2102K, SENSOR_GC0303, SENSOR_GC0305, SENSOR_HDCS2020,
  SENSOR_HV7131B, SENSOR_HV7131R, SENSOR_ICM105A, SENSOR_MC501CB,
  SENSOR_MT9V111_1, SENSOR_MT9V111_3, SENSOR_OV7620, SENSOR_OV7630C,
  SENSOR_PAS106, SENSOR_PAS202B, SENSOR_PB0330, SENSOR_PO2030,
  SENSOR_TAS5130C, SENSOR_MAX
}
 

Functions

 MODULE_AUTHOR ("Jean-Fran├žois Moine <http://moinejf.free.fr>")
 
 MODULE_DESCRIPTION ("GSPCA/SONIX JPEG USB Camera Driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DEVICE_TABLE (usb, device_table)
 
 module_usb_driver (sd_driver)
 

Macro Definition Documentation

#define AG_CNT_START   13

Definition at line 81 of file sonixj.c.

#define BRIDGE_SN9C102P   0

Definition at line 84 of file sonixj.c.

#define BRIDGE_SN9C105   1

Definition at line 85 of file sonixj.c.

#define BRIDGE_SN9C110   2

Definition at line 86 of file sonixj.c.

#define BRIDGE_SN9C120   3

Definition at line 87 of file sonixj.c.

#define BS (   bridge,
  sensor 
)
Value:
.driver_info = (BRIDGE_ ## bridge << 16) \
| (SENSOR_ ## sensor << 8)

Definition at line 3117 of file sonixj.c.

#define BSF (   bridge,
  sensor,
  flags 
)
Value:
.driver_info = (BRIDGE_ ## bridge << 16) \
| (SENSOR_ ## sensor << 8) \
| (flags)

Definition at line 3120 of file sonixj.c.

#define COLORS_DEF   25
#define CONTRAST_MAX   127
#define DEF_EN   0x80 /* defect pixel by 0: soft, 1: hard */

Definition at line 128 of file sonixj.c.

#define DELAY   0xdd

Definition at line 651 of file sonixj.c.

#define F_ILLUM   0x02 /* presence of illuminator */

Definition at line 115 of file sonixj.c.

#define F_PDN_INV   0x01 /* inverse pin S_PWR_DN / sn_xxx tables */

Definition at line 114 of file sonixj.c.

#define GAMMA_DEF   20
#define LED   0x08 /* output to pin LED */

Definition at line 122 of file sonixj.c.

#define MCK_SIZE_MASK   0x1f /* sensor master clock */

Definition at line 126 of file sonixj.c.

#define MODULE_NAME   "sonixj"

Definition at line 24 of file sonixj.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 22 of file sonixj.c.

#define QUALITY_DEF   70

Definition at line 73 of file sonixj.c.

#define QUALITY_MAX   90

Definition at line 72 of file sonixj.c.

#define QUALITY_MIN   25

Definition at line 71 of file sonixj.c.

#define S_PDN_INV   0x02 /* inverse pin S_PWR_DN */

Definition at line 120 of file sonixj.c.

#define S_PWR_DN   0x01 /* sensor power down */

Definition at line 119 of file sonixj.c.

#define SCL_SEL_OD   0x20 /* open-drain mode */

Definition at line 123 of file sonixj.c.

#define SEN_CLK_EN   0x20 /* enable sensor clock */

Definition at line 127 of file sonixj.c.

#define SYS_SEL_48M   0x40 /* system clock 0: 24MHz, 1: 48MHz */

Definition at line 124 of file sonixj.c.

#define V_TX_EN   0x04 /* video transfer enable */

Definition at line 121 of file sonixj.c.

#define WANT_REGULAR_AUTOGAIN

Definition at line 2805 of file sonixj.c.

Enumeration Type Documentation

enum e_ctrl
Enumerator:
BRIGHTNESS 
CONTRAST 
COLORS 
BLUE 
RED 
GAMMA 
EXPOSURE 
AUTOGAIN 
GAIN 
HFLIP 
VFLIP 
SHARPNESS 
ILLUM 
FREQ 
NCTRLS 

Definition at line 35 of file sonixj.c.

enum sensors
Enumerator:
CPIA2_SENSOR_410 
CPIA2_SENSOR_500 
OV9650_SENSOR 
S5K83A_SENSOR 
S5K4AA_SENSOR 
MT9M111_SENSOR 
PO1030_SENSOR 
OV7660_SENSOR 
SEN_OV2610 
SEN_OV2610AE 
SEN_OV3610 
SEN_OV6620 
SEN_OV6630 
SEN_OV66308AF 
SEN_OV7610 
SEN_OV7620 
SEN_OV7620AE 
SEN_OV7640 
SEN_OV7648 
SEN_OV7660 
SEN_OV7670 
SEN_OV76BE 
SEN_OV8610 
SEN_OV9600 
SENSOR_OV767x 
SENSOR_OV772x 
NSENSORS 
SENSOR_OV965x 
SENSOR_OV971x 
SENSOR_OV562x 
NSENSORS 
SENSOR_ADCM1700 
SENSOR_GC0307 
SENSOR_HV7131R 
SENSOR_MI0360 
SENSOR_MI0360B 
SENSOR_MO4000 
SENSOR_MT9V111 
SENSOR_OM6802 
SENSOR_OV7630 
SENSOR_OV7648 
SENSOR_OV7660 
SENSOR_PO1030 
SENSOR_PO2030N 
SENSOR_SOI768 
SENSOR_SP80708 
SENSOR_ICX098BQ 
SENSOR_LZ24BP 
SENSOR_MI0360 
SENSOR_MT9V111 
SENSOR_OV7660 
SENSOR_OV9630 
SENSOR_OM6802 
SENSOR_OTHER 
SENSOR_TAS5130A 
SENSOR_LT168G 
SENSOR_CX0342 
SENSOR_SOI763A 
NSENSORS 
SENSOR_HV7131R 
SENSOR_MI0360 
SENSOR_MI1310_SOC 
SENSOR_MI1320 
SENSOR_MI1320_SOC 
SENSOR_OV7660 
SENSOR_OV7670 
SENSOR_PO1200 
SENSOR_PO3130NC 
SENSOR_POxxxx 
NSENSORS 
SENSOR_ADCM2700 
SENSOR_CS2102 
SENSOR_CS2102K 
SENSOR_GC0303 
SENSOR_GC0305 
SENSOR_HDCS2020 
SENSOR_HV7131B 
SENSOR_HV7131R 
SENSOR_ICM105A 
SENSOR_MC501CB 
SENSOR_MT9V111_1 
SENSOR_MT9V111_3 
SENSOR_OV7620 
SENSOR_OV7630C 
SENSOR_PAS106 
SENSOR_PAS202B 
SENSOR_PB0330 
SENSOR_PO2030 
SENSOR_TAS5130C 
SENSOR_MAX 

Definition at line 93 of file sonixj.c.

Function Documentation

MODULE_AUTHOR ( "Jean-Fran├žois Moine <http://moinejf.free.fr>"  )
MODULE_DESCRIPTION ( "GSPCA/SONIX JPEG USB Camera Driver"  )
MODULE_DEVICE_TABLE ( usb  ,
device_table   
)
MODULE_LICENSE ( "GPL"  )
module_usb_driver ( sd_driver  )