summaryrefslogtreecommitdiff
path: root/linux/include/media
diff options
context:
space:
mode:
Diffstat (limited to 'linux/include/media')
-rw-r--r--linux/include/media/cx2341x.h7
-rw-r--r--linux/include/media/cx25840.h6
-rw-r--r--linux/include/media/ir-common.h1
-rw-r--r--linux/include/media/pwc-ioctl.h7
-rw-r--r--linux/include/media/saa7146.h4
-rw-r--r--linux/include/media/v4l2-dev.h27
-rw-r--r--linux/include/media/v4l2-i2c-drv-legacy.h36
-rw-r--r--linux/include/media/v4l2-i2c-drv.h35
-rw-r--r--linux/include/media/videobuf-dvb.h4
9 files changed, 35 insertions, 92 deletions
diff --git a/linux/include/media/cx2341x.h b/linux/include/media/cx2341x.h
index 5f4608e88..9ec4d5889 100644
--- a/linux/include/media/cx2341x.h
+++ b/linux/include/media/cx2341x.h
@@ -27,6 +27,7 @@ enum cx2341x_port {
enum cx2341x_cap {
CX2341X_CAP_HAS_SLICED_VBI = 1 << 0,
+ CX2341X_CAP_HAS_TS = 1 << 1,
};
struct cx2341x_mpeg_params {
@@ -88,13 +89,13 @@ typedef int (*cx2341x_mbox_func)(void *priv, u32 cmd, int in, int out,
int cx2341x_update(void *priv, cx2341x_mbox_func func,
const struct cx2341x_mpeg_params *old,
const struct cx2341x_mpeg_params *new);
-int cx2341x_ctrl_query(struct cx2341x_mpeg_params *params,
+int cx2341x_ctrl_query(const struct cx2341x_mpeg_params *params,
struct v4l2_queryctrl *qctrl);
-const char **cx2341x_ctrl_get_menu(u32 id);
+const char **cx2341x_ctrl_get_menu(const struct cx2341x_mpeg_params *p, u32 id);
int cx2341x_ext_ctrls(struct cx2341x_mpeg_params *params, int busy,
struct v4l2_ext_controls *ctrls, unsigned int cmd);
void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p);
-void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix);
+void cx2341x_log_status(const struct cx2341x_mpeg_params *p, const char *prefix);
/* Firmware names */
#define CX2341X_FIRM_ENC_FILENAME "v4l-cx2341x-enc.fw"
diff --git a/linux/include/media/cx25840.h b/linux/include/media/cx25840.h
index cd599ad29..db431d513 100644
--- a/linux/include/media/cx25840.h
+++ b/linux/include/media/cx25840.h
@@ -32,12 +32,16 @@ enum cx25840_video_input {
CX25840_COMPOSITE7,
CX25840_COMPOSITE8,
- /* S-Video inputs consist of one luma input (In1-In4) ORed with one
+ /* S-Video inputs consist of one luma input (In1-In8) ORed with one
chroma input (In5-In8) */
CX25840_SVIDEO_LUMA1 = 0x10,
CX25840_SVIDEO_LUMA2 = 0x20,
CX25840_SVIDEO_LUMA3 = 0x30,
CX25840_SVIDEO_LUMA4 = 0x40,
+ CX25840_SVIDEO_LUMA5 = 0x50,
+ CX25840_SVIDEO_LUMA6 = 0x60,
+ CX25840_SVIDEO_LUMA7 = 0x70,
+ CX25840_SVIDEO_LUMA8 = 0x80,
CX25840_SVIDEO_CHROMA4 = 0x400,
CX25840_SVIDEO_CHROMA5 = 0x500,
CX25840_SVIDEO_CHROMA6 = 0x600,
diff --git a/linux/include/media/ir-common.h b/linux/include/media/ir-common.h
index bfee8be5d..b8e8aa919 100644
--- a/linux/include/media/ir-common.h
+++ b/linux/include/media/ir-common.h
@@ -146,6 +146,7 @@ extern IR_KEYTAB_TYPE ir_codes_behold_columbus[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];
extern IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE];
+extern IR_KEYTAB_TYPE ir_codes_avermedia_a16d[IR_KEYTAB_SIZE];
#endif
diff --git a/linux/include/media/pwc-ioctl.h b/linux/include/media/pwc-ioctl.h
index 6e32ef4e2..0f19779c4 100644
--- a/linux/include/media/pwc-ioctl.h
+++ b/linux/include/media/pwc-ioctl.h
@@ -55,12 +55,7 @@
#include <linux/types.h>
#include <linux/version.h>
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 10)
-/* Compatibility for older kernel */
-typedef __u16 __le16;
-#endif
-
- /* Enumeration of image sizes */
+/* Enumeration of image sizes */
#define PSZ_SQCIF 0x00
#define PSZ_QSIF 0x01
#define PSZ_QCIF 0x02
diff --git a/linux/include/media/saa7146.h b/linux/include/media/saa7146.h
index f13a8c58a..e4a7aa2aa 100644
--- a/linux/include/media/saa7146.h
+++ b/linux/include/media/saa7146.h
@@ -65,7 +65,7 @@ struct saa7146_vv;
/* saa7146 page table */
struct saa7146_pgtable {
unsigned int size;
- u32 *cpu;
+ __le32 *cpu;
dma_addr_t dma;
/* used for offsets for u,v planes for planar capture modes */
unsigned long offset;
@@ -113,7 +113,7 @@ struct saa7146_extension
struct saa7146_dma
{
dma_addr_t dma_handle;
- u32 *cpu_addr;
+ __le32 *cpu_addr;
};
struct saa7146_dev
diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h
index 484090509..fb356eb57 100644
--- a/linux/include/media/v4l2-dev.h
+++ b/linux/include/media/v4l2-dev.h
@@ -14,9 +14,7 @@
#include <linux/poll.h>
#include <linux/fs.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
#include <linux/device.h>
-#endif
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
#else
@@ -46,9 +44,9 @@
#define VFL_TYPE_VTX 3
/* Video standard functions */
-extern char *v4l2_norm_to_name(v4l2_std_id id);
+extern const char *v4l2_norm_to_name(v4l2_std_id id);
extern int v4l2_video_std_construct(struct v4l2_standard *vs,
- int id, char *name);
+ int id, const char *name);
/* Prints the ioctl in a human-readable format */
extern void v4l_printk_ioctl(unsigned int cmd);
@@ -65,8 +63,8 @@ enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global);
int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local);
/* names for fancy debug output */
-extern char *v4l2_field_names[];
-extern char *v4l2_type_names[];
+extern const char *v4l2_field_names[];
+extern const char *v4l2_type_names[];
/* Compatibility layer interface -- v4l1-compat module */
typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file,
@@ -97,21 +95,17 @@ struct video_device
struct file_operations *fops;
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
/* sysfs */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
struct device class_dev; /* v4l device */
-#else
- struct class_device class_dev;
-#endif
struct device *dev; /* device parent */
-#endif
/* device info */
char name[32];
int type; /* v4l1 */
int type2; /* v4l2 */
int minor;
+ /* attribute to diferentiate multiple indexs on one physical device */
+ int index;
int debug; /* Activates debug level*/
@@ -377,6 +371,8 @@ void *priv;
/* Version 2 functions */
extern int video_register_device(struct video_device *vfd, int type, int nr);
+int video_register_device_index(struct video_device *vfd, int type, int nr,
+ int index);
void video_unregister_device(struct video_device *);
extern int video_ioctl2(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg);
@@ -395,15 +391,9 @@ extern int video_usercopy(struct inode *inode, struct file *file,
#ifdef CONFIG_VIDEO_V4L1_COMPAT
#include <linux/mm.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
static inline int __must_check
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
-video_device_create_file(struct video_device *vfd,
- struct class_device_attribute *attr)
-#else
video_device_create_file(struct video_device *vfd,
struct device_attribute *attr)
-#endif
{
int ret = device_create_file(&vfd->class_dev, attr);
if (ret < 0)
@@ -416,7 +406,6 @@ video_device_remove_file(struct video_device *vfd,
{
device_remove_file(&vfd->class_dev, attr);
}
-#endif
#endif /* CONFIG_VIDEO_V4L1_COMPAT */
diff --git a/linux/include/media/v4l2-i2c-drv-legacy.h b/linux/include/media/v4l2-i2c-drv-legacy.h
index 7494bdcc3..738f87454 100644
--- a/linux/include/media/v4l2-i2c-drv-legacy.h
+++ b/linux/include/media/v4l2-i2c-drv-legacy.h
@@ -30,10 +30,9 @@ struct v4l2_i2c_driver_data {
int (*suspend)(struct i2c_client *client, pm_message_t state);
int (*resume)(struct i2c_client *client);
int (*legacy_probe)(struct i2c_adapter *adapter);
-#ifdef I2C_CLASS_TV_ANALOG
int legacy_class;
-#else
- int legacy_id;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
+ const struct i2c_device_id *id_table;
#endif
};
@@ -46,12 +45,7 @@ static struct i2c_client_address_data addr_data;
static struct i2c_driver v4l2_i2c_driver_legacy;
static char v4l2_i2c_drv_name_legacy[32];
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
static int v4l2_i2c_drv_attach_legacy(struct i2c_adapter *adapter, int address, int kind)
-#else
-static int v4l2_i2c_drv_attach_legacy(struct i2c_adapter *adapter, int address,
- unsigned short flags, int kind)
-#endif
{
return v4l2_i2c_attach(adapter, address, &v4l2_i2c_driver_legacy,
v4l2_i2c_drv_name_legacy, v4l2_i2c_data.probe);
@@ -64,11 +58,7 @@ static int v4l2_i2c_drv_probe_legacy(struct i2c_adapter *adapter)
return i2c_probe(adapter, &addr_data, v4l2_i2c_drv_attach_legacy);
return 0;
}
-#ifdef I2C_CLASS_TV_ANALOG
if (adapter->class & v4l2_i2c_data.legacy_class)
-#else
- if (adapter->id == v4l2_i2c_data.legacy_id)
-#endif
return i2c_probe(adapter, &addr_data, v4l2_i2c_drv_attach_legacy);
return 0;
}
@@ -84,14 +74,9 @@ static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client)
if (err)
return err;
kfree(client);
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- MOD_DEC_USE_COUNT;
-#endif
return 0;
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,14)
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20)
static int v4l2_i2c_drv_suspend_helper(struct i2c_client *client, pm_message_t state)
@@ -127,19 +112,17 @@ static int v4l2_i2c_drv_resume_helper(struct device * dev, u32 level)
#endif
return v4l2_i2c_data.resume ? v4l2_i2c_data.resume(client) : 0;
}
-#endif
/* ----------------------------------------------------------------------- */
/* i2c implementation */
static struct i2c_driver v4l2_i2c_driver_legacy = {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.owner = THIS_MODULE,
#endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.flags = I2C_DF_NOTIFY,
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
.driver = {
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
.owner = THIS_MODULE,
@@ -149,7 +132,6 @@ static struct i2c_driver v4l2_i2c_driver_legacy = {
.resume = v4l2_i2c_drv_resume_helper,
#endif
},
-#endif
.attach_adapter = v4l2_i2c_drv_probe_legacy,
.detach_client = v4l2_i2c_drv_detach_legacy,
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20)
@@ -167,9 +149,7 @@ static struct i2c_driver v4l2_i2c_driver = {
.resume = v4l2_i2c_drv_resume_helper,
};
#endif
-
-
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 26)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
static int compat_legacy_probe(struct i2c_client *client)
{
return v4l2_i2c_data.probe(client, NULL);
@@ -183,13 +163,8 @@ static int __init v4l2_i2c_drv_init(void)
strlcpy(v4l2_i2c_drv_name_legacy, v4l2_i2c_data.name, sizeof(v4l2_i2c_drv_name_legacy));
strlcat(v4l2_i2c_drv_name_legacy, "'", sizeof(v4l2_i2c_drv_name_legacy));
-#ifdef I2C_CLASS_TV_ANALOG
if (v4l2_i2c_data.legacy_class == 0)
v4l2_i2c_data.legacy_class = I2C_CLASS_TV_ANALOG;
-#else
- if (v4l2_i2c_data.legacy_id == 0)
- v4l2_i2c_data.legacy_id = I2C_HW_B_BT848;
-#endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
strlcpy(v4l2_i2c_driver_legacy.name, v4l2_i2c_drv_name_legacy, sizeof(v4l2_i2c_driver_legacy.name));
@@ -212,6 +187,9 @@ static int __init v4l2_i2c_drv_init(void)
v4l2_i2c_driver.probe = compat_legacy_probe;
#endif
v4l2_i2c_driver.remove = v4l2_i2c_data.remove;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
+ v4l2_i2c_driver.id_table = v4l2_i2c_data.id_table;
+#endif
err = i2c_add_driver(&v4l2_i2c_driver);
if (err)
i2c_del_driver(&v4l2_i2c_driver_legacy);
diff --git a/linux/include/media/v4l2-i2c-drv.h b/linux/include/media/v4l2-i2c-drv.h
index 5b4959620..f74c8a64a 100644
--- a/linux/include/media/v4l2-i2c-drv.h
+++ b/linux/include/media/v4l2-i2c-drv.h
@@ -35,23 +35,21 @@ struct v4l2_i2c_driver_data {
int (*suspend)(struct i2c_client *client, pm_message_t state);
int (*resume)(struct i2c_client *client);
int (*legacy_probe)(struct i2c_adapter *adapter);
-#ifdef I2C_CLASS_TV_ANALOG
int legacy_class;
-#else
- int legacy_id;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
+ const struct i2c_device_id *id_table;
#endif
};
static struct v4l2_i2c_driver_data v4l2_i2c_data;
static struct i2c_driver v4l2_i2c_driver;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 26)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
static int compat_legacy_probe(struct i2c_client *client)
{
return v4l2_i2c_data.probe(client, NULL);
}
#endif
-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
/* Bus-based I2C implementation for kernels >= 2.6.22 */
@@ -69,6 +67,9 @@ static int __init v4l2_i2c_drv_init(void)
v4l2_i2c_driver.remove = v4l2_i2c_data.remove;
v4l2_i2c_driver.suspend = v4l2_i2c_data.suspend;
v4l2_i2c_driver.resume = v4l2_i2c_data.resume;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
+ v4l2_i2c_driver.id_table = v4l2_i2c_data.id_table;
+#endif
return i2c_add_driver(&v4l2_i2c_driver);
}
@@ -78,12 +79,7 @@ static struct i2c_client_address_data addr_data;
/* Bus-based I2C API is not present, add legacy code */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
static int v4l2_i2c_drv_attach_legacy(struct i2c_adapter *adapter, int address, int kind)
-#else
-static int v4l2_i2c_drv_attach_legacy(struct i2c_adapter *adapter, int address,
- unsigned short flags, int kind)
-#endif
{
return v4l2_i2c_attach(adapter, address, &v4l2_i2c_driver,
v4l2_i2c_data.name, v4l2_i2c_data.probe);
@@ -96,11 +92,7 @@ static int v4l2_i2c_drv_probe_legacy(struct i2c_adapter *adapter)
return i2c_probe(adapter, &addr_data, v4l2_i2c_drv_attach_legacy);
return 0;
}
-#ifdef I2C_CLASS_TV_ANALOG
if (adapter->class & v4l2_i2c_data.legacy_class)
-#else
- if (adapter->id == v4l2_i2c_data.legacy_id)
-#endif
return i2c_probe(adapter, &addr_data, v4l2_i2c_drv_attach_legacy);
return 0;
}
@@ -116,14 +108,9 @@ static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client)
if (err)
return err;
kfree(client);
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- MOD_DEC_USE_COUNT;
-#endif
return 0;
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,14)
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20)
static int v4l2_i2c_drv_suspend_helper(struct i2c_client *client, pm_message_t state)
@@ -159,18 +146,16 @@ static int v4l2_i2c_drv_resume_helper(struct device * dev, u32 level)
#endif
return v4l2_i2c_data.resume ? v4l2_i2c_data.resume(client) : 0;
}
-#endif
/* ----------------------------------------------------------------------- */
static struct i2c_driver v4l2_i2c_driver = {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.owner = THIS_MODULE,
#endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.flags = I2C_DF_NOTIFY,
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
.driver = {
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
.owner = THIS_MODULE,
@@ -180,7 +165,6 @@ static struct i2c_driver v4l2_i2c_driver = {
.resume = v4l2_i2c_drv_resume_helper,
#endif
},
-#endif
.attach_adapter = v4l2_i2c_drv_probe_legacy,
.detach_client = v4l2_i2c_drv_detach_legacy,
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20)
@@ -193,13 +177,8 @@ static struct i2c_driver v4l2_i2c_driver = {
static int __init v4l2_i2c_drv_init(void)
{
-#ifdef I2C_CLASS_TV_ANALOG
if (v4l2_i2c_data.legacy_class == 0)
v4l2_i2c_data.legacy_class = I2C_CLASS_TV_ANALOG;
-#else
- if (v4l2_i2c_data.legacy_id == 0)
- v4l2_i2c_data.legacy_id = I2C_HW_B_BT848;
-#endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
strlcpy(v4l2_i2c_driver.name, v4l2_i2c_data.name, sizeof(v4l2_i2c_driver.name));
diff --git a/linux/include/media/videobuf-dvb.h b/linux/include/media/videobuf-dvb.h
index 14438bc98..84886be5e 100644
--- a/linux/include/media/videobuf-dvb.h
+++ b/linux/include/media/videobuf-dvb.h
@@ -20,11 +20,7 @@ struct videobuf_dvb {
int nfeeds;
/* videobuf_dvb_(un)register manges this */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12))
struct dvb_adapter adapter;
-#else
- struct dvb_adapter *adapter;
-#endif
struct dvb_demux demux;
struct dmxdev dmxdev;
struct dmx_frontend fe_hw;