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

Go to the source code of this file.

Data Structures

struct  cam_params
 
struct  sd
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define MODULE_NAME   "cpia1"
 
#define MAGIC_0   0x19
 
#define MAGIC_1   0x68
 
#define DATA_IN   0xc0
 
#define DATA_OUT   0x40
 
#define VIDEOSIZE_QCIF   0 /* 176x144 */
 
#define VIDEOSIZE_CIF   1 /* 352x288 */
 
#define SUBSAMPLE_420   0
 
#define SUBSAMPLE_422   1
 
#define YUVORDER_YUYV   0
 
#define YUVORDER_UYVY   1
 
#define NOT_COMPRESSED   0
 
#define COMPRESSED   1
 
#define NO_DECIMATION   0
 
#define DECIMATION_ENAB   1
 
#define EOI   0xff /* End Of Image */
 
#define EOL   0xfd /* End Of Line */
 
#define FRAME_HEADER_SIZE   64
 
#define CPIA_GRAB_SINGLE   0
 
#define CPIA_GRAB_CONTINEOUS   1
 
#define CPIA_COMPRESSION_NONE   0
 
#define CPIA_COMPRESSION_AUTO   1
 
#define CPIA_COMPRESSION_MANUAL   2
 
#define CPIA_COMPRESSION_TARGET_QUALITY   0
 
#define CPIA_COMPRESSION_TARGET_FRAMERATE   1
 
#define SYSTEMSTATE   0
 
#define GRABSTATE   1
 
#define STREAMSTATE   2
 
#define FATALERROR   3
 
#define CMDERROR   4
 
#define DEBUGFLAGS   5
 
#define VPSTATUS   6
 
#define ERRORCODE   7
 
#define UNINITIALISED_STATE   0
 
#define PASS_THROUGH_STATE   1
 
#define LO_POWER_STATE   2
 
#define HI_POWER_STATE   3
 
#define WARM_BOOT_STATE   4
 
#define GRAB_IDLE   0
 
#define GRAB_ACTIVE   1
 
#define GRAB_DONE   2
 
#define STREAM_NOT_READY   0
 
#define STREAM_READY   1
 
#define STREAM_OPEN   2
 
#define STREAM_PAUSED   3
 
#define STREAM_FINISHED   4
 
#define CPIA_FLAG   1
 
#define SYSTEM_FLAG   2
 
#define INT_CTRL_FLAG   4
 
#define PROCESS_FLAG   8
 
#define COM_FLAG   16
 
#define VP_CTRL_FLAG   32
 
#define CAPTURE_FLAG   64
 
#define DEBUG_FLAG   128
 
#define VP_STATE_OK   0x00
 
#define VP_STATE_FAILED_VIDEOINIT   0x01
 
#define VP_STATE_FAILED_AECACBINIT   0x02
 
#define VP_STATE_AEC_MAX   0x04
 
#define VP_STATE_ACB_BMAX   0x08
 
#define VP_STATE_ACB_RMIN   0x10
 
#define VP_STATE_ACB_GMIN   0x20
 
#define VP_STATE_ACB_RMAX   0x40
 
#define VP_STATE_ACB_GMAX   0x80
 
#define COMP_RED   220
 
#define COMP_GREEN1   214
 
#define COMP_GREEN2   COMP_GREEN1
 
#define COMP_BLUE   230
 
#define EXPOSURE_VERY_LIGHT   0
 
#define EXPOSURE_LIGHT   1
 
#define EXPOSURE_NORMAL   2
 
#define EXPOSURE_DARK   3
 
#define EXPOSURE_VERY_DARK   4
 
#define CPIA_MODULE_CPIA   (0 << 5)
 
#define CPIA_MODULE_SYSTEM   (1 << 5)
 
#define CPIA_MODULE_VP_CTRL   (5 << 5)
 
#define CPIA_MODULE_CAPTURE   (6 << 5)
 
#define CPIA_MODULE_DEBUG   (7 << 5)
 
#define INPUT   (DATA_IN << 8)
 
#define OUTPUT   (DATA_OUT << 8)
 
#define CPIA_COMMAND_GetCPIAVersion   (INPUT | CPIA_MODULE_CPIA | 1)
 
#define CPIA_COMMAND_GetPnPID   (INPUT | CPIA_MODULE_CPIA | 2)
 
