From 0bf19ca136ed9d99a46a8b55ecf2a3e4018e2e56 Mon Sep 17 00:00:00 2001 From: Steven Toth Date: Mon, 21 Jan 2008 23:00:33 -0500 Subject: IR corrections for the Pinnacle 800i From: Steven Toth IR corrections for the Pinnacle 800i Signed-off-by: Steven Toth Signed-off-by: Chaogui Zhang --- linux/include/media/ir-common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/include/media') diff --git a/linux/include/media/ir-common.h b/linux/include/media/ir-common.h index 9c2fc09a7..831547d79 100644 --- a/linux/include/media/ir-common.h +++ b/linux/include/media/ir-common.h @@ -141,6 +141,7 @@ extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; #endif -- cgit v1.2.3 From ff34055d31f6ecce43c9d4d3747b496b8a039b02 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 31 Jan 2008 11:15:52 -0200 Subject: Remove obsolete code from v4l2-common From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- linux/include/media/v4l2-common.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'linux/include/media') diff --git a/linux/include/media/v4l2-common.h b/linux/include/media/v4l2-common.h index 10fc32e16..d225eac1e 100644 --- a/linux/include/media/v4l2-common.h +++ b/linux/include/media/v4l2-common.h @@ -69,9 +69,6 @@ /* Prints the ioctl in a human-readable format */ extern void v4l_printk_ioctl(unsigned int cmd); -#if 0 -extern void v4l_printk_ioctl_arg(const char *s, unsigned int cmd, const void *arg); -#endif /* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ #define v4l_print_ioctl(name, cmd) \ -- cgit v1.2.3 From 21ed876086e2efb38e6f2dfaf48fae94fe2ec738 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 31 Jan 2008 11:57:53 -0200 Subject: Renames videobuf lock to vb_lock From: Mauro Carvalho Chehab This helps to identify where vb_lock is being used, and find missusages of the locks. Signed-off-by: Mauro Carvalho Chehab --- linux/include/media/videobuf-core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/include/media') diff --git a/linux/include/media/videobuf-core.h b/linux/include/media/videobuf-core.h index 9bb244716..b73f0ffa8 100644 --- a/linux/include/media/videobuf-core.h +++ b/linux/include/media/videobuf-core.h @@ -150,9 +150,9 @@ struct videobuf_qtype_ops { struct videobuf_queue { #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) - struct mutex lock; + struct mutex vb_lock; #else - struct semaphore lock; + struct semaphore vb_lock; #endif spinlock_t *irqlock; void *dev; /* on pci, points to struct pci_dev */ -- cgit v1.2.3 From 035d79af6c56bdefa3f974a15ff6306108ac5dc4 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 2 Feb 2008 09:25:31 -0200 Subject: Fix Kconfig dependencies From: Mauro Carvalho Chehab As pointed by Adrian Bunk, with I2C=m and VIDEO_DEV=y, videodev brokes. This patch moves the functions that videodev needs from v4l2-common. It also fixes some Kconfig changes. After this patch, I2C=m / VIDEO_DEV=y will make v4l2 core statically linked into kernel. v4l2-common will be m, and all V4L drivers will also be m. This approach is very conservative, since it is possible to have V4L drivers that don't need I2C or v4l2-common. The better is to map what drivers really need v4l2-common, making them to select v4l2-common, and allowing the others to be 'y', 'm' and 'n'. Signed-off-by: Mauro Carvalho Chehab --- linux/include/media/v4l2-common.h | 2 -- linux/include/media/v4l2-dev.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/include/media') diff --git a/linux/include/media/v4l2-common.h b/linux/include/media/v4l2-common.h index d225eac1e..72ed0ddb2 100644 --- a/linux/include/media/v4l2-common.h +++ b/linux/include/media/v4l2-common.h @@ -67,8 +67,6 @@ v4l_client_printk(KERN_DEBUG, client, fmt , ## arg); \ } while (0) -/* Prints the ioctl in a human-readable format */ -extern void v4l_printk_ioctl(unsigned int cmd); /* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ #define v4l_print_ioctl(name, cmd) \ diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h index 64918029f..fac381990 100644 --- a/linux/include/media/v4l2-dev.h +++ b/linux/include/media/v4l2-dev.h @@ -50,6 +50,8 @@ 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); +/* Prints the ioctl in a human-readable format */ +extern void v4l_printk_ioctl(unsigned int cmd); /* prority handling */ struct v4l2_prio_state { -- cgit v1.2.3 From 585e2c45351b12d0acfabbf83a99f5f43ef40fe6 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Mon, 4 Feb 2008 12:52:20 -0800 Subject: [v4l] Fix v4l against 2.6.25 tree This won't fix the build quite yet since SUBLEVEL hasn't been changed in the Makefile for 2.6.25. But, there isn't much we can do without breaking the build against 2.6.24 too... Fixes the build against these two commits. bdc511f438f6ca40307e06edda00331e6ac0f813 bfb6df24facfde7ec6191edbba798777efb3c375 Signed-off-by: Brandon Philips --- linux/include/media/v4l2-i2c-drv-legacy.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'linux/include/media') diff --git a/linux/include/media/v4l2-i2c-drv-legacy.h b/linux/include/media/v4l2-i2c-drv-legacy.h index fa55a1479..812f18516 100644 --- a/linux/include/media/v4l2-i2c-drv-legacy.h +++ b/linux/include/media/v4l2-i2c-drv-legacy.h @@ -38,7 +38,11 @@ struct v4l2_i2c_driver_data { }; static struct v4l2_i2c_driver_data v4l2_i2c_data; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) +const static struct i2c_client_address_data addr_data; +#else static struct i2c_client_address_data addr_data; +#endif static struct i2c_driver v4l2_i2c_driver_legacy; static char v4l2_i2c_drv_name_legacy[32]; -- cgit v1.2.3 From c239611668a3d8add80d686d266956a8fcac5ca4 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Mon, 4 Feb 2008 12:52:21 -0800 Subject: [v4l] convert videbuf_vmalloc_memory to videobuf_vmalloc_memory Signed-off-by: Brandon Philips --- linux/include/media/videobuf-vmalloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/include/media') diff --git a/linux/include/media/videobuf-vmalloc.h b/linux/include/media/videobuf-vmalloc.h index 26a8958d2..ec63ab0fa 100644 --- a/linux/include/media/videobuf-vmalloc.h +++ b/linux/include/media/videobuf-vmalloc.h @@ -17,7 +17,7 @@ /* --------------------------------------------------------------------- */ -struct videbuf_vmalloc_memory +struct videobuf_vmalloc_memory { u32 magic; -- cgit v1.2.3 From 7bb957ce707856c2df5092cdd8773601e22aa1fb Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 5 Feb 2008 10:36:50 -0200 Subject: Order is wrong, when comparing with kernel version From: Mauro Carvalho Chehab kernel-sync: Signed-off-by: Mauro Carvalho Chehab --- linux/include/media/v4l2-i2c-drv-legacy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/include/media') diff --git a/linux/include/media/v4l2-i2c-drv-legacy.h b/linux/include/media/v4l2-i2c-drv-legacy.h index 812f18516..10c3231f0 100644 --- a/linux/include/media/v4l2-i2c-drv-legacy.h +++ b/linux/include/media/v4l2-i2c-drv-legacy.h @@ -39,7 +39,7 @@ struct v4l2_i2c_driver_data { static struct v4l2_i2c_driver_data v4l2_i2c_data; #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) -const static struct i2c_client_address_data addr_data; +static const struct i2c_client_address_data addr_data; #else static struct i2c_client_address_data addr_data; #endif -- cgit v1.2.3 From e4d2ad96d3876243a74af7ccdf5a984bebf90ea5 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 5 Feb 2008 10:40:14 -0200 Subject: More English fixes from kernel tree From: Mauro Carvalho Chehab kernel-sync: Signed-off-by: Mauro Carvalho Chehab --- linux/include/media/rds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/include/media') diff --git a/linux/include/media/rds.h b/linux/include/media/rds.h index 951c1ae0b..a89426667 100644 --- a/linux/include/media/rds.h +++ b/linux/include/media/rds.h @@ -4,7 +4,7 @@ saa6588.c and every driver (e.g. bttv-driver.c) that wants to use the saa6588 module. - Instead of having a seperate rds.h, I'd prefer to include + Instead of having a separate rds.h, I'd prefer to include this stuff in one of the already existing files like tuner.h (c) 2005 by Hans J. Koch -- cgit v1.2.3 From 2e060eac7c0a23ea0e3fa3accb9a6992f673d3a5 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 5 Feb 2008 17:46:39 +0000 Subject: Add chip IDs for Micron mt9m001 and mt9v022 CMOS cameras From: Guennadi Liakhovetski Add V4L2_IDENT chip IDs for mt9m001 and mt9v022 cameras, will be used by future patches, primarily to implement the g_chip_ident ioctl. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- linux/include/media/v4l2-chip-ident.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'linux/include/media') diff --git a/linux/include/media/v4l2-chip-ident.h b/linux/include/media/v4l2-chip-ident.h index 032bb75f6..0ea0bd85c 100644 --- a/linux/include/media/v4l2-chip-ident.h +++ b/linux/include/media/v4l2-chip-ident.h @@ -153,6 +153,12 @@ enum { V4L2_IDENT_MSP4428G = 44287, V4L2_IDENT_MSP4448G = 44487, V4L2_IDENT_MSP4458G = 44587, + + /* Micron CMOS sensor chips: 45000-45099 */ + V4L2_IDENT_MT9M001C12ST = 45000, + V4L2_IDENT_MT9M001C12STM = 45005, + V4L2_IDENT_MT9V022IX7ATC = 45010, /* No way to detect "normal" I77ATx */ + V4L2_IDENT_MT9V022IX7ATM = 45015, /* and "lead free" IA7ATx chips */ }; #endif -- cgit v1.2.3 From 4ecdcc3c9d89b126c5e40cef0f4860083a9829cd Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 5 Feb 2008 17:46:13 +0000 Subject: soc_camera V4L2 driver for directly-connected SoC-based cameras From: Guennadi Liakhovetski This driver provides an interface between platform-specific camera busses and camera devices. It should be used if the camera is connected not over a "proper" bus like PCI or USB, but over a special bus, like, for example, the Quick Capture interface on PXA270 SoCs. Later it should also be used for i.MX31 SoCs from Freescale. It can handle multiple cameras and / or multiple busses, which can be used, e.g., in stereo-vision applications. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- linux/include/media/soc_camera.h | 147 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 linux/include/media/soc_camera.h (limited to 'linux/include/media') diff --git a/linux/include/media/soc_camera.h b/linux/include/media/soc_camera.h new file mode 100644 index 000000000..69aba7188 --- /dev/null +++ b/linux/include/media/soc_camera.h @@ -0,0 +1,147 @@ +/* + * camera image capture (abstract) bus driver header + * + * Copyright (C) 2006, Sascha Hauer, Pengutronix + * Copyright (C) 2008, Guennadi Liakhovetski + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef SOC_CAMERA_H +#define SOC_CAMERA_H + +#include +#include + +struct soc_camera_device { + struct list_head list; + struct device dev; + struct device *control; + unsigned short width; /* Current window */ + unsigned short height; /* sizes */ + unsigned short x_min; /* Camera capabilities */ + unsigned short y_min; + unsigned short x_current; /* Current window location */ + unsigned short y_current; + unsigned short width_min; + unsigned short width_max; + unsigned short height_min; + unsigned short height_max; + unsigned short y_skip_top; /* Lines to skip at the top */ + unsigned short gain; + unsigned short exposure; + unsigned char iface; /* Host number */ + unsigned char devnum; /* Device number per host */ + unsigned char cached_datawidth; /* See comment in .c */ + struct soc_camera_ops *ops; + struct video_device *vdev; + const struct soc_camera_data_format *current_fmt; + int (*probe)(struct soc_camera_device *icd); + void (*remove)(struct soc_camera_device *icd); + struct module *owner; +}; + +struct soc_camera_file { + struct soc_camera_device *icd; + struct videobuf_queue vb_vidq; +}; + +struct soc_camera_host { + struct list_head list; + struct device dev; + unsigned char nr; /* Host number */ + size_t msize; + struct videobuf_queue_ops *vbq_ops; + struct module *owner; + void *priv; + char *drv_name; + int (*add)(struct soc_camera_device *); + void (*remove)(struct soc_camera_device *); + int (*set_capture_format)(struct soc_camera_device *, __u32, + struct v4l2_rect *); + int (*try_fmt_cap)(struct soc_camera_host *, struct v4l2_format *); + int (*reqbufs)(struct soc_camera_file *, struct v4l2_requestbuffers *); + int (*querycap)(struct soc_camera_host *, struct v4l2_capability *); + unsigned int (*poll)(struct file *, poll_table *); +}; + +struct soc_camera_link { + /* Camera bus id, used to match a camera and a bus */ + int bus_id; + /* GPIO number to switch between 8 and 10 bit modes */ + unsigned int gpio; +}; + +static inline struct soc_camera_device *to_soc_camera_dev(struct device *dev) +{ + return container_of(dev, struct soc_camera_device, dev); +} + +static inline struct soc_camera_host *to_soc_camera_host(struct device *dev) +{ + return container_of(dev, struct soc_camera_host, dev); +} + +extern int soc_camera_host_register(struct soc_camera_host *ici, + struct module *owner); +extern void soc_camera_host_unregister(struct soc_camera_host *ici); +extern int soc_camera_device_register(struct soc_camera_device *icd); +extern void soc_camera_device_unregister(struct soc_camera_device *icd); + +extern int soc_camera_video_start(struct soc_camera_device *icd); +extern void soc_camera_video_stop(struct soc_camera_device *icd); + +struct soc_camera_data_format { + char *name; + unsigned int depth; + __u32 fourcc; + enum v4l2_colorspace colorspace; +}; + +struct soc_camera_ops { + struct module *owner; + int (*init)(struct soc_camera_device *); + int (*release)(struct soc_camera_device *); + int (*start_capture)(struct soc_camera_device *); + int (*stop_capture)(struct soc_camera_device *); + int (*set_capture_format)(struct soc_camera_device *, __u32, + struct v4l2_rect *, unsigned int); + int (*try_fmt_cap)(struct soc_camera_device *, struct v4l2_format *); + int (*get_chip_id)(struct soc_camera_device *, + struct v4l2_chip_ident *); +#ifdef CONFIG_VIDEO_ADV_DEBUG + int (*get_register)(struct soc_camera_device *, struct v4l2_register *); + int (*set_register)(struct soc_camera_device *, struct v4l2_register *); +#endif + const struct soc_camera_data_format *formats; + int num_formats; + int (*get_control)(struct soc_camera_device *, struct v4l2_control *); + int (*set_control)(struct soc_camera_device *, struct v4l2_control *); + const struct v4l2_queryctrl *controls; + int num_controls; + unsigned int(*get_datawidth)(struct soc_camera_device *icd); +}; + +static inline struct v4l2_queryctrl const *soc_camera_find_qctrl( + struct soc_camera_ops *ops, int id) +{ + int i; + + for (i = 0; i < ops->num_controls; i++) + if (ops->controls[i].id == id) + return &ops->controls[i]; + + return NULL; +} + +#define IS_MASTER (1<<0) +#define IS_HSYNC_ACTIVE_HIGH (1<<1) +#define IS_VSYNC_ACTIVE_HIGH (1<<2) +#define IS_DATAWIDTH_8 (1<<3) +#define IS_DATAWIDTH_9 (1<<4) +#define IS_DATAWIDTH_10 (1<<5) +#define IS_PCLK_SAMPLE_RISING (1<<6) + +#endif -- cgit v1.2.3 From c9d118cc0e102ecbd6bfa490ba556fd9e996dfed Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 11 Feb 2008 10:40:53 -0200 Subject: Adds support for Genius TVGo A11MCE From: Adrian Pardini Signed-off-by: Adrian Pardini Signed-off-by: Mauro Carvalho Chehab --- linux/include/media/ir-common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/include/media') diff --git a/linux/include/media/ir-common.h b/linux/include/media/ir-common.h index 831547d79..a4274203f 100644 --- a/linux/include/media/ir-common.h +++ b/linux/include/media/ir-common.h @@ -142,6 +142,7 @@ extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE]; extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; +extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE]; #endif -- cgit v1.2.3