From 41fc665b267be50fef40573b8977e7e87ba98ca7 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 4 Nov 2006 09:22:27 -0300 Subject: A couple of V4L2 defines needed by Cafe Camara driver From: Jonathan Corbet Two defines for V4L2, needed by the Cafe camera driver: 1) Add the RGB444 image format 2) Add the "init" internal command which is separate from "reset". Signed-off-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab --- linux/include/linux/videodev2.h | 1 + linux/include/media/v4l2-common.h | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'linux/include') diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index bd484d60a..b3c297b7b 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -244,6 +244,7 @@ struct v4l2_pix_format #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ #define V4L2_PIX_FMT_HM12 v4l2_fourcc('H','M','1','2') /* 8 YUV 4:2:0 16x16 macroblocks */ +#define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R','4','4','4') /* 16 xxxxrrrr ggggbbbb */ /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ diff --git a/linux/include/media/v4l2-common.h b/linux/include/media/v4l2-common.h index ce7df478d..8d47a9c2a 100644 --- a/linux/include/media/v4l2-common.h +++ b/linux/include/media/v4l2-common.h @@ -257,4 +257,8 @@ struct v4l2_crystal_freq { If the frequency is not supported, then -EINVAL is returned. */ #define VIDIOC_INT_S_CRYSTAL_FREQ _IOW ('d', 113, struct v4l2_crystal_freq) +/* Initialize the sensor registors to some sort of reasonable + default values. */ +#define VIDIOC_INT_INIT _IOW ('d', 114, u32) + #endif /* V4L2_COMMON_H_ */ -- cgit v1.2.3 From c117384cb5b3810e76bb4e22990506f87910775d Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 4 Nov 2006 09:25:53 -0300 Subject: Marvell 88ALP01 "cafe" driver From: Jonathan Corbet A driver for the Marvell M88ALP01 "CAFE" CMOS integrated camera controller. This driver has been renamed "cafe_ccic" since my previous patch set. Signed-off-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab --- linux/include/linux/i2c-id.h | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/include') diff --git a/linux/include/linux/i2c-id.h b/linux/include/linux/i2c-id.h index 0a8f750cb..a32db163c 100644 --- a/linux/include/linux/i2c-id.h +++ b/linux/include/linux/i2c-id.h @@ -250,6 +250,7 @@ #define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */ #define I2C_HW_SMBUS_OV519 0x040010 /* OV519 USB 1.1 webcam IC */ #define I2C_HW_SMBUS_OVFX2 0x040011 /* Cypress/OmniVision FX2 webcam */ +#define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ /* --- ISA pseudo-adapter */ #define I2C_HW_ISA 0x050000 -- cgit v1.2.3 From d9b0c371afc00c929e543dcc3da27573105bf306 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 4 Nov 2006 09:26:00 -0300 Subject: OmniVision OV7670 driver From: Jonathan Corbet This patch adds a V4L2 driver for the OmniVision OV7670 camera. Signed-off-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab --- linux/include/linux/i2c-id.h | 1 + linux/include/media/v4l2-common.h | 3 +++ 2 files changed, 4 insertions(+) (limited to 'linux/include') diff --git a/linux/include/linux/i2c-id.h b/linux/include/linux/i2c-id.h index a32db163c..0f4cf34b6 100644 --- a/linux/include/linux/i2c-id.h +++ b/linux/include/linux/i2c-id.h @@ -159,6 +159,7 @@ #define I2C_DRIVERID_ASB100 1043 #define I2C_DRIVERID_FSCHER 1046 #define I2C_DRIVERID_W83L785TS 1047 +#define I2C_DRIVERID_OV7670 1048 /* Omnivision 7670 camera */ /* * ---- Adapter types ---------------------------------------------------- diff --git a/linux/include/media/v4l2-common.h b/linux/include/media/v4l2-common.h index 8d47a9c2a..6e7500f1d 100644 --- a/linux/include/media/v4l2-common.h +++ b/linux/include/media/v4l2-common.h @@ -150,6 +150,9 @@ enum v4l2_chip_ident { V4L2_IDENT_CX25841 = 241, V4L2_IDENT_CX25842 = 242, V4L2_IDENT_CX25843 = 243, + + /* OmniVision sensors - range 250-299 */ + V4L2_IDENT_OV7670 = 250, }; /* audio ioctls */ -- cgit v1.2.3 From afda8f6dfa6cef5fc7014cdeb6a1749905d5194e Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 12 Nov 2006 13:28:46 +0100 Subject: Detect presence of IR receiver/IR transmitter in tveeprom From: Hans Verkuil Thanks to input from Steven Toth from Hauppauge the tveeprom module has been extended to detect the presence of an IR transmitter (aka IR-blaster). Signed-off-by: Hans Verkuil --- linux/include/media/tveeprom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/include') diff --git a/linux/include/media/tveeprom.h b/linux/include/media/tveeprom.h index e9fc1a785..5660ea249 100644 --- a/linux/include/media/tveeprom.h +++ b/linux/include/media/tveeprom.h @@ -3,7 +3,7 @@ struct tveeprom { u32 has_radio; - u32 has_ir; /* 0: no IR, 1: IR present, 2: unknown */ + u32 has_ir; /* bit 0: IR receiver present, bit 1: IR transmitter (blaster) present. -1 == unknown */ u32 has_MAC_address; /* 0: no MAC, 1: MAC present, 2: unknown */ u32 tuner_type; -- cgit v1.2.3 From a4368a67e2cfa7868299cf7b20bf87352e351e33 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 20 Nov 2006 14:19:20 -0200 Subject: Remove the need of a STD array for drivers using video_ioctl2 From: Mauro Carvalho Chehab CC: Jonathan Corbet video_ioctl2 will auto-generate standard entries at ENUM_FMT. Also, now, a driver may return a subset of the video array at the return, to be stored as the current_norm. For example, a driver may ask for V4L2_STD_PAL. At return, driver may change it to V4L2_STD_PAL_B. This way, a futher call to G_STD will return the exact detected video std. Signed-off-by: Mauro Carvalho Chehab --- linux/include/media/v4l2-dev.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'linux/include') diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h index 5136305c4..e67ef632c 100644 --- a/linux/include/media/v4l2-dev.h +++ b/linux/include/media/v4l2-dev.h @@ -47,6 +47,7 @@ /* Video standard functions */ extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); +extern char *v4l2_norm_to_name(v4l2_std_id id); extern int v4l2_video_std_construct(struct v4l2_standard *vs, int id, char *name); @@ -85,12 +86,6 @@ extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, * This version moves redundant code from video device code to * the common handler */ -struct v4l2_tvnorm { - char *name; - v4l2_std_id id; - - void *priv_data; -}; struct video_device { @@ -114,9 +109,8 @@ struct video_device int debug; /* Activates debug level*/ /* Video standard vars */ - int tvnormsize; /* Size of tvnorm array */ - v4l2_std_id current_norm; /* Current tvnorm */ - struct v4l2_tvnorm *tvnorms; + v4l2_std_id tvnorms; /* Supported tv norms */ + v4l2_std_id current_norm; /* Current tvnorm */ /* callbacks */ void (*release)(struct video_device *vfd); @@ -221,7 +215,7 @@ struct video_device /* Standard handling G_STD and ENUMSTD are handled by videodev.c */ - int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id a); + int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id *norm); int (*vidioc_querystd) (struct file *file, void *fh, v4l2_std_id *a); /* Input handling */ -- cgit v1.2.3 From 225cfe3996e2ce939a1bf2e19e5746d64ebe293a Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Wed, 22 Nov 2006 21:02:37 +0000 Subject: [PATCH 5/8] budget-ci IR: integrate with ir-common MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This converts the budget-ci driver so that it uses ir-common for some of its IR processing. In particular, the keymap for the Nova-T (sub 13c2:1011) is switched to the Hauppauge grey/black keymap, of which the keys on the supplied R808 remote control form a subset. The old budget-ci keymap is moved to ir-keymaps.c and is used for other remotes. The debounce logic for buggy remotes (i.e. Zenith) is made conditional the new debounce parameter and defaults to off (so that repeat keypresses aren't ignored for all working remotes). Some parts are based on Darren Salt's dvb-ir patchset. Signed-off-by: David Härdeman Signed-off-by: Andrew de Quincey --- linux/include/media/ir-common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/include') diff --git a/linux/include/media/ir-common.h b/linux/include/media/ir-common.h index 8f5840653..2b25f5c95 100644 --- a/linux/include/media/ir-common.h +++ b/linux/include/media/ir-common.h @@ -92,6 +92,7 @@ extern IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_npgtech[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_norwood[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_proteus_2309[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_budget_ci_old[IR_KEYTAB_SIZE]; #endif -- cgit v1.2.3