#define CPIA_COMMAND_GetCameraStatus   (INPUT | CPIA_MODULE_CPIA | 3)
 
#define CPIA_COMMAND_GotoHiPower   (OUTPUT | CPIA_MODULE_CPIA | 4)
 
#define CPIA_COMMAND_GotoLoPower   (OUTPUT | CPIA_MODULE_CPIA | 5)
 
#define CPIA_COMMAND_GotoSuspend   (OUTPUT | CPIA_MODULE_CPIA | 7)
 
#define CPIA_COMMAND_GotoPassThrough   (OUTPUT | CPIA_MODULE_CPIA | 8)
 
#define CPIA_COMMAND_ModifyCameraStatus   (OUTPUT | CPIA_MODULE_CPIA | 10)
 
#define CPIA_COMMAND_ReadVCRegs   (INPUT | CPIA_MODULE_SYSTEM | 1)
 
#define CPIA_COMMAND_WriteVCReg   (OUTPUT | CPIA_MODULE_SYSTEM | 2)
 
#define CPIA_COMMAND_ReadMCPorts   (INPUT | CPIA_MODULE_SYSTEM | 3)
 
#define CPIA_COMMAND_WriteMCPort   (OUTPUT | CPIA_MODULE_SYSTEM | 4)
 
#define CPIA_COMMAND_SetBaudRate   (OUTPUT | CPIA_MODULE_SYSTEM | 5)
 
#define CPIA_COMMAND_SetECPTiming   (OUTPUT | CPIA_MODULE_SYSTEM | 6)
 
#define CPIA_COMMAND_ReadIDATA   (INPUT | CPIA_MODULE_SYSTEM | 7)
 
#define CPIA_COMMAND_WriteIDATA   (OUTPUT | CPIA_MODULE_SYSTEM | 8)
 
#define CPIA_COMMAND_GenericCall   (OUTPUT | CPIA_MODULE_SYSTEM | 9)
 
#define CPIA_COMMAND_I2CStart   (OUTPUT | CPIA_MODULE_SYSTEM | 10)
 
#define CPIA_COMMAND_I2CStop   (OUTPUT | CPIA_MODULE_SYSTEM | 11)
 
#define CPIA_COMMAND_I2CWrite   (OUTPUT | CPIA_MODULE_SYSTEM | 12)
 
#define CPIA_COMMAND_I2CRead   (INPUT | CPIA_MODULE_SYSTEM | 13)
 
#define CPIA_COMMAND_GetVPVersion   (INPUT | CPIA_MODULE_VP_CTRL | 1)
 
#define CPIA_COMMAND_ResetFrameCounter   (INPUT | CPIA_MODULE_VP_CTRL | 2)
 
#define CPIA_COMMAND_SetColourParams   (OUTPUT | CPIA_MODULE_VP_CTRL | 3)
 
#define CPIA_COMMAND_SetExposure   (OUTPUT | CPIA_MODULE_VP_CTRL | 4)
 
#define CPIA_COMMAND_SetColourBalance   (OUTPUT | CPIA_MODULE_VP_CTRL | 6)
 
#define CPIA_COMMAND_SetSensorFPS   (OUTPUT | CPIA_MODULE_VP_CTRL | 7)
 
#define CPIA_COMMAND_SetVPDefaults   (OUTPUT | CPIA_MODULE_VP_CTRL | 8)
 
#define CPIA_COMMAND_SetApcor   (OUTPUT | CPIA_MODULE_VP_CTRL | 9)
 
#define CPIA_COMMAND_SetFlickerCtrl   (OUTPUT | CPIA_MODULE_VP_CTRL | 10)
 
#define CPIA_COMMAND_SetVLOffset   (OUTPUT | CPIA_MODULE_VP_CTRL | 11)
 
#define CPIA_COMMAND_GetColourParams   (INPUT | CPIA_MODULE_VP_CTRL | 16)
 
#define CPIA_COMMAND_GetColourBalance   (INPUT | CPIA_MODULE_VP_CTRL | 17)
 
#define CPIA_COMMAND_GetExposure   (INPUT | CPIA_MODULE_VP_CTRL | 18)
 
#define CPIA_COMMAND_SetSensorMatrix   (OUTPUT | CPIA_MODULE_VP_CTRL | 19)
 
