/***************************************************************************
- * API for image sensors connected to the SN9C10x PC Camera Controllers *
+ * API for image sensors connected to the SN9C10[12] PC Camera Controllers *
* *
* Copyright (C) 2004 by Luca Risolia <luca.risolia@studio.unibo.it> *
* *
/* Each SN9C10X camera has proper PID/VID identifiers. Add them here in case.*/
#define SN9C102_ID_TABLE \
static const struct usb_device_id sn9c102_id_table[] = { \
- { USB_DEVICE(0x0c45, 0x6001), }, /* TAS5110C1B */ \
- { USB_DEVICE(0x0c45, 0x6005), }, /* TAS5110C1B */ \
- { USB_DEVICE(0x0c45, 0x6009), }, /* PAS106B */ \
- { USB_DEVICE(0x0c45, 0x600d), }, /* PAS106B */ \
- { USB_DEVICE(0x0c45, 0x6024), }, \
- { USB_DEVICE(0x0c45, 0x6025), }, /* TAS5130D1B and TAS5110C1B */ \
- { USB_DEVICE(0x0c45, 0x6028), }, /* PAS202BCB */ \
- { USB_DEVICE(0x0c45, 0x6029), }, /* PAS106B */ \
- { USB_DEVICE(0x0c45, 0x602a), }, /* HV7131[D|E1] */ \
- { USB_DEVICE(0x0c45, 0x602b), }, /* MI-0343 */ \
- { USB_DEVICE(0x0c45, 0x602c), }, /* OV7620 */ \
- { USB_DEVICE(0x0c45, 0x6030), }, /* MI03x */ \
- { USB_DEVICE(0x0c45, 0x6080), }, \
- { USB_DEVICE(0x0c45, 0x6082), }, /* MI0343 and MI0360 */ \
- { USB_DEVICE(0x0c45, 0x6083), }, /* HV7131[D|E1] */ \
- { USB_DEVICE(0x0c45, 0x6088), }, \
- { USB_DEVICE(0x0c45, 0x608a), }, \
- { USB_DEVICE(0x0c45, 0x608b), }, \
- { USB_DEVICE(0x0c45, 0x608c), }, /* HV7131x */ \
- { USB_DEVICE(0x0c45, 0x608e), }, /* CIS-VF10 */ \
- { USB_DEVICE(0x0c45, 0x608f), }, /* OV7630 */ \
- { USB_DEVICE(0x0c45, 0x60a0), }, \
- { USB_DEVICE(0x0c45, 0x60a2), }, \
- { USB_DEVICE(0x0c45, 0x60a3), }, \
- { USB_DEVICE(0x0c45, 0x60a8), }, /* PAS106B */ \
- { USB_DEVICE(0x0c45, 0x60aa), }, /* TAS5130D1B */ \
- { USB_DEVICE(0x0c45, 0x60ab), }, /* TAS5110C1B */ \
- { USB_DEVICE(0x0c45, 0x60ac), }, \
- { USB_DEVICE(0x0c45, 0x60ae), }, \
- { USB_DEVICE(0x0c45, 0x60af), }, /* PAS202BCB */ \
- { USB_DEVICE(0x0c45, 0x60b0), }, \
- { USB_DEVICE(0x0c45, 0x60b2), }, \
- { USB_DEVICE(0x0c45, 0x60b3), }, \
- { USB_DEVICE(0x0c45, 0x60b8), }, \
- { USB_DEVICE(0x0c45, 0x60ba), }, \
- { USB_DEVICE(0x0c45, 0x60bb), }, \
- { USB_DEVICE(0x0c45, 0x60bc), }, \
- { USB_DEVICE(0x0c45, 0x60be), }, \
+ { USB_DEVICE(0xc45, 0x6001), }, /* TAS5110C1B */ \
+ { USB_DEVICE(0xc45, 0x6005), }, /* TAS5110C1B */ \
+ { USB_DEVICE(0xc45, 0x6009), }, /* PAS106B */ \
+ { USB_DEVICE(0xc45, 0x600d), }, /* PAS106B */ \
+ { USB_DEVICE(0xc45, 0x6024), }, \
+ { USB_DEVICE(0xc45, 0x6025), }, /* TAS5130D1B and TAS5110C1B */ \
+ { USB_DEVICE(0xc45, 0x6028), }, /* PAS202BCB */ \
+ { USB_DEVICE(0xc45, 0x6029), }, /* PAS106B */ \
+ { USB_DEVICE(0xc45, 0x602a), }, /* HV7131[D|E1] */ \
+ { USB_DEVICE(0xc45, 0x602c), }, /* OV7620 */ \
+ { USB_DEVICE(0xc45, 0x6030), }, /* MI03 */ \
{ } \
};
SN9C102_I2C_3WIRES,
};
-#define SN9C102_I2C_SLAVEID_FICTITIOUS 0xff
-#define SN9C102_I2C_SLAVEID_UNAVAILABLE 0x00
-
struct sn9c102_sensor {
char name[32], /* sensor name */
maintainer[64]; /* name of the mantainer <email> */
/*
These identifiers must be provided if the image sensor implements
- the standard I2C protocol.
+ the standard I2C protocol. TASC sensors don't, although they have a
+ serial interface: so this is a case where the "raw" I2C version
+ could be helpful.
*/
u8 slave_read_id, slave_write_id; /* reg. 0x09 */
the list above. The returned value must follow the V4L2
specifications for the VIDIOC_G|C_CTRL ioctls. V4L2_CID_H|VCENTER
are not supported by this driver, so do not implement them. Also,
- you don't have to check whether the passed values are out of bounds,
- given that this is done by the core module.
+ passed values are NOT checked to see if they are out of bounds.
*/
struct v4l2_cropcap cropcap;
NOTE: in case, you must program the SN9C10X chip to get rid of
blank pixels or blank lines at the _start_ of each line or
frame after each HSYNC or VSYNC, so that the image starts with
- real RGB data (see regs 0x12, 0x13) (having set H_SIZE and,
+ real RGB data (see regs 0x12,0x13) (having set H_SIZE and,
V_SIZE you don't have to care about blank pixels or blank
lines at the end of each line or frame).
*/
struct v4l2_pix_format pix_format;
/*
- What you have to define here are: 1) initial 'width' and 'height' of
- the target rectangle 2) the initial 'pixelformat', which can be
- either V4L2_PIX_FMT_SN9C10X (for compressed video) or
- V4L2_PIX_FMT_SBGGR8 3) 'priv', which we'll be used to indicate the
- number of bits per pixel for uncompressed video, 8 or 9 (despite the
- current value of 'pixelformat').
+ What you have to define here are: initial 'width' and 'height' of
+ the target rectangle, the bayer 'pixelformat' and 'priv' which we'll
+ be used to indicate the number of bits per pixel, 8 or 9.
+ Nothing more.
NOTE 1: both 'width' and 'height' _must_ be either 1/1 or 1/2 or 1/4
of cropcap.defrect.width and cropcap.defrect.height. I
suggest 1/1.
- NOTE 2: The initial compression quality is defined by the first bit
- of reg 0x17 during the initialization of the image sensor.
- NOTE 3: as said above, you have to program the SN9C10X chip to get
+ NOTE 2: as said above, you have to program the SN9C10X chip to get
rid of any blank pixels, so that the output of the sensor
matches the RGB bayer sequence (i.e. BGBGBG...GRGRGR).
*/
struct v4l2_rect _rect;
};
-/*****************************************************************************/
-
-/* Private ioctl's for control settings supported by some image sensors */
-#define SN9C102_V4L2_CID_DAC_MAGNITUDE V4L2_CID_PRIVATE_BASE
-#define SN9C102_V4L2_CID_DAC_SIGN V4L2_CID_PRIVATE_BASE + 1
-#define SN9C102_V4L2_CID_GREEN_BALANCE V4L2_CID_PRIVATE_BASE + 2
-
#endif /* _SN9C102_SENSOR_H_ */