#define CPIA_COMMAND_ColourBars   (OUTPUT | CPIA_MODULE_VP_CTRL | 25)
 
#define CPIA_COMMAND_ReadVPRegs   (INPUT | CPIA_MODULE_VP_CTRL | 30)
 
#define CPIA_COMMAND_WriteVPReg   (OUTPUT | CPIA_MODULE_VP_CTRL | 31)
 
#define CPIA_COMMAND_GrabFrame   (OUTPUT | CPIA_MODULE_CAPTURE | 1)
 
#define CPIA_COMMAND_UploadFrame   (OUTPUT | CPIA_MODULE_CAPTURE | 2)
 
#define CPIA_COMMAND_SetGrabMode   (OUTPUT | CPIA_MODULE_CAPTURE | 3)
 
#define CPIA_COMMAND_InitStreamCap   (OUTPUT | CPIA_MODULE_CAPTURE | 4)
 
#define CPIA_COMMAND_FiniStreamCap   (OUTPUT | CPIA_MODULE_CAPTURE | 5)
 
#define CPIA_COMMAND_StartStreamCap   (OUTPUT | CPIA_MODULE_CAPTURE | 6)
 
#define CPIA_COMMAND_EndStreamCap   (OUTPUT | CPIA_MODULE_CAPTURE | 7)
 
#define CPIA_COMMAND_SetFormat   (OUTPUT | CPIA_MODULE_CAPTURE | 8)
 
#define CPIA_COMMAND_SetROI   (OUTPUT | CPIA_MODULE_CAPTURE | 9)
 
#define CPIA_COMMAND_SetCompression   (OUTPUT | CPIA_MODULE_CAPTURE | 10)
 
#define CPIA_COMMAND_SetCompressionTarget   (OUTPUT | CPIA_MODULE_CAPTURE | 11)
 
#define CPIA_COMMAND_SetYUVThresh   (OUTPUT | CPIA_MODULE_CAPTURE | 12)
 
#define CPIA_COMMAND_SetCompressionParams   (OUTPUT | CPIA_MODULE_CAPTURE | 13)
 
#define CPIA_COMMAND_DiscardFrame   (OUTPUT | CPIA_MODULE_CAPTURE | 14)
 
#define CPIA_COMMAND_GrabReset   (OUTPUT | CPIA_MODULE_CAPTURE | 15)
 
#define CPIA_COMMAND_OutputRS232   (OUTPUT | CPIA_MODULE_DEBUG | 1)
 
#define CPIA_COMMAND_AbortProcess   (OUTPUT | CPIA_MODULE_DEBUG | 4)
 
#define CPIA_COMMAND_SetDramPage   (OUTPUT | CPIA_MODULE_DEBUG | 5)
 
#define CPIA_COMMAND_StartDramUpload   (OUTPUT | CPIA_MODULE_DEBUG | 6)
 
#define CPIA_COMMAND_StartDummyDtream   (OUTPUT | CPIA_MODULE_DEBUG | 8)
 
#define CPIA_COMMAND_AbortStream   (OUTPUT | CPIA_MODULE_DEBUG | 9)
 
#define CPIA_COMMAND_DownloadDRAM   (OUTPUT | CPIA_MODULE_DEBUG | 10)
 
#define CPIA_COMMAND_Null   (OUTPUT | CPIA_MODULE_DEBUG | 11)
 
#define ROUND_UP_EXP_FOR_FLICKER   15
 
#define MAX_EXP   302
 
#define MAX_EXP_102   255
 
#define LOW_EXP   140
 
#define VERY_LOW_EXP   70
 
#define TC   94
 
#define EXP_ACC_DARK   50
 
#define EXP_ACC_LIGHT   90
 
#define HIGH_COMP_102   160
 
#define MAX_COMP   239
 
#define DARK_TIME   3
 
#define LIGHT_TIME   3
 
#define FIRMWARE_VERSION(x, y)
 
#define CPIA1_CID_COMP_TARGET   (V4L2_CTRL_CLASS_USER + 0x1000)
 
#define BRIGHTNESS_DEF   50
 
#define CONTRAST_DEF   48
 
#define SATURATION_DEF   50
 
#define FREQ_DEF   V4L2_CID_POWER_LINE_FREQUENCY_50HZ
 
#define ILLUMINATORS_1_DEF   0
 
#define ILLUMINATORS_2_DEF   0
 
#define COMP_TARGET_DEF   CPIA_COMPRESSION_TARGET_QUALITY
 
#define FLICKER_MAX_EXPOSURE   250
 
#define FLICKER_ALLOWABLE_OVER_EXPOSURE   146
 
#define FLICKER_BRIGHTNESS_CONSTANT   59
 
#define COMPGAIN(base, curexp, newexp)   (u8)(128 + (((u32)(2*(base-128)*curexp + newexp)) / (2 * newexp)))
 
#define EXP_FROM_COMP(basecomp, curcomp, curexp)   (u16)(((u32)(curexp * (u8)(curcomp + 128)) / (u8)(basecomp - 128)))
 

Functions

 MODULE_AUTHOR ("Hans de Goede <[email protected]>")
 
 MODULE_DESCRIPTION ("Vision CPiA")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DEVICE_TABLE (usb, device_table)
 
 module_usb_driver (sd_driver)
 

Macro Definition Documentation

#define BRIGHTNESS_DEF   50

Definition at line 229 of file cpia1.c.

#define CAPTURE_FLAG   64

Definition at line 106 of file cpia1.c.

#define CMDERROR   4

Definition at line 75 of file cpia1.c.

#define COM_FLAG   16

Definition at line 104 of file cpia1.c.

#define COMP_BLUE   230

Definition at line 126 of file cpia1.c.

#define COMP_GREEN1   214

Definition at line 124 of file cpia1.c.

#define COMP_GREEN2   COMP_GREEN1

Definition at line 125 of file cpia1.c.

#define COMP_RED   220

Definition at line 123 of file cpia1.c.

#define COMP_TARGET_DEF   CPIA_COMPRESSION_TARGET_QUALITY

Definition at line 235 of file cpia1.c.

#define COMPGAIN (   base,
  curexp,
  newexp 
)    (u8)(128 + (((u32)(2*(base-128)*curexp + newexp)) / (2 * newexp)))
#define COMPRESSED   1

Definition at line 52 of file cpia1.c.

#define CONTRAST_DEF   48

Definition at line 230 of file cpia1.c.

#define CPIA1_CID_COMP_TARGET   (V4L2_CTRL_CLASS_USER + 0x1000)

Definition at line 228 of file cpia1.c.

#define CPIA_COMMAND_AbortProcess   (OUTPUT | CPIA_MODULE_DEBUG | 4)

Definition at line 202 of file cpia1.c.

#define CPIA_COMMAND_AbortStream   (OUTPUT | CPIA_MODULE_DEBUG | 9)

Definition at line 206 of file cpia1.c.

#define CPIA_COMMAND_ColourBars   (OUTPUT | CPIA_MODULE_VP_CTRL | 25)

Definition at line 181 of file cpia1.c.

#define CPIA_COMMAND_DiscardFrame   (OUTPUT | CPIA_MODULE_CAPTURE | 14)

Definition at line 198 of file cpia1.c.

#define CPIA_COMMAND_DownloadDRAM   (OUTPUT | CPIA_MODULE_DEBUG | 10)

Definition at line 207 of file cpia1.c.

#define CPIA_COMMAND_EndStreamCap   (OUTPUT | CPIA_MODULE_CAPTURE | 7)

Definition at line 191 of file cpia1.c.

#define CPIA_COMMAND_FiniStreamCap   (OUTPUT | CPIA_MODULE_CAPTURE | 5)

Definition at line 189 of file cpia1.c.

#define CPIA_COMMAND_GenericCall   (OUTPUT | CPIA_MODULE_SYSTEM | 9)

Definition at line 161 of file cpia1.c.

#define CPIA_COMMAND_GetCameraStatus   (INPUT | CPIA_MODULE_CPIA | 3)

Definition at line 146 of file cpia1.c.

#define CPIA_COMMAND_GetColourBalance   (INPUT | CPIA_MODULE_VP_CTRL | 17)

Definition at line 178 of file cpia1.c.

#define CPIA_COMMAND_GetColourParams   (INPUT | CPIA_MODULE_VP_CTRL | 16)

Definition at line 177 of file cpia1.c.

#define CPIA_COMMAND_GetCPIAVersion   (INPUT | CPIA_MODULE_CPIA | 1)

Definition at line 144 of file cpia1.c.

#define CPIA_COMMAND_GetExposure   (INPUT | CPIA_MODULE_VP_CTRL | 18)

Definition at line 179 of file cpia1.c.

#define CPIA_COMMAND_GetPnPID   (INPUT | CPIA_MODULE_CPIA | 2)

Definition at line 145 of file cpia1.c.

#define CPIA_COMMAND_GetVPVersion   (INPUT | CPIA_MODULE_VP_CTRL | 1)

Definition at line 167 of file cpia1.c.

#define CPIA_COMMAND_GotoHiPower   (OUTPUT | CPIA_MODULE_CPIA | 4)

Definition at line 147 of file cpia1.c.

#define CPIA_COMMAND_GotoLoPower   (OUTPUT | CPIA_MODULE_CPIA | 5)

Definition at line 148 of file cpia1.c.

#define CPIA_COMMAND_GotoPassThrough   (OUTPUT | CPIA_MODULE_CPIA | 8)

Definition at line 150 of file cpia1.c.

#define CPIA_COMMAND_GotoSuspend   (OUTPUT | CPIA_MODULE_CPIA | 7)

Definition at line 149 of file cpia1.c.

#define CPIA_COMMAND_GrabFrame   (OUTPUT | CPIA_MODULE_CAPTURE | 1)

Definition at line 185 of file cpia1.c.

#define CPIA_COMMAND_GrabReset   (OUTPUT | CPIA_MODULE_CAPTURE | 15)

Definition at line 199 of file cpia1.c.

#define CPIA_COMMAND_I2CRead   (INPUT | CPIA_MODULE_SYSTEM | 13)

Definition at line 165 of file cpia1.c.

#define CPIA_COMMAND_I2CStart   (OUTPUT | CPIA_MODULE_SYSTEM | 10)

Definition at line 162 of file cpia1.c.

#define CPIA_COMMAND_I2CStop   (OUTPUT | CPIA_MODULE_SYSTEM | 11)

Definition at line 163 of file cpia1.c.

#define CPIA_COMMAND_I2CWrite   (OUTPUT | CPIA_MODULE_SYSTEM | 12)

Definition at line 164 of file cpia1.c.

#define CPIA_COMMAND_InitStreamCap   (OUTPUT | CPIA_MODULE_CAPTURE | 4)

Definition at line 188 of file cpia1.c.

#define CPIA_COMMAND_ModifyCameraStatus   (OUTPUT | CPIA_MODULE_CPIA | 10)

Definition at line 151 of file cpia1.c.

#define CPIA_COMMAND_Null   (OUTPUT | CPIA_MODULE_DEBUG | 11)

Definition at line 208 of file cpia1.c.

#define CPIA_COMMAND_OutputRS232   (OUTPUT | CPIA_MODULE_DEBUG | 1)

Definition at line 201 of file cpia1.c.

#define CPIA_COMMAND_ReadIDATA   (INPUT | CPIA_MODULE_SYSTEM | 7)

Definition at line 159 of file cpia1.c.

#define CPIA_COMMAND_ReadMCPorts   (INPUT | CPIA_MODULE_SYSTEM | 3)

Definition at line 155 of file cpia1.c.

#define CPIA_COMMAND_ReadVCRegs   (INPUT | CPIA_MODULE_SYSTEM | 1)

Definition at line 153 of file cpia1.c.

#define CPIA_COMMAND_ReadVPRegs   (INPUT | CPIA_MODULE_VP_CTRL | 30)

Definition at line 182 of file cpia1.c.

#define CPIA_COMMAND_ResetFrameCounter   (INPUT | CPIA_MODULE_VP_CTRL | 2)

Definition at line 168 of file cpia1.c.

#define CPIA_COMMAND_SetApcor   (OUTPUT | CPIA_MODULE_VP_CTRL | 9)

Definition at line 174 of file cpia1.c.

#define CPIA_COMMAND_SetBaudRate   (OUTPUT | CPIA_MODULE_SYSTEM | 5)

Definition at line 157 of file cpia1.c.

#define CPIA_COMMAND_SetColourBalance   (OUTPUT | CPIA_MODULE_VP_CTRL | 6)

Definition at line 171 of file cpia1.c.

#define CPIA_COMMAND_SetColourParams   (OUTPUT | CPIA_MODULE_VP_CTRL | 3)

Definition at line 169 of file cpia1.c.

#define CPIA_COMMAND_SetCompression   (OUTPUT | CPIA_MODULE_CAPTURE | 10)

Definition at line 194 of file cpia1.c.

#define CPIA_COMMAND_SetCompressionParams   (OUTPUT | CPIA_MODULE_CAPTURE | 13)

Definition at line 197 of file cpia1.c.

#define CPIA_COMMAND_SetCompressionTarget   (OUTPUT | CPIA_MODULE_CAPTURE | 11)

Definition at line 195 of file cpia1.c.

#define CPIA_COMMAND_SetDramPage   (OUTPUT | CPIA_MODULE_DEBUG | 5)

Definition at line 203 of file cpia1.c.

#define CPIA_COMMAND_SetECPTiming   (OUTPUT | CPIA_MODULE_SYSTEM | 6)

Definition at line 158 of file cpia1.c.

#define CPIA_COMMAND_SetExposure   (OUTPUT | CPIA_MODULE_VP_CTRL | 4)

Definition at line 170 of file cpia1.c.

#define CPIA_COMMAND_SetFlickerCtrl   (OUTPUT | CPIA_MODULE_VP_CTRL | 10)

Definition at line 175 of file cpia1.c.

#define CPIA_COMMAND_SetFormat   (OUTPUT | CPIA_MODULE_CAPTURE | 8)

Definition at line 192 of file cpia1.c.

#define CPIA_COMMAND_SetGrabMode   (OUTPUT | CPIA_MODULE_CAPTURE | 3)

Definition at line 187 of file cpia1.c.

#define CPIA_COMMAND_SetROI   (OUTPUT | CPIA_MODULE_CAPTURE | 9)

Definition at line 193 of file cpia1.c.

#define CPIA_COMMAND_SetSensorFPS   (OUTPUT | CPIA_MODULE_VP_CTRL | 7)

Definition at line 172 of file cpia1.c.

#define CPIA_COMMAND_SetSensorMatrix   (OUTPUT | CPIA_MODULE_VP_CTRL | 19)

Definition at line 180 of file cpia1.c.

#define CPIA_COMMAND_SetVLOffset   (OUTPUT | CPIA_MODULE_VP_CTRL | 11)

Definition at line 176 of file cpia1.c.

#define CPIA_COMMAND_SetVPDefaults   (OUTPUT | CPIA_MODULE_VP_CTRL | 8)

Definition at line 173 of file cpia1.c.

#define CPIA_COMMAND_SetYUVThresh   (OUTPUT | CPIA_MODULE_CAPTURE | 12)

Definition at line 196 of file cpia1.c.

#define CPIA_COMMAND_StartDramUpload   (OUTPUT | CPIA_MODULE_DEBUG | 6)

Definition at line 204 of file cpia1.c.

#define CPIA_COMMAND_StartDummyDtream   (OUTPUT | CPIA_MODULE_DEBUG | 8)

Definition at line 205 of file cpia1.c.

#define CPIA_COMMAND_StartStreamCap   (OUTPUT | CPIA_MODULE_CAPTURE | 6)

Definition at line 190 of file cpia1.c.

#define CPIA_COMMAND_UploadFrame   (OUTPUT | CPIA_MODULE_CAPTURE | 2)

Definition at line 186 of file cpia1.c.

#define CPIA_COMMAND_WriteIDATA   (OUTPUT | CPIA_MODULE_SYSTEM | 8)

Definition at line 160 of file cpia1.c.

#define CPIA_COMMAND_WriteMCPort   (OUTPUT | CPIA_MODULE_SYSTEM | 4)

Definition at line 156 of file cpia1.c.

#define CPIA_COMMAND_WriteVCReg   (OUTPUT | CPIA_MODULE_SYSTEM | 2)

Definition at line 154 of file cpia1.c.

#define CPIA_COMMAND_WriteVPReg   (OUTPUT | CPIA_MODULE_VP_CTRL | 31)

Definition at line 183 of file cpia1.c.

#define CPIA_COMPRESSION_AUTO   1

Definition at line 65 of file cpia1.c.

#define CPIA_COMPRESSION_MANUAL   2

Definition at line 66 of file cpia1.c.

#define CPIA_COMPRESSION_NONE   0

Definition at line 64 of file cpia1.c.

#define CPIA_COMPRESSION_TARGET_FRAMERATE   1

Definition at line 68 of file cpia1.c.

#define CPIA_COMPRESSION_TARGET_QUALITY   0

Definition at line 67 of file cpia1.c.

#define CPIA_FLAG   1

Definition at line 100 of file cpia1.c.

#define CPIA_GRAB_CONTINEOUS   1

Definition at line 61 of file cpia1.c.

#define CPIA_GRAB_SINGLE   0

Definition at line 60 of file cpia1.c.

#define CPIA_MODULE_CAPTURE   (6 << 5)

Definition at line 138 of file cpia1.c.

#define CPIA_MODULE_CPIA   (0 << 5)

Definition at line 135 of file cpia1.c.

#define CPIA_MODULE_DEBUG   (7 << 5)

Definition at line 139 of file cpia1.c.

#define CPIA_MODULE_SYSTEM   (1 << 5)

Definition at line 136 of file cpia1.c.

#define CPIA_MODULE_VP_CTRL   (5 << 5)

Definition at line 137 of file cpia1.c.

#define DARK_TIME   3

Definition at line 222 of file cpia1.c.

#define DATA_IN   0xc0

Definition at line 43 of file cpia1.c.

#define DATA_OUT   0x40

Definition at line 44 of file cpia1.c.

#define DEBUG_FLAG   128

Definition at line 107 of file cpia1.c.

#define DEBUGFLAGS   5

Definition at line 76 of file cpia1.c.

#define DECIMATION_ENAB   1

Definition at line 54 of file cpia1.c.

#define EOI   0xff /* End Of Image */

Definition at line 55 of file cpia1.c.

#define EOL   0xfd /* End Of Line */

Definition at line 56 of file cpia1.c.

#define ERRORCODE   7

Definition at line 78 of file cpia1.c.

#define EXP_ACC_DARK   50

Definition at line 218 of file cpia1.c.

#define EXP_ACC_LIGHT   90

Definition at line 219 of file cpia1.c.

#define EXP_FROM_COMP (   basecomp,
  curcomp,
  curexp 
)    (u16)(((u32)(curexp * (u8)(curcomp + 128)) / (u8)(basecomp - 128)))
#define EXPOSURE_DARK   3

Definition at line 132 of file cpia1.c.

#define EXPOSURE_LIGHT   1

Definition at line 130 of file cpia1.c.

#define EXPOSURE_NORMAL   2

Definition at line 131 of file cpia1.c.

#define EXPOSURE_VERY_DARK   4

Definition at line 133 of file cpia1.c.

#define EXPOSURE_VERY_LIGHT   0

Definition at line 129 of file cpia1.c.

#define FATALERROR   3

Definition at line 74 of file cpia1.c.

#define FIRMWARE_VERSION (   x,
  y 
)
Value:
(sd->params.version.firmwareVersion == (x) && \
sd->params.version.firmwareRevision == (y))

Definition at line 225 of file cpia1.c.

#define FLICKER_ALLOWABLE_OVER_EXPOSURE   146

Definition at line 604 of file cpia1.c.

#define FLICKER_BRIGHTNESS_CONSTANT   59

Definition at line 605 of file cpia1.c.

#define FLICKER_MAX_EXPOSURE   250

Definition at line 603 of file cpia1.c.

#define FRAME_HEADER_SIZE   64

Definition at line 57 of file cpia1.c.

#define FREQ_DEF   V4L2_CID_POWER_LINE_FREQUENCY_50HZ

Definition at line 232 of file cpia1.c.

#define GRAB_ACTIVE   1

Definition at line 89 of file cpia1.c.

#define GRAB_DONE   2

Definition at line 90 of file cpia1.c.

#define GRAB_IDLE   0

Definition at line 88 of file cpia1.c.

#define GRABSTATE   1

Definition at line 72 of file cpia1.c.

#define HI_POWER_STATE   3

Definition at line 84 of file cpia1.c.

#define HIGH_COMP_102   160

Definition at line 220 of file cpia1.c.

#define ILLUMINATORS_1_DEF   0

Definition at line 233 of file cpia1.c.

#define ILLUMINATORS_2_DEF   0

Definition at line 234 of file cpia1.c.

#define INPUT   (DATA_IN << 8)

Definition at line 141 of file cpia1.c.

#define INT_CTRL_FLAG   4

Definition at line 102 of file cpia1.c.

#define LIGHT_TIME   3

Definition at line 223 of file cpia1.c.

#define LO_POWER_STATE   2

Definition at line 83 of file cpia1.c.

#define LOW_EXP   140

Definition at line 215 of file cpia1.c.

#define MAGIC_0   0x19

Definition at line 41 of file cpia1.c.

#define MAGIC_1   0x68

Definition at line 42 of file cpia1.c.

#define MAX_COMP   239

Definition at line 221 of file cpia1.c.

#define MAX_EXP   302

Definition at line 213 of file cpia1.c.

#define MAX_EXP_102   255

Definition at line 214 of file cpia1.c.

#define MODULE_NAME   "cpia1"

Definition at line 31 of file cpia1.c.

#define NO_DECIMATION   0

Definition at line 53 of file cpia1.c.

#define NOT_COMPRESSED   0

Definition at line 51 of file cpia1.c.

#define OUTPUT   (DATA_OUT << 8)

Definition at line 142 of file cpia1.c.

#define PASS_THROUGH_STATE   1

Definition at line 82 of file cpia1.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 29 of file cpia1.c.

#define PROCESS_FLAG   8

Definition at line 103 of file cpia1.c.

#define ROUND_UP_EXP_FOR_FLICKER   15

Definition at line 210 of file cpia1.c.

#define SATURATION_DEF   50

Definition at line 231 of file cpia1.c.

#define STREAM_FINISHED   4

Definition at line 97 of file cpia1.c.

#define STREAM_NOT_READY   0

Definition at line 93 of file cpia1.c.

#define STREAM_OPEN   2

Definition at line 95 of file cpia1.c.

#define STREAM_PAUSED   3

Definition at line 96 of file cpia1.c.

#define STREAM_READY   1

Definition at line 94 of file cpia1.c.

#define STREAMSTATE   2

Definition at line 73 of file cpia1.c.

#define SUBSAMPLE_420   0

Definition at line 47 of file cpia1.c.

#define SUBSAMPLE_422   1

Definition at line 48 of file cpia1.c.

#define SYSTEM_FLAG   2

Definition at line 101 of file cpia1.c.

#define SYSTEMSTATE   0

Definition at line 71 of file cpia1.c.

#define TC   94

Definition at line 217 of file cpia1.c.

#define UNINITIALISED_STATE   0

Definition at line 81 of file cpia1.c.

#define VERY_LOW_EXP   70

Definition at line 216 of file cpia1.c.

#define VIDEOSIZE_CIF   1 /* 352x288 */

Definition at line 46 of file cpia1.c.

#define VIDEOSIZE_QCIF   0 /* 176x144 */

Definition at line 45 of file cpia1.c.

#define VP_CTRL_FLAG   32

Definition at line 105 of file cpia1.c.

#define VP_STATE_ACB_BMAX   0x08

Definition at line 115 of file cpia1.c.

#define VP_STATE_ACB_GMAX   0x80

Definition at line 120 of file cpia1.c.

#define VP_STATE_ACB_GMIN   0x20

Definition at line 118 of file cpia1.c.

#define VP_STATE_ACB_RMAX   0x40

Definition at line 119 of file cpia1.c.

#define VP_STATE_ACB_RMIN   0x10

Definition at line 117 of file cpia1.c.

#define VP_STATE_AEC_MAX   0x04

Definition at line 114 of file cpia1.c.

#define VP_STATE_FAILED_AECACBINIT   0x02

Definition at line 113 of file cpia1.c.

#define VP_STATE_FAILED_VIDEOINIT   0x01

Definition at line 112 of file cpia1.c.

#define VP_STATE_OK   0x00

Definition at line 110 of file cpia1.c.

#define VPSTATUS   6

Definition at line 77 of file cpia1.c.

#define WARM_BOOT_STATE   4

Definition at line 85 of file cpia1.c.

#define YUVORDER_UYVY   1

Definition at line 50 of file cpia1.c.

#define YUVORDER_YUYV   0

Definition at line 49 of file cpia1.c.

Function Documentation

MODULE_AUTHOR ( "Hans de Goede <[email protected]>"  )
MODULE_DESCRIPTION ( "Vision CPiA"  )
MODULE_DEVICE_TABLE ( usb  ,
device_table   
)
MODULE_LICENSE ( "GPL"  )
module_usb_driver ( sd_driver  )