diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/debugfs.h | 9 | ||||
-rw-r--r-- | include/linux/device.h | 69 | ||||
-rw-r--r-- | include/linux/dvb/audio.h | 5 | ||||
-rw-r--r-- | include/linux/dvb/version.h | 2 | ||||
-rw-r--r-- | include/linux/dvb/video.h | 62 | ||||
-rw-r--r-- | include/linux/kobject.h | 12 | ||||
-rw-r--r-- | include/linux/namei.h | 1 | ||||
-rw-r--r-- | include/linux/pci.h | 2 | ||||
-rw-r--r-- | include/linux/pm.h | 37 | ||||
-rw-r--r-- | include/linux/sysfs.h | 4 | ||||
-rw-r--r-- | include/linux/usb.h | 22 | ||||
-rw-r--r-- | include/linux/usb/cdc.h | 11 | ||||
-rw-r--r-- | include/linux/usb/ch9.h | 15 | ||||
-rw-r--r-- | include/linux/videodev2.h | 83 | ||||
-rw-r--r-- | include/media/cx2341x.h | 6 | ||||
-rw-r--r-- | include/media/ivtv.h | 65 | ||||
-rw-r--r-- | include/media/tuner.h | 5 | ||||
-rw-r--r-- | include/media/v4l2-chip-ident.h | 149 | ||||
-rw-r--r-- | include/media/v4l2-common.h | 47 | ||||
-rw-r--r-- | include/media/v4l2-dev.h | 10 |
20 files changed, 509 insertions, 107 deletions
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 9fa0983d1aa8..5a9c49534d08 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h | |||
@@ -44,6 +44,8 @@ struct dentry *debugfs_create_u16(const char *name, mode_t mode, | |||
44 | struct dentry *parent, u16 *value); | 44 | struct dentry *parent, u16 *value); |
45 | struct dentry *debugfs_create_u32(const char *name, mode_t mode, | 45 | struct dentry *debugfs_create_u32(const char *name, mode_t mode, |
46 | struct dentry *parent, u32 *value); | 46 | struct dentry *parent, u32 *value); |
47 | struct dentry *debugfs_create_u64(const char *name, mode_t mode, | ||
48 | struct dentry *parent, u64 *value); | ||
47 | struct dentry *debugfs_create_bool(const char *name, mode_t mode, | 49 | struct dentry *debugfs_create_bool(const char *name, mode_t mode, |
48 | struct dentry *parent, u32 *value); | 50 | struct dentry *parent, u32 *value); |
49 | 51 | ||
@@ -104,6 +106,13 @@ static inline struct dentry *debugfs_create_u32(const char *name, mode_t mode, | |||
104 | return ERR_PTR(-ENODEV); | 106 | return ERR_PTR(-ENODEV); |
105 | } | 107 | } |
106 | 108 | ||
109 | static inline struct dentry *debugfs_create_u64(const char *name, mode_t mode, | ||
110 | struct dentry *parent, | ||
111 | u64 *value) | ||
112 | { | ||
113 | return ERR_PTR(-ENODEV); | ||
114 | } | ||
115 | |||
107 | static inline struct dentry *debugfs_create_bool(const char *name, mode_t mode, | 116 | static inline struct dentry *debugfs_create_bool(const char *name, mode_t mode, |
108 | struct dentry *parent, | 117 | struct dentry *parent, |
109 | u32 *value) | 118 | u32 *value) |
diff --git a/include/linux/device.h b/include/linux/device.h index 5cf30e95c8b6..a0cd2ced31a9 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -34,9 +34,24 @@ struct device; | |||
34 | struct device_driver; | 34 | struct device_driver; |
35 | struct class; | 35 | struct class; |
36 | struct class_device; | 36 | struct class_device; |
37 | struct bus_type; | ||
38 | |||
39 | struct bus_attribute { | ||
40 | struct attribute attr; | ||
41 | ssize_t (*show)(struct bus_type *, char * buf); | ||
42 | ssize_t (*store)(struct bus_type *, const char * buf, size_t count); | ||
43 | }; | ||
44 | |||
45 | #define BUS_ATTR(_name,_mode,_show,_store) \ | ||
46 | struct bus_attribute bus_attr_##_name = __ATTR(_name,_mode,_show,_store) | ||
47 | |||
48 | extern int __must_check bus_create_file(struct bus_type *, | ||
49 | struct bus_attribute *); | ||
50 | extern void bus_remove_file(struct bus_type *, struct bus_attribute *); | ||
37 | 51 | ||
38 | struct bus_type { | 52 | struct bus_type { |
39 | const char * name; | 53 | const char * name; |
54 | struct module * owner; | ||
40 | 55 | ||
41 | struct subsystem subsys; | 56 | struct subsystem subsys; |
42 | struct kset drivers; | 57 | struct kset drivers; |
@@ -49,6 +64,8 @@ struct bus_type { | |||
49 | struct bus_attribute * bus_attrs; | 64 | struct bus_attribute * bus_attrs; |
50 | struct device_attribute * dev_attrs; | 65 | struct device_attribute * dev_attrs; |
51 | struct driver_attribute * drv_attrs; | 66 | struct driver_attribute * drv_attrs; |
67 | struct bus_attribute drivers_autoprobe_attr; | ||
68 | struct bus_attribute drivers_probe_attr; | ||
52 | 69 | ||
53 | int (*match)(struct device * dev, struct device_driver * drv); | 70 | int (*match)(struct device * dev, struct device_driver * drv); |
54 | int (*uevent)(struct device *dev, char **envp, | 71 | int (*uevent)(struct device *dev, char **envp, |
@@ -61,6 +78,9 @@ struct bus_type { | |||
61 | int (*suspend_late)(struct device * dev, pm_message_t state); | 78 | int (*suspend_late)(struct device * dev, pm_message_t state); |
62 | int (*resume_early)(struct device * dev); | 79 | int (*resume_early)(struct device * dev); |
63 | int (*resume)(struct device * dev); | 80 | int (*resume)(struct device * dev); |
81 | |||
82 | unsigned int drivers_autoprobe:1; | ||
83 | unsigned int multithread_probe:1; | ||
64 | }; | 84 | }; |
65 | 85 | ||
66 | extern int __must_check bus_register(struct bus_type * bus); | 86 | extern int __must_check bus_register(struct bus_type * bus); |
@@ -102,26 +122,10 @@ extern int bus_unregister_notifier(struct bus_type *bus, | |||
102 | #define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be | 122 | #define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be |
103 | unbound */ | 123 | unbound */ |
104 | 124 | ||
105 | /* sysfs interface for exporting bus attributes */ | ||
106 | |||
107 | struct bus_attribute { | ||
108 | struct attribute attr; | ||
109 | ssize_t (*show)(struct bus_type *, char * buf); | ||
110 | ssize_t (*store)(struct bus_type *, const char * buf, size_t count); | ||
111 | }; | ||
112 | |||
113 | #define BUS_ATTR(_name,_mode,_show,_store) \ | ||
114 | struct bus_attribute bus_attr_##_name = __ATTR(_name,_mode,_show,_store) | ||
115 | |||
116 | extern int __must_check bus_create_file(struct bus_type *, | ||
117 | struct bus_attribute *); | ||
118 | extern void bus_remove_file(struct bus_type *, struct bus_attribute *); | ||
119 | |||
120 | struct device_driver { | 125 | struct device_driver { |
121 | const char * name; | 126 | const char * name; |
122 | struct bus_type * bus; | 127 | struct bus_type * bus; |
123 | 128 | ||
124 | struct completion unloaded; | ||
125 | struct kobject kobj; | 129 | struct kobject kobj; |
126 | struct klist klist_devices; | 130 | struct klist klist_devices; |
127 | struct klist_node knode_bus; | 131 | struct klist_node knode_bus; |
@@ -135,8 +139,6 @@ struct device_driver { | |||
135 | void (*shutdown) (struct device * dev); | 139 | void (*shutdown) (struct device * dev); |
136 | int (*suspend) (struct device * dev, pm_message_t state); | 140 | int (*suspend) (struct device * dev, pm_message_t state); |
137 | int (*resume) (struct device * dev); | 141 | int (*resume) (struct device * dev); |
138 | |||
139 | unsigned int multithread_probe:1; | ||
140 | }; | 142 | }; |
141 | 143 | ||
142 | 144 | ||
@@ -181,10 +183,9 @@ struct class { | |||
181 | struct list_head children; | 183 | struct list_head children; |
182 | struct list_head devices; | 184 | struct list_head devices; |
183 | struct list_head interfaces; | 185 | struct list_head interfaces; |
186 | struct kset class_dirs; | ||
184 | struct semaphore sem; /* locks both the children and interfaces lists */ | 187 | struct semaphore sem; /* locks both the children and interfaces lists */ |
185 | 188 | ||
186 | struct kobject *virtual_dir; | ||
187 | |||
188 | struct class_attribute * class_attrs; | 189 | struct class_attribute * class_attrs; |
189 | struct class_device_attribute * class_dev_attrs; | 190 | struct class_device_attribute * class_dev_attrs; |
190 | struct device_attribute * dev_attrs; | 191 | struct device_attribute * dev_attrs; |
@@ -328,11 +329,23 @@ extern struct class_device *class_device_create(struct class *cls, | |||
328 | __attribute__((format(printf,5,6))); | 329 | __attribute__((format(printf,5,6))); |
329 | extern void class_device_destroy(struct class *cls, dev_t devt); | 330 | extern void class_device_destroy(struct class *cls, dev_t devt); |
330 | 331 | ||
332 | /* | ||
333 | * The type of device, "struct device" is embedded in. A class | ||
334 | * or bus can contain devices of different types | ||
335 | * like "partitions" and "disks", "mouse" and "event". | ||
336 | * This identifies the device type and carries type-specific | ||
337 | * information, equivalent to the kobj_type of a kobject. | ||
338 | * If "name" is specified, the uevent will contain it in | ||
339 | * the DEVTYPE variable. | ||
340 | */ | ||
331 | struct device_type { | 341 | struct device_type { |
332 | struct device_attribute *attrs; | 342 | const char *name; |
343 | struct attribute_group **groups; | ||
333 | int (*uevent)(struct device *dev, char **envp, int num_envp, | 344 | int (*uevent)(struct device *dev, char **envp, int num_envp, |
334 | char *buffer, int buffer_size); | 345 | char *buffer, int buffer_size); |
335 | void (*release)(struct device *dev); | 346 | void (*release)(struct device *dev); |
347 | int (*suspend)(struct device * dev, pm_message_t state); | ||
348 | int (*resume)(struct device * dev); | ||
336 | }; | 349 | }; |
337 | 350 | ||
338 | /* interface for exporting device attributes */ | 351 | /* interface for exporting device attributes */ |
@@ -354,8 +367,12 @@ extern int __must_check device_create_bin_file(struct device *dev, | |||
354 | struct bin_attribute *attr); | 367 | struct bin_attribute *attr); |
355 | extern void device_remove_bin_file(struct device *dev, | 368 | extern void device_remove_bin_file(struct device *dev, |
356 | struct bin_attribute *attr); | 369 | struct bin_attribute *attr); |
357 | extern int device_schedule_callback(struct device *dev, | 370 | extern int device_schedule_callback_owner(struct device *dev, |
358 | void (*func)(struct device *)); | 371 | void (*func)(struct device *), struct module *owner); |
372 | |||
373 | /* This is a macro to avoid include problems with THIS_MODULE */ | ||
374 | #define device_schedule_callback(dev, func) \ | ||
375 | device_schedule_callback_owner(dev, func, THIS_MODULE) | ||
359 | 376 | ||
360 | /* device resource management */ | 377 | /* device resource management */ |
361 | typedef void (*dr_release_t)(struct device *dev, void *res); | 378 | typedef void (*dr_release_t)(struct device *dev, void *res); |
@@ -554,7 +571,11 @@ extern const char *dev_driver_string(struct device *dev); | |||
554 | #define dev_dbg(dev, format, arg...) \ | 571 | #define dev_dbg(dev, format, arg...) \ |
555 | dev_printk(KERN_DEBUG , dev , format , ## arg) | 572 | dev_printk(KERN_DEBUG , dev , format , ## arg) |
556 | #else | 573 | #else |
557 | #define dev_dbg(dev, format, arg...) do { (void)(dev); } while (0) | 574 | static inline int __attribute__ ((format (printf, 2, 3))) |
575 | dev_dbg(struct device * dev, const char * fmt, ...) | ||
576 | { | ||
577 | return 0; | ||
578 | } | ||
558 | #endif | 579 | #endif |
559 | 580 | ||
560 | #define dev_err(dev, format, arg...) \ | 581 | #define dev_err(dev, format, arg...) \ |
diff --git a/include/linux/dvb/audio.h b/include/linux/dvb/audio.h index 0874a67c6b92..89412e18f571 100644 --- a/include/linux/dvb/audio.h +++ b/include/linux/dvb/audio.h | |||
@@ -47,7 +47,9 @@ typedef enum { | |||
47 | typedef enum { | 47 | typedef enum { |
48 | AUDIO_STEREO, | 48 | AUDIO_STEREO, |
49 | AUDIO_MONO_LEFT, | 49 | AUDIO_MONO_LEFT, |
50 | AUDIO_MONO_RIGHT | 50 | AUDIO_MONO_RIGHT, |
51 | AUDIO_MONO, | ||
52 | AUDIO_STEREO_SWAPPED | ||
51 | } audio_channel_select_t; | 53 | } audio_channel_select_t; |
52 | 54 | ||
53 | 55 | ||
@@ -133,5 +135,6 @@ typedef uint16_t audio_attributes_t; | |||
133 | * extracted by the PES parser. | 135 | * extracted by the PES parser. |
134 | */ | 136 | */ |
135 | #define AUDIO_GET_PTS _IOR('o', 19, __u64) | 137 | #define AUDIO_GET_PTS _IOR('o', 19, __u64) |
138 | #define AUDIO_BILINGUAL_CHANNEL_SELECT _IO('o', 20) | ||
136 | 139 | ||
137 | #endif /* _DVBAUDIO_H_ */ | 140 | #endif /* _DVBAUDIO_H_ */ |
diff --git a/include/linux/dvb/version.h b/include/linux/dvb/version.h index 6183c9c4849e..126e0c26cb09 100644 --- a/include/linux/dvb/version.h +++ b/include/linux/dvb/version.h | |||
@@ -24,6 +24,6 @@ | |||
24 | #define _DVBVERSION_H_ | 24 | #define _DVBVERSION_H_ |
25 | 25 | ||
26 | #define DVB_API_VERSION 3 | 26 | #define DVB_API_VERSION 3 |
27 | #define DVB_API_VERSION_MINOR 1 | 27 | #define DVB_API_VERSION_MINOR 2 |
28 | 28 | ||
29 | #endif /*_DVBVERSION_H_*/ | 29 | #endif /*_DVBVERSION_H_*/ |
diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h index faebfda397ff..93e4c3a6d190 100644 --- a/include/linux/dvb/video.h +++ b/include/linux/dvb/video.h | |||
@@ -80,14 +80,70 @@ typedef enum { | |||
80 | } video_play_state_t; | 80 | } video_play_state_t; |
81 | 81 | ||
82 | 82 | ||
83 | /* Decoder commands */ | ||
84 | #define VIDEO_CMD_PLAY (0) | ||
85 | #define VIDEO_CMD_STOP (1) | ||
86 | #define VIDEO_CMD_FREEZE (2) | ||
87 | #define VIDEO_CMD_CONTINUE (3) | ||
88 | |||
89 | /* Flags for VIDEO_CMD_FREEZE */ | ||
90 | #define VIDEO_CMD_FREEZE_TO_BLACK (1 << 0) | ||
91 | |||
92 | /* Flags for VIDEO_CMD_STOP */ | ||
93 | #define VIDEO_CMD_STOP_TO_BLACK (1 << 0) | ||
94 | #define VIDEO_CMD_STOP_IMMEDIATELY (1 << 1) | ||
95 | |||
96 | /* Play input formats: */ | ||
97 | /* The decoder has no special format requirements */ | ||
98 | #define VIDEO_PLAY_FMT_NONE (0) | ||
99 | /* The decoder requires full GOPs */ | ||
100 | #define VIDEO_PLAY_FMT_GOP (1) | ||
101 | |||
102 | /* The structure must be zeroed before use by the application | ||
103 | This ensures it can be extended safely in the future. */ | ||
104 | struct video_command { | ||
105 | __u32 cmd; | ||
106 | __u32 flags; | ||
107 | union { | ||
108 | struct { | ||
109 | __u64 pts; | ||
110 | } stop; | ||
111 | |||
112 | struct { | ||
113 | /* 0 or 1000 specifies normal speed, | ||
114 | 1 specifies forward single stepping, | ||
115 | -1 specifies backward single stepping, | ||
116 | >1: playback at speed/1000 of the normal speed, | ||
117 | <-1: reverse playback at (-speed/1000) of the normal speed. */ | ||
118 | __s32 speed; | ||
119 | __u32 format; | ||
120 | } play; | ||
121 | |||
122 | struct { | ||
123 | __u32 data[16]; | ||
124 | } raw; | ||
125 | }; | ||
126 | }; | ||
127 | |||
128 | /* FIELD_UNKNOWN can be used if the hardware does not know whether | ||
129 | the Vsync is for an odd, even or progressive (i.e. non-interlaced) | ||
130 | field. */ | ||
131 | #define VIDEO_VSYNC_FIELD_UNKNOWN (0) | ||
132 | #define VIDEO_VSYNC_FIELD_ODD (1) | ||
133 | #define VIDEO_VSYNC_FIELD_EVEN (2) | ||
134 | #define VIDEO_VSYNC_FIELD_PROGRESSIVE (3) | ||
135 | |||
83 | struct video_event { | 136 | struct video_event { |
84 | int32_t type; | 137 | int32_t type; |
85 | #define VIDEO_EVENT_SIZE_CHANGED 1 | 138 | #define VIDEO_EVENT_SIZE_CHANGED 1 |
86 | #define VIDEO_EVENT_FRAME_RATE_CHANGED 2 | 139 | #define VIDEO_EVENT_FRAME_RATE_CHANGED 2 |
140 | #define VIDEO_EVENT_DECODER_STOPPED 3 | ||
141 | #define VIDEO_EVENT_VSYNC 4 | ||
87 | time_t timestamp; | 142 | time_t timestamp; |
88 | union { | 143 | union { |
89 | video_size_t size; | 144 | video_size_t size; |
90 | unsigned int frame_rate; /* in frames per 1000sec */ | 145 | unsigned int frame_rate; /* in frames per 1000sec */ |
146 | unsigned char vsync_field; /* unknown/odd/even/progressive */ | ||
91 | } u; | 147 | } u; |
92 | }; | 148 | }; |
93 | 149 | ||
@@ -213,4 +269,10 @@ typedef uint16_t video_attributes_t; | |||
213 | */ | 269 | */ |
214 | #define VIDEO_GET_PTS _IOR('o', 57, __u64) | 270 | #define VIDEO_GET_PTS _IOR('o', 57, __u64) |
215 | 271 | ||
272 | /* Read the number of displayed frames since the decoder was started */ | ||
273 | #define VIDEO_GET_FRAME_COUNT _IOR('o', 58, __u64) | ||
274 | |||
275 | #define VIDEO_COMMAND _IOWR('o', 59, struct video_command) | ||
276 | #define VIDEO_TRY_COMMAND _IOWR('o', 60, struct video_command) | ||
277 | |||
216 | #endif /*_DVBVIDEO_H_*/ | 278 | #endif /*_DVBVIDEO_H_*/ |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index b850e0310538..eb0e63ef297f 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/sysfs.h> | 22 | #include <linux/sysfs.h> |
23 | #include <linux/compiler.h> | 23 | #include <linux/compiler.h> |
24 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
25 | #include <linux/rwsem.h> | ||
26 | #include <linux/kref.h> | 25 | #include <linux/kref.h> |
27 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
28 | #include <linux/wait.h> | 27 | #include <linux/wait.h> |
@@ -43,11 +42,9 @@ enum kobject_action { | |||
43 | KOBJ_ADD = (__force kobject_action_t) 0x01, /* exclusive to core */ | 42 | KOBJ_ADD = (__force kobject_action_t) 0x01, /* exclusive to core */ |
44 | KOBJ_REMOVE = (__force kobject_action_t) 0x02, /* exclusive to core */ | 43 | KOBJ_REMOVE = (__force kobject_action_t) 0x02, /* exclusive to core */ |
45 | KOBJ_CHANGE = (__force kobject_action_t) 0x03, /* device state change */ | 44 | KOBJ_CHANGE = (__force kobject_action_t) 0x03, /* device state change */ |
46 | KOBJ_MOUNT = (__force kobject_action_t) 0x04, /* mount event for block devices (broken) */ | 45 | KOBJ_OFFLINE = (__force kobject_action_t) 0x04, /* device offline */ |
47 | KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */ | 46 | KOBJ_ONLINE = (__force kobject_action_t) 0x05, /* device online */ |
48 | KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */ | 47 | KOBJ_MOVE = (__force kobject_action_t) 0x06, /* device move */ |
49 | KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */ | ||
50 | KOBJ_MOVE = (__force kobject_action_t) 0x08, /* device move */ | ||
51 | }; | 48 | }; |
52 | 49 | ||
53 | struct kobject { | 50 | struct kobject { |
@@ -89,6 +86,8 @@ extern void kobject_unregister(struct kobject *); | |||
89 | extern struct kobject * kobject_get(struct kobject *); | 86 | extern struct kobject * kobject_get(struct kobject *); |
90 | extern void kobject_put(struct kobject *); | 87 | extern void kobject_put(struct kobject *); |
91 | 88 | ||
89 | extern struct kobject *kobject_kset_add_dir(struct kset *kset, | ||
90 | struct kobject *, const char *); | ||
92 | extern struct kobject *kobject_add_dir(struct kobject *, const char *); | 91 | extern struct kobject *kobject_add_dir(struct kobject *, const char *); |
93 | 92 | ||
94 | extern char * kobject_get_path(struct kobject *, gfp_t); | 93 | extern char * kobject_get_path(struct kobject *, gfp_t); |
@@ -175,7 +174,6 @@ extern struct kobject * kset_find_obj(struct kset *, const char *); | |||
175 | 174 | ||
176 | struct subsystem { | 175 | struct subsystem { |
177 | struct kset kset; | 176 | struct kset kset; |
178 | struct rw_semaphore rwsem; | ||
179 | }; | 177 | }; |
180 | 178 | ||
181 | #define decl_subsys(_name,_type,_uevent_ops) \ | 179 | #define decl_subsys(_name,_type,_uevent_ops) \ |
diff --git a/include/linux/namei.h b/include/linux/namei.h index d39a5a67e979..b7dd24917f0d 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -82,6 +82,7 @@ extern struct file *nameidata_to_filp(struct nameidata *nd, int flags); | |||
82 | extern void release_open_intent(struct nameidata *); | 82 | extern void release_open_intent(struct nameidata *); |
83 | 83 | ||
84 | extern struct dentry * lookup_one_len(const char *, struct dentry *, int); | 84 | extern struct dentry * lookup_one_len(const char *, struct dentry *, int); |
85 | extern struct dentry *lookup_one_len_kern(const char *, struct dentry *, int); | ||
85 | 86 | ||
86 | extern int follow_down(struct vfsmount **, struct dentry **); | 87 | extern int follow_down(struct vfsmount **, struct dentry **); |
87 | extern int follow_up(struct vfsmount **, struct dentry **); | 88 | extern int follow_up(struct vfsmount **, struct dentry **); |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 481ea0663f19..a3ad76221c6f 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -361,8 +361,6 @@ struct pci_driver { | |||
361 | struct pci_error_handlers *err_handler; | 361 | struct pci_error_handlers *err_handler; |
362 | struct device_driver driver; | 362 | struct device_driver driver; |
363 | struct pci_dynids dynids; | 363 | struct pci_dynids dynids; |
364 | |||
365 | int multithread_probe; | ||
366 | }; | 364 | }; |
367 | 365 | ||
368 | #define to_pci_driver(drv) container_of(drv,struct pci_driver, driver) | 366 | #define to_pci_driver(drv) container_of(drv,struct pci_driver, driver) |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 21db05ac7c0b..9bd86db4d395 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -166,6 +166,24 @@ extern struct pm_ops *pm_ops; | |||
166 | extern int pm_suspend(suspend_state_t state); | 166 | extern int pm_suspend(suspend_state_t state); |
167 | 167 | ||
168 | 168 | ||
169 | /** | ||
170 | * arch_suspend_disable_irqs - disable IRQs for suspend | ||
171 | * | ||
172 | * Disables IRQs (in the default case). This is a weak symbol in the common | ||
173 | * code and thus allows architectures to override it if more needs to be | ||
174 | * done. Not called for suspend to disk. | ||
175 | */ | ||
176 | extern void arch_suspend_disable_irqs(void); | ||
177 | |||
178 | /** | ||
179 | * arch_suspend_enable_irqs - enable IRQs after suspend | ||
180 | * | ||
181 | * Enables IRQs (in the default case). This is a weak symbol in the common | ||
182 | * code and thus allows architectures to override it if more needs to be | ||
183 | * done. Not called for suspend to disk. | ||
184 | */ | ||
185 | extern void arch_suspend_enable_irqs(void); | ||
186 | |||
169 | /* | 187 | /* |
170 | * Device power management | 188 | * Device power management |
171 | */ | 189 | */ |
@@ -273,6 +291,20 @@ extern void __suspend_report_result(const char *function, void *fn, int ret); | |||
273 | __suspend_report_result(__FUNCTION__, fn, ret); \ | 291 | __suspend_report_result(__FUNCTION__, fn, ret); \ |
274 | } while (0) | 292 | } while (0) |
275 | 293 | ||
294 | /* | ||
295 | * Platform hook to activate device wakeup capability, if that's not already | ||
296 | * handled by enable_irq_wake() etc. | ||
297 | * Returns zero on success, else negative errno | ||
298 | */ | ||
299 | extern int (*platform_enable_wakeup)(struct device *dev, int is_on); | ||
300 | |||
301 | static inline int call_platform_enable_wakeup(struct device *dev, int is_on) | ||
302 | { | ||
303 | if (platform_enable_wakeup) | ||
304 | return (*platform_enable_wakeup)(dev, is_on); | ||
305 | return 0; | ||
306 | } | ||
307 | |||
276 | #else /* !CONFIG_PM */ | 308 | #else /* !CONFIG_PM */ |
277 | 309 | ||
278 | static inline int device_suspend(pm_message_t state) | 310 | static inline int device_suspend(pm_message_t state) |
@@ -294,6 +326,11 @@ static inline void dpm_runtime_resume(struct device * dev) | |||
294 | 326 | ||
295 | #define suspend_report_result(fn, ret) do { } while (0) | 327 | #define suspend_report_result(fn, ret) do { } while (0) |
296 | 328 | ||
329 | static inline int call_platform_enable_wakeup(struct device *dev, int is_on) | ||
330 | { | ||
331 | return -EIO; | ||
332 | } | ||
333 | |||
297 | #endif | 334 | #endif |
298 | 335 | ||
299 | /* changes to device_may_wakeup take effect on the next pm state change. | 336 | /* changes to device_may_wakeup take effect on the next pm state change. |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index fea9a6b3fb7b..7d5d1ec95c2e 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -80,7 +80,7 @@ struct sysfs_ops { | |||
80 | #ifdef CONFIG_SYSFS | 80 | #ifdef CONFIG_SYSFS |
81 | 81 | ||
82 | extern int sysfs_schedule_callback(struct kobject *kobj, | 82 | extern int sysfs_schedule_callback(struct kobject *kobj, |
83 | void (*func)(void *), void *data); | 83 | void (*func)(void *), void *data, struct module *owner); |
84 | 84 | ||
85 | extern int __must_check | 85 | extern int __must_check |
86 | sysfs_create_dir(struct kobject *, struct dentry *); | 86 | sysfs_create_dir(struct kobject *, struct dentry *); |
@@ -137,7 +137,7 @@ extern int __must_check sysfs_init(void); | |||
137 | #else /* CONFIG_SYSFS */ | 137 | #else /* CONFIG_SYSFS */ |
138 | 138 | ||
139 | static inline int sysfs_schedule_callback(struct kobject *kobj, | 139 | static inline int sysfs_schedule_callback(struct kobject *kobj, |
140 | void (*func)(void *), void *data) | 140 | void (*func)(void *), void *data, struct module *owner) |
141 | { | 141 | { |
142 | return -ENOSYS; | 142 | return -ENOSYS; |
143 | } | 143 | } |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 87dc75a6cee1..cfbd2bb8fa2c 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -299,8 +299,9 @@ struct usb_bus { | |||
299 | int bandwidth_int_reqs; /* number of Interrupt requests */ | 299 | int bandwidth_int_reqs; /* number of Interrupt requests */ |
300 | int bandwidth_isoc_reqs; /* number of Isoc. requests */ | 300 | int bandwidth_isoc_reqs; /* number of Isoc. requests */ |
301 | 301 | ||
302 | #ifdef CONFIG_USB_DEVICEFS | ||
302 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ | 303 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ |
303 | 304 | #endif | |
304 | struct class_device *class_dev; /* class device for this bus */ | 305 | struct class_device *class_dev; /* class device for this bus */ |
305 | 306 | ||
306 | #if defined(CONFIG_USB_MON) | 307 | #if defined(CONFIG_USB_MON) |
@@ -373,9 +374,12 @@ struct usb_device { | |||
373 | char *serial; /* iSerialNumber string, if present */ | 374 | char *serial; /* iSerialNumber string, if present */ |
374 | 375 | ||
375 | struct list_head filelist; | 376 | struct list_head filelist; |
376 | struct device *usbfs_dev; | 377 | #ifdef CONFIG_USB_DEVICE_CLASS |
378 | struct device *usb_classdev; | ||
379 | #endif | ||
380 | #ifdef CONFIG_USB_DEVICEFS | ||
377 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ | 381 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ |
378 | 382 | #endif | |
379 | /* | 383 | /* |
380 | * Child devices - these can be either new devices | 384 | * Child devices - these can be either new devices |
381 | * (if this is a hub device), or different instances | 385 | * (if this is a hub device), or different instances |
@@ -394,10 +398,13 @@ struct usb_device { | |||
394 | struct delayed_work autosuspend; /* for delayed autosuspends */ | 398 | struct delayed_work autosuspend; /* for delayed autosuspends */ |
395 | struct mutex pm_mutex; /* protects PM operations */ | 399 | struct mutex pm_mutex; /* protects PM operations */ |
396 | 400 | ||
397 | unsigned autosuspend_delay; /* in jiffies */ | 401 | unsigned long last_busy; /* time of last use */ |
402 | int autosuspend_delay; /* in jiffies */ | ||
398 | 403 | ||
399 | unsigned auto_pm:1; /* autosuspend/resume in progress */ | 404 | unsigned auto_pm:1; /* autosuspend/resume in progress */ |
400 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ | 405 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ |
406 | unsigned autosuspend_disabled:1; /* autosuspend and autoresume */ | ||
407 | unsigned autoresume_disabled:1; /* disabled by the user */ | ||
401 | #endif | 408 | #endif |
402 | }; | 409 | }; |
403 | #define to_usb_device(d) container_of(d, struct usb_device, dev) | 410 | #define to_usb_device(d) container_of(d, struct usb_device, dev) |
@@ -437,6 +444,11 @@ static inline void usb_autopm_disable(struct usb_interface *intf) | |||
437 | usb_autopm_set_interface(intf); | 444 | usb_autopm_set_interface(intf); |
438 | } | 445 | } |
439 | 446 | ||
447 | static inline void usb_mark_last_busy(struct usb_device *udev) | ||
448 | { | ||
449 | udev->last_busy = jiffies; | ||
450 | } | ||
451 | |||
440 | #else | 452 | #else |
441 | 453 | ||
442 | static inline int usb_autopm_set_interface(struct usb_interface *intf) | 454 | static inline int usb_autopm_set_interface(struct usb_interface *intf) |
@@ -451,6 +463,8 @@ static inline void usb_autopm_enable(struct usb_interface *intf) | |||
451 | { } | 463 | { } |
452 | static inline void usb_autopm_disable(struct usb_interface *intf) | 464 | static inline void usb_autopm_disable(struct usb_interface *intf) |
453 | { } | 465 | { } |
466 | static inline void usb_mark_last_busy(struct usb_device *udev) | ||
467 | { } | ||
454 | #endif | 468 | #endif |
455 | 469 | ||
456 | /*-------------------------------------------------------------------------*/ | 470 | /*-------------------------------------------------------------------------*/ |
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index 956edf3bbecb..2204ae22c381 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
@@ -91,6 +91,17 @@ struct usb_cdc_union_desc { | |||
91 | /* ... and there could be other slave interfaces */ | 91 | /* ... and there could be other slave interfaces */ |
92 | } __attribute__ ((packed)); | 92 | } __attribute__ ((packed)); |
93 | 93 | ||
94 | /* "Country Selection Functional Descriptor" from CDC spec 5.2.3.9 */ | ||
95 | struct usb_cdc_country_functional_desc { | ||
96 | __u8 bLength; | ||
97 | __u8 bDescriptorType; | ||
98 | __u8 bDescriptorSubType; | ||
99 | |||
100 | __u8 iCountryCodeRelDate; | ||
101 | __le16 wCountyCode0; | ||
102 | /* ... and there can be a lot of country codes */ | ||
103 | } __attribute__ ((packed)); | ||
104 | |||
94 | /* "Network Channel Terminal Functional Descriptor" from CDC spec 5.2.3.11 */ | 105 | /* "Network Channel Terminal Functional Descriptor" from CDC spec 5.2.3.11 */ |
95 | struct usb_cdc_network_terminal_desc { | 106 | struct usb_cdc_network_terminal_desc { |
96 | __u8 bLength; | 107 | __u8 bLength; |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 1122a6c2c1a3..6169438ec5a2 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -181,12 +181,15 @@ struct usb_ctrlrequest { | |||
181 | #define USB_DT_WIRE_ADAPTER 0x21 | 181 | #define USB_DT_WIRE_ADAPTER 0x21 |
182 | #define USB_DT_RPIPE 0x22 | 182 | #define USB_DT_RPIPE 0x22 |
183 | 183 | ||
184 | /* conventional codes for class-specific descriptors */ | 184 | /* Conventional codes for class-specific descriptors. The convention is |
185 | #define USB_DT_CS_DEVICE 0x21 | 185 | * defined in the USB "Common Class" Spec (3.11). Individual class specs |
186 | #define USB_DT_CS_CONFIG 0x22 | 186 | * are authoritative for their usage, not the "common class" writeup. |
187 | #define USB_DT_CS_STRING 0x23 | 187 | */ |
188 | #define USB_DT_CS_INTERFACE 0x24 | 188 | #define USB_DT_CS_DEVICE (USB_TYPE_CLASS | USB_DT_DEVICE) |
189 | #define USB_DT_CS_ENDPOINT 0x25 | 189 | #define USB_DT_CS_CONFIG (USB_TYPE_CLASS | USB_DT_CONFIG) |
190 | #define USB_DT_CS_STRING (USB_TYPE_CLASS | USB_DT_STRING) | ||
191 | #define USB_DT_CS_INTERFACE (USB_TYPE_CLASS | USB_DT_INTERFACE) | ||
192 | #define USB_DT_CS_ENDPOINT (USB_TYPE_CLASS | USB_DT_ENDPOINT) | ||
190 | 193 | ||
191 | /* All standard descriptors have these 2 fields at the beginning */ | 194 | /* All standard descriptors have these 2 fields at the beginning */ |
192 | struct usb_descriptor_header { | 195 | struct usb_descriptor_header { |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 441b877bf150..a25c2afa67e1 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -96,44 +96,60 @@ | |||
96 | * E N U M S | 96 | * E N U M S |
97 | */ | 97 | */ |
98 | enum v4l2_field { | 98 | enum v4l2_field { |
99 | V4L2_FIELD_ANY = 0, /* driver can choose from none, | 99 | V4L2_FIELD_ANY = 0, /* driver can choose from none, |
100 | top, bottom, interlaced | 100 | top, bottom, interlaced |
101 | depending on whatever it thinks | 101 | depending on whatever it thinks |
102 | is approximate ... */ | 102 | is approximate ... */ |
103 | V4L2_FIELD_NONE = 1, /* this device has no fields ... */ | 103 | V4L2_FIELD_NONE = 1, /* this device has no fields ... */ |
104 | V4L2_FIELD_TOP = 2, /* top field only */ | 104 | V4L2_FIELD_TOP = 2, /* top field only */ |
105 | V4L2_FIELD_BOTTOM = 3, /* bottom field only */ | 105 | V4L2_FIELD_BOTTOM = 3, /* bottom field only */ |
106 | V4L2_FIELD_INTERLACED = 4, /* both fields interlaced */ | 106 | V4L2_FIELD_INTERLACED = 4, /* both fields interlaced */ |
107 | V4L2_FIELD_SEQ_TB = 5, /* both fields sequential into one | 107 | V4L2_FIELD_SEQ_TB = 5, /* both fields sequential into one |
108 | buffer, top-bottom order */ | 108 | buffer, top-bottom order */ |
109 | V4L2_FIELD_SEQ_BT = 6, /* same as above + bottom-top order */ | 109 | V4L2_FIELD_SEQ_BT = 6, /* same as above + bottom-top order */ |
110 | V4L2_FIELD_ALTERNATE = 7, /* both fields alternating into | 110 | V4L2_FIELD_ALTERNATE = 7, /* both fields alternating into |
111 | separate buffers */ | 111 | separate buffers */ |
112 | V4L2_FIELD_INTERLACED_TB = 8, /* both fields interlaced, top field | ||
113 | first and the top field is | ||
114 | transmitted first */ | ||
115 | V4L2_FIELD_INTERLACED_BT = 9, /* both fields interlaced, top field | ||
116 | first and the bottom field is | ||
117 | transmitted first */ | ||
112 | }; | 118 | }; |
113 | #define V4L2_FIELD_HAS_TOP(field) \ | 119 | #define V4L2_FIELD_HAS_TOP(field) \ |
114 | ((field) == V4L2_FIELD_TOP ||\ | 120 | ((field) == V4L2_FIELD_TOP ||\ |
115 | (field) == V4L2_FIELD_INTERLACED ||\ | 121 | (field) == V4L2_FIELD_INTERLACED ||\ |
122 | (field) == V4L2_FIELD_INTERLACED_TB ||\ | ||
123 | (field) == V4L2_FIELD_INTERLACED_BT ||\ | ||
116 | (field) == V4L2_FIELD_SEQ_TB ||\ | 124 | (field) == V4L2_FIELD_SEQ_TB ||\ |
117 | (field) == V4L2_FIELD_SEQ_BT) | 125 | (field) == V4L2_FIELD_SEQ_BT) |
118 | #define V4L2_FIELD_HAS_BOTTOM(field) \ | 126 | #define V4L2_FIELD_HAS_BOTTOM(field) \ |
119 | ((field) == V4L2_FIELD_BOTTOM ||\ | 127 | ((field) == V4L2_FIELD_BOTTOM ||\ |
120 | (field) == V4L2_FIELD_INTERLACED ||\ | 128 | (field) == V4L2_FIELD_INTERLACED ||\ |
129 | (field) == V4L2_FIELD_INTERLACED_TB ||\ | ||
130 | (field) == V4L2_FIELD_INTERLACED_BT ||\ | ||
121 | (field) == V4L2_FIELD_SEQ_TB ||\ | 131 | (field) == V4L2_FIELD_SEQ_TB ||\ |
122 | (field) == V4L2_FIELD_SEQ_BT) | 132 | (field) == V4L2_FIELD_SEQ_BT) |
123 | #define V4L2_FIELD_HAS_BOTH(field) \ | 133 | #define V4L2_FIELD_HAS_BOTH(field) \ |
124 | ((field) == V4L2_FIELD_INTERLACED ||\ | 134 | ((field) == V4L2_FIELD_INTERLACED ||\ |
125 | (field) == V4L2_FIELD_SEQ_TB ||\ | 135 | (field) == V4L2_FIELD_INTERLACED_TB ||\ |
136 | (field) == V4L2_FIELD_INTERLACED_BT ||\ | ||
137 | (field) == V4L2_FIELD_SEQ_TB ||\ | ||
126 | (field) == V4L2_FIELD_SEQ_BT) | 138 | (field) == V4L2_FIELD_SEQ_BT) |
127 | 139 | ||
128 | enum v4l2_buf_type { | 140 | enum v4l2_buf_type { |
129 | V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, | 141 | V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, |
130 | V4L2_BUF_TYPE_VIDEO_OUTPUT = 2, | 142 | V4L2_BUF_TYPE_VIDEO_OUTPUT = 2, |
131 | V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, | 143 | V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, |
132 | V4L2_BUF_TYPE_VBI_CAPTURE = 4, | 144 | V4L2_BUF_TYPE_VBI_CAPTURE = 4, |
133 | V4L2_BUF_TYPE_VBI_OUTPUT = 5, | 145 | V4L2_BUF_TYPE_VBI_OUTPUT = 5, |
134 | V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, | 146 | V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, |
135 | V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, | 147 | V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, |
136 | V4L2_BUF_TYPE_PRIVATE = 0x80, | 148 | #if 1 |
149 | /* Experimental */ | ||
150 | V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8, | ||
151 | #endif | ||
152 | V4L2_BUF_TYPE_PRIVATE = 0x80, | ||
137 | }; | 153 | }; |
138 | 154 | ||
139 | enum v4l2_ctrl_type { | 155 | enum v4l2_ctrl_type { |
@@ -227,6 +243,8 @@ struct v4l2_capability | |||
227 | #define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ | 243 | #define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ |
228 | #define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ | 244 | #define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ |
229 | #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ | 245 | #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ |
246 | #define V4L2_CAP_VIDEO_OUTPUT_POS 0x00000200 /* Video output can have x,y coords */ | ||
247 | #define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000400 /* Can do video output overlay */ | ||
230 | 248 | ||
231 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ | 249 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ |
232 | #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ | 250 | #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ |
@@ -249,6 +267,8 @@ struct v4l2_pix_format | |||
249 | __u32 sizeimage; | 267 | __u32 sizeimage; |
250 | enum v4l2_colorspace colorspace; | 268 | enum v4l2_colorspace colorspace; |
251 | __u32 priv; /* private data, depends on pixelformat */ | 269 | __u32 priv; /* private data, depends on pixelformat */ |
270 | __u32 left; /* only valid if V4L2_CAP_VIDEO_OUTPUT_POS is set */ | ||
271 | __u32 top; /* only valid if V4L2_CAP_VIDEO_OUTPUT_POS is set */ | ||
252 | }; | 272 | }; |
253 | 273 | ||
254 | /* Pixel format FOURCC depth Description */ | 274 | /* Pixel format FOURCC depth Description */ |
@@ -596,10 +616,14 @@ struct v4l2_framebuffer | |||
596 | #define V4L2_FBUF_CAP_CHROMAKEY 0x0002 | 616 | #define V4L2_FBUF_CAP_CHROMAKEY 0x0002 |
597 | #define V4L2_FBUF_CAP_LIST_CLIPPING 0x0004 | 617 | #define V4L2_FBUF_CAP_LIST_CLIPPING 0x0004 |
598 | #define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008 | 618 | #define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008 |
619 | #define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010 | ||
620 | #define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020 | ||
599 | /* Flags for the 'flags' field. */ | 621 | /* Flags for the 'flags' field. */ |
600 | #define V4L2_FBUF_FLAG_PRIMARY 0x0001 | 622 | #define V4L2_FBUF_FLAG_PRIMARY 0x0001 |
601 | #define V4L2_FBUF_FLAG_OVERLAY 0x0002 | 623 | #define V4L2_FBUF_FLAG_OVERLAY 0x0002 |
602 | #define V4L2_FBUF_FLAG_CHROMAKEY 0x0004 | 624 | #define V4L2_FBUF_FLAG_CHROMAKEY 0x0004 |
625 | #define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008 | ||
626 | #define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 | ||
603 | 627 | ||
604 | struct v4l2_clip | 628 | struct v4l2_clip |
605 | { | 629 | { |
@@ -615,6 +639,7 @@ struct v4l2_window | |||
615 | struct v4l2_clip __user *clips; | 639 | struct v4l2_clip __user *clips; |
616 | __u32 clipcount; | 640 | __u32 clipcount; |
617 | void __user *bitmap; | 641 | void __user *bitmap; |
642 | __u8 global_alpha; | ||
618 | }; | 643 | }; |
619 | 644 | ||
620 | /* | 645 | /* |
@@ -1037,6 +1062,7 @@ enum v4l2_mpeg_audio_crc { | |||
1037 | V4L2_MPEG_AUDIO_CRC_NONE = 0, | 1062 | V4L2_MPEG_AUDIO_CRC_NONE = 0, |
1038 | V4L2_MPEG_AUDIO_CRC_CRC16 = 1, | 1063 | V4L2_MPEG_AUDIO_CRC_CRC16 = 1, |
1039 | }; | 1064 | }; |
1065 | #define V4L2_CID_MPEG_AUDIO_MUTE (V4L2_CID_MPEG_BASE+109) | ||
1040 | 1066 | ||
1041 | /* MPEG video */ | 1067 | /* MPEG video */ |
1042 | #define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200) | 1068 | #define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200) |
@@ -1063,6 +1089,8 @@ enum v4l2_mpeg_video_bitrate_mode { | |||
1063 | #define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207) | 1089 | #define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207) |
1064 | #define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208) | 1090 | #define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208) |
1065 | #define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209) | 1091 | #define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209) |
1092 | #define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_MPEG_BASE+210) | ||
1093 | #define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_MPEG_BASE+211) | ||
1066 | 1094 | ||
1067 | /* MPEG-class control IDs specific to the CX2584x driver as defined by V4L2 */ | 1095 | /* MPEG-class control IDs specific to the CX2584x driver as defined by V4L2 */ |
1068 | #define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) | 1096 | #define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) |
@@ -1103,6 +1131,7 @@ enum v4l2_mpeg_cx2341x_video_median_filter_type { | |||
1103 | #define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+8) | 1131 | #define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+8) |
1104 | #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+9) | 1132 | #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+9) |
1105 | #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10) | 1133 | #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10) |
1134 | #define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_MPEG_CX2341X_BASE+11) | ||
1106 | 1135 | ||
1107 | /* | 1136 | /* |
1108 | * T U N I N G | 1137 | * T U N I N G |
@@ -1369,6 +1398,14 @@ struct v4l2_register { | |||
1369 | __u64 val; | 1398 | __u64 val; |
1370 | }; | 1399 | }; |
1371 | 1400 | ||
1401 | /* VIDIOC_G_CHIP_IDENT */ | ||
1402 | struct v4l2_chip_ident { | ||
1403 | __u32 match_type; /* Match type */ | ||
1404 | __u32 match_chip; /* Match this chip, meaning determined by match_type */ | ||
1405 | __u32 ident; /* chip identifier as specified in <media/v4l2-chip-ident.h> */ | ||
1406 | __u32 revision; /* chip revision, chip specific */ | ||
1407 | }; | ||
1408 | |||
1372 | /* | 1409 | /* |
1373 | * I O C T L C O D E S F O R V I D E O D E V I C E S | 1410 | * I O C T L C O D E S F O R V I D E O D E V I C E S |
1374 | * | 1411 | * |
@@ -1442,6 +1479,8 @@ struct v4l2_register { | |||
1442 | /* Experimental, only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ | 1479 | /* Experimental, only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ |
1443 | #define VIDIOC_DBG_S_REGISTER _IOW ('V', 79, struct v4l2_register) | 1480 | #define VIDIOC_DBG_S_REGISTER _IOW ('V', 79, struct v4l2_register) |
1444 | #define VIDIOC_DBG_G_REGISTER _IOWR ('V', 80, struct v4l2_register) | 1481 | #define VIDIOC_DBG_G_REGISTER _IOWR ('V', 80, struct v4l2_register) |
1482 | |||
1483 | #define VIDIOC_G_CHIP_IDENT _IOWR ('V', 81, struct v4l2_chip_ident) | ||
1445 | #endif | 1484 | #endif |
1446 | 1485 | ||
1447 | #ifdef __OLD_VIDIOC_ | 1486 | #ifdef __OLD_VIDIOC_ |
diff --git a/include/media/cx2341x.h b/include/media/cx2341x.h index d758a52cf556..38c12fed7535 100644 --- a/include/media/cx2341x.h +++ b/include/media/cx2341x.h | |||
@@ -40,6 +40,7 @@ struct cx2341x_mpeg_params { | |||
40 | /* stream */ | 40 | /* stream */ |
41 | enum v4l2_mpeg_stream_type stream_type; | 41 | enum v4l2_mpeg_stream_type stream_type; |
42 | enum v4l2_mpeg_stream_vbi_fmt stream_vbi_fmt; | 42 | enum v4l2_mpeg_stream_vbi_fmt stream_vbi_fmt; |
43 | u16 stream_insert_nav_packets; | ||
43 | 44 | ||
44 | /* audio */ | 45 | /* audio */ |
45 | enum v4l2_mpeg_audio_sampling_freq audio_sampling_freq; | 46 | enum v4l2_mpeg_audio_sampling_freq audio_sampling_freq; |
@@ -50,6 +51,7 @@ struct cx2341x_mpeg_params { | |||
50 | enum v4l2_mpeg_audio_emphasis audio_emphasis; | 51 | enum v4l2_mpeg_audio_emphasis audio_emphasis; |
51 | enum v4l2_mpeg_audio_crc audio_crc; | 52 | enum v4l2_mpeg_audio_crc audio_crc; |
52 | u16 audio_properties; | 53 | u16 audio_properties; |
54 | u16 audio_mute; | ||
53 | 55 | ||
54 | /* video */ | 56 | /* video */ |
55 | enum v4l2_mpeg_video_encoding video_encoding; | 57 | enum v4l2_mpeg_video_encoding video_encoding; |
@@ -61,6 +63,8 @@ struct cx2341x_mpeg_params { | |||
61 | u32 video_bitrate; | 63 | u32 video_bitrate; |
62 | u32 video_bitrate_peak; | 64 | u32 video_bitrate_peak; |
63 | u16 video_temporal_decimation; | 65 | u16 video_temporal_decimation; |
66 | u16 video_mute; | ||
67 | u32 video_mute_yuv; | ||
64 | 68 | ||
65 | /* encoding filters */ | 69 | /* encoding filters */ |
66 | enum v4l2_mpeg_cx2341x_video_spatial_filter_mode video_spatial_filter_mode; | 70 | enum v4l2_mpeg_cx2341x_video_spatial_filter_mode video_spatial_filter_mode; |
@@ -162,7 +166,7 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix); | |||
162 | #define CX2341X_ENC_SET_PLACEHOLDER 0xd7 | 166 | #define CX2341X_ENC_SET_PLACEHOLDER 0xd7 |
163 | #define CX2341X_ENC_MUTE_VIDEO 0xd9 | 167 | #define CX2341X_ENC_MUTE_VIDEO 0xd9 |
164 | #define CX2341X_ENC_MUTE_AUDIO 0xda | 168 | #define CX2341X_ENC_MUTE_AUDIO 0xda |
165 | #define CX2341X_ENC_UNKNOWN 0xdb | 169 | #define CX2341X_ENC_SET_VERT_CROP_LINE 0xdb |
166 | #define CX2341X_ENC_MISC 0xdc | 170 | #define CX2341X_ENC_MISC 0xdc |
167 | 171 | ||
168 | /* OSD API, specific to the cx23415 */ | 172 | /* OSD API, specific to the cx23415 */ |
diff --git a/include/media/ivtv.h b/include/media/ivtv.h new file mode 100644 index 000000000000..412b48ea8eda --- /dev/null +++ b/include/media/ivtv.h | |||
@@ -0,0 +1,65 @@ | |||
1 | /* | ||
2 | Public ivtv API header | ||
3 | Copyright (C) 2003-2004 Kevin Thayer <nufan_wfk at yahoo.com> | ||
4 | Copyright (C) 2004-2007 Hans Verkuil <hverkuil@xs4all.nl> | ||
5 | |||
6 | This program is free software; you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation; either version 2 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #ifndef _LINUX_IVTV_H | ||
22 | #define _LINUX_IVTV_H | ||
23 | |||
24 | /* ivtv knows several distinct output modes: MPEG streaming, | ||
25 | YUV streaming, YUV updates through user DMA and the passthrough | ||
26 | mode. | ||
27 | |||
28 | In order to clearly tell the driver that we are in user DMA | ||
29 | YUV mode you need to call IVTV_IOC_DMA_FRAME with y_source == NULL | ||
30 | first (althrough if you don't then the first time | ||
31 | DMA_FRAME is called the mode switch is done automatically). | ||
32 | |||
33 | When you close the file handle the user DMA mode is exited again. | ||
34 | |||
35 | While in one mode, you cannot use another mode (EBUSY is returned). | ||
36 | |||
37 | All this means that if you want to change the YUV interlacing | ||
38 | for the user DMA YUV mode you first need to do call IVTV_IOC_DMA_FRAME | ||
39 | with y_source == NULL before you can set the correct format using | ||
40 | VIDIOC_S_FMT. | ||
41 | |||
42 | Eventually all this should be replaced with a proper V4L2 API, | ||
43 | but for now we have to do it this way. */ | ||
44 | |||
45 | struct ivtv_dma_frame { | ||
46 | enum v4l2_buf_type type; /* V4L2_BUF_TYPE_VIDEO_OUTPUT */ | ||
47 | __u32 pixelformat; /* 0 == same as destination */ | ||
48 | void __user *y_source; /* if NULL and type == V4L2_BUF_TYPE_VIDEO_OUTPUT, | ||
49 | then just switch to user DMA YUV output mode */ | ||
50 | void __user *uv_source; /* Unused for RGB pixelformats */ | ||
51 | struct v4l2_rect src; | ||
52 | struct v4l2_rect dst; | ||
53 | __u32 src_width; | ||
54 | __u32 src_height; | ||
55 | }; | ||
56 | |||
57 | #define IVTV_IOC_DMA_FRAME _IOW ('V', BASE_VIDIOC_PRIVATE+0, struct ivtv_dma_frame) | ||
58 | |||
59 | /* These are the VBI types as they appear in the embedded VBI private packets. */ | ||
60 | #define IVTV_SLICED_TYPE_TELETEXT_B (1) | ||
61 | #define IVTV_SLICED_TYPE_CAPTION_525 (4) | ||
62 | #define IVTV_SLICED_TYPE_WSS_625 (5) | ||
63 | #define IVTV_SLICED_TYPE_VPS (7) | ||
64 | |||
65 | #endif /* _LINUX_IVTV_H */ | ||
diff --git a/include/media/tuner.h b/include/media/tuner.h index 99acf847365c..a41ac41113ac 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h | |||
@@ -177,6 +177,8 @@ struct tuner_setup { | |||
177 | unsigned short addr; /* I2C address */ | 177 | unsigned short addr; /* I2C address */ |
178 | unsigned int type; /* Tuner type */ | 178 | unsigned int type; /* Tuner type */ |
179 | unsigned int mode_mask; /* Allowed tuner modes */ | 179 | unsigned int mode_mask; /* Allowed tuner modes */ |
180 | unsigned int config; /* configuraion for more complex tuners */ | ||
181 | int (*tuner_callback) (void *dev, int command,int arg); | ||
180 | }; | 182 | }; |
181 | 183 | ||
182 | struct tuner { | 184 | struct tuner { |
@@ -211,6 +213,9 @@ struct tuner { | |||
211 | unsigned char tda827x_ver; | 213 | unsigned char tda827x_ver; |
212 | unsigned int sgIF; | 214 | unsigned int sgIF; |
213 | 215 | ||
216 | unsigned int config; | ||
217 | int (*tuner_callback) (void *dev, int command,int arg); | ||
218 | |||
214 | /* function ptrs */ | 219 | /* function ptrs */ |
215 | void (*set_tv_freq)(struct i2c_client *c, unsigned int freq); | 220 | void (*set_tv_freq)(struct i2c_client *c, unsigned int freq); |
216 | void (*set_radio_freq)(struct i2c_client *c, unsigned int freq); | 221 | void (*set_radio_freq)(struct i2c_client *c, unsigned int freq); |
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h new file mode 100644 index 000000000000..09d16c4f00f7 --- /dev/null +++ b/include/media/v4l2-chip-ident.h | |||
@@ -0,0 +1,149 @@ | |||
1 | /* | ||
2 | v4l2 chip identifiers header | ||
3 | |||
4 | This header provides a list of chip identifiers that can be returned | ||
5 | through the VIDIOC_G_CHIP_IDENT ioctl. | ||
6 | |||
7 | Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl> | ||
8 | |||
9 | This program is free software; you can redistribute it and/or modify | ||
10 | it under the terms of the GNU General Public License as published by | ||
11 | the Free Software Foundation; either version 2 of the License, or | ||
12 | (at your option) any later version. | ||
13 | |||
14 | This program is distributed in the hope that it will be useful, | ||
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | GNU General Public License for more details. | ||
18 | |||
19 | You should have received a copy of the GNU General Public License | ||
20 | along with this program; if not, write to the Free Software | ||
21 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | */ | ||
23 | |||
24 | #ifndef V4L2_CHIP_IDENT_H_ | ||
25 | #define V4L2_CHIP_IDENT_H_ | ||
26 | |||
27 | /* VIDIOC_G_CHIP_IDENT: identifies the actual chip installed on the board */ | ||
28 | enum { | ||
29 | /* general idents: reserved range 0-49 */ | ||
30 | V4L2_IDENT_NONE = 0, /* No chip matched */ | ||
31 | V4L2_IDENT_AMBIGUOUS = 1, /* Match too general, multiple chips matched */ | ||
32 | V4L2_IDENT_UNKNOWN = 2, /* Chip found, but cannot identify */ | ||
33 | |||
34 | /* module tvaudio: reserved range 50-99 */ | ||
35 | V4L2_IDENT_TVAUDIO = 50, /* A tvaudio chip, unknown which it is exactly */ | ||
36 | |||
37 | /* module saa7110: just ident 100 */ | ||
38 | V4L2_IDENT_SAA7110 = 100, | ||
39 | |||
40 | /* module saa7111: just ident 101 */ | ||
41 | V4L2_IDENT_SAA7111 = 101, | ||
42 | |||
43 | /* module saa7115: reserved range 102-149 */ | ||
44 | V4L2_IDENT_SAA7113 = 103, | ||
45 | V4L2_IDENT_SAA7114 = 104, | ||
46 | V4L2_IDENT_SAA7115 = 105, | ||
47 | V4L2_IDENT_SAA7118 = 108, | ||
48 | |||
49 | /* module saa7127: reserved range 150-199 */ | ||
50 | V4L2_IDENT_SAA7127 = 157, | ||
51 | V4L2_IDENT_SAA7129 = 159, | ||
52 | |||
53 | /* module cx25840: reserved range 200-249 */ | ||
54 | V4L2_IDENT_CX25836 = 236, | ||
55 | V4L2_IDENT_CX25837 = 237, | ||
56 | V4L2_IDENT_CX25840 = 240, | ||
57 | V4L2_IDENT_CX25841 = 241, | ||
58 | V4L2_IDENT_CX25842 = 242, | ||
59 | V4L2_IDENT_CX25843 = 243, | ||
60 | |||
61 | /* OmniVision sensors: reserved range 250-299 */ | ||
62 | V4L2_IDENT_OV7670 = 250, | ||
63 | |||
64 | /* Conexant MPEG encoder/decoders: reserved range 410-420 */ | ||
65 | V4L2_IDENT_CX23415 = 415, | ||
66 | V4L2_IDENT_CX23416 = 416, | ||
67 | |||
68 | /* module wm8739: just ident 8739 */ | ||
69 | V4L2_IDENT_WM8739 = 8739, | ||
70 | |||
71 | /* module wm8775: just ident 8775 */ | ||
72 | V4L2_IDENT_WM8775 = 8775, | ||
73 | |||
74 | /* module cs53132a: just ident 53132 */ | ||
75 | V4L2_IDENT_CS53l32A = 53132, | ||
76 | |||
77 | /* module upd64031a: just ident 64031 */ | ||
78 | V4L2_IDENT_UPD64031A = 64031, | ||
79 | |||
80 | /* module upd64083: just ident 64083 */ | ||
81 | V4L2_IDENT_UPD64083 = 64083, | ||
82 | |||
83 | /* module msp34xx: reserved range 34000-34999 */ | ||
84 | V4L2_IDENT_MSP3400B = 34002, | ||
85 | V4L2_IDENT_MSP3410B = 34102, | ||
86 | |||
87 | V4L2_IDENT_MSP3400C = 34003, | ||
88 | V4L2_IDENT_MSP3410C = 34103, | ||
89 | |||
90 | V4L2_IDENT_MSP3400D = 34004, | ||
91 | V4L2_IDENT_MSP3410D = 34104, | ||
92 | V4L2_IDENT_MSP3405D = 34054, | ||
93 | V4L2_IDENT_MSP3415D = 34154, | ||
94 | V4L2_IDENT_MSP3407D = 34074, | ||
95 | V4L2_IDENT_MSP3417D = 34174, | ||
96 | |||
97 | V4L2_IDENT_MSP3400G = 34007, | ||
98 | V4L2_IDENT_MSP3410G = 34107, | ||
99 | V4L2_IDENT_MSP3420G = 34207, | ||
100 | V4L2_IDENT_MSP3430G = 34307, | ||
101 | V4L2_IDENT_MSP3440G = 34407, | ||
102 | V4L2_IDENT_MSP3450G = 34507, | ||
103 | V4L2_IDENT_MSP3460G = 34607, | ||
104 | |||
105 | V4L2_IDENT_MSP3401G = 34017, | ||
106 | V4L2_IDENT_MSP3411G = 34117, | ||
107 | V4L2_IDENT_MSP3421G = 34217, | ||
108 | V4L2_IDENT_MSP3431G = 34317, | ||
109 | V4L2_IDENT_MSP3441G = 34417, | ||
110 | V4L2_IDENT_MSP3451G = 34517, | ||
111 | V4L2_IDENT_MSP3461G = 34617, | ||
112 | |||
113 | V4L2_IDENT_MSP3402G = 34027, | ||
114 | V4L2_IDENT_MSP3412G = 34127, | ||
115 | V4L2_IDENT_MSP3422G = 34227, | ||
116 | V4L2_IDENT_MSP3442G = 34427, | ||
117 | V4L2_IDENT_MSP3452G = 34527, | ||
118 | |||
119 | V4L2_IDENT_MSP3405G = 34057, | ||
120 | V4L2_IDENT_MSP3415G = 34157, | ||
121 | V4L2_IDENT_MSP3425G = 34257, | ||
122 | V4L2_IDENT_MSP3435G = 34357, | ||
123 | V4L2_IDENT_MSP3445G = 34457, | ||
124 | V4L2_IDENT_MSP3455G = 34557, | ||
125 | V4L2_IDENT_MSP3465G = 34657, | ||
126 | |||
127 | V4L2_IDENT_MSP3407G = 34077, | ||
128 | V4L2_IDENT_MSP3417G = 34177, | ||
129 | V4L2_IDENT_MSP3427G = 34277, | ||
130 | V4L2_IDENT_MSP3437G = 34377, | ||
131 | V4L2_IDENT_MSP3447G = 34477, | ||
132 | V4L2_IDENT_MSP3457G = 34577, | ||
133 | V4L2_IDENT_MSP3467G = 34677, | ||
134 | |||
135 | /* module msp44xx: reserved range 44000-44999 */ | ||
136 | V4L2_IDENT_MSP4400G = 44007, | ||
137 | V4L2_IDENT_MSP4410G = 44107, | ||
138 | V4L2_IDENT_MSP4420G = 44207, | ||
139 | V4L2_IDENT_MSP4440G = 44407, | ||
140 | V4L2_IDENT_MSP4450G = 44507, | ||
141 | |||
142 | V4L2_IDENT_MSP4408G = 44087, | ||
143 | V4L2_IDENT_MSP4418G = 44187, | ||
144 | V4L2_IDENT_MSP4428G = 44287, | ||
145 | V4L2_IDENT_MSP4448G = 44487, | ||
146 | V4L2_IDENT_MSP4458G = 44587, | ||
147 | }; | ||
148 | |||
149 | #endif | ||
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 6eaeec98ed89..181a40c46a52 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
@@ -98,6 +98,8 @@ u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id); | |||
98 | 98 | ||
99 | struct i2c_client; /* forward reference */ | 99 | struct i2c_client; /* forward reference */ |
100 | int v4l2_chip_match_i2c_client(struct i2c_client *c, u32 id_type, u32 chip_id); | 100 | int v4l2_chip_match_i2c_client(struct i2c_client *c, u32 id_type, u32 chip_id); |
101 | int v4l2_chip_ident_i2c_client(struct i2c_client *c, struct v4l2_chip_ident *chip, | ||
102 | u32 ident, u32 revision); | ||
101 | int v4l2_chip_match_host(u32 id_type, u32 chip_id); | 103 | int v4l2_chip_match_host(u32 id_type, u32 chip_id); |
102 | 104 | ||
103 | /* ------------------------------------------------------------------------- */ | 105 | /* ------------------------------------------------------------------------- */ |
@@ -114,39 +116,6 @@ struct v4l2_decode_vbi_line { | |||
114 | u32 type; /* VBI service type (V4L2_SLICED_*). 0 if no service found */ | 116 | u32 type; /* VBI service type (V4L2_SLICED_*). 0 if no service found */ |
115 | }; | 117 | }; |
116 | 118 | ||
117 | /* VIDIOC_INT_G_CHIP_IDENT: identifies the actual chip installed on the board */ | ||
118 | enum v4l2_chip_ident { | ||
119 | /* general idents: reserved range 0-49 */ | ||
120 | V4L2_IDENT_UNKNOWN = 0, | ||
121 | |||
122 | /* module saa7110: just ident= 100 */ | ||
123 | V4L2_IDENT_SAA7110 = 100, | ||
124 | |||
125 | /* module saa7111: just ident= 101 */ | ||
126 | V4L2_IDENT_SAA7111 = 101, | ||
127 | |||
128 | /* module saa7115: reserved range 102-149 */ | ||
129 | V4L2_IDENT_SAA7113 = 103, | ||
130 | V4L2_IDENT_SAA7114 = 104, | ||
131 | V4L2_IDENT_SAA7115 = 105, | ||
132 | V4L2_IDENT_SAA7118 = 108, | ||
133 | |||
134 | /* module saa7127: reserved range 150-199 */ | ||
135 | V4L2_IDENT_SAA7127 = 157, | ||
136 | V4L2_IDENT_SAA7129 = 159, | ||
137 | |||
138 | /* module cx25840: reserved range 200-249 */ | ||
139 | V4L2_IDENT_CX25836 = 236, | ||
140 | V4L2_IDENT_CX25837 = 237, | ||
141 | V4L2_IDENT_CX25840 = 240, | ||
142 | V4L2_IDENT_CX25841 = 241, | ||
143 | V4L2_IDENT_CX25842 = 242, | ||
144 | V4L2_IDENT_CX25843 = 243, | ||
145 | |||
146 | /* OmniVision sensors - range 250-299 */ | ||
147 | V4L2_IDENT_OV7670 = 250, | ||
148 | }; | ||
149 | |||
150 | /* audio ioctls */ | 119 | /* audio ioctls */ |
151 | 120 | ||
152 | /* v4l device was opened in Radio mode, to be replaced by VIDIOC_INT_S_TUNER_MODE */ | 121 | /* v4l device was opened in Radio mode, to be replaced by VIDIOC_INT_S_TUNER_MODE */ |
@@ -208,10 +177,6 @@ enum v4l2_chip_ident { | |||
208 | whether CC data from the first or second field should be obtained). */ | 177 | whether CC data from the first or second field should be obtained). */ |
209 | #define VIDIOC_INT_G_VBI_DATA _IOWR('d', 106, struct v4l2_sliced_vbi_data) | 178 | #define VIDIOC_INT_G_VBI_DATA _IOWR('d', 106, struct v4l2_sliced_vbi_data) |
210 | 179 | ||
211 | /* Returns the chip identifier or V4L2_IDENT_UNKNOWN if no identification can | ||
212 | be made. */ | ||
213 | #define VIDIOC_INT_G_CHIP_IDENT _IOR ('d', 107, enum v4l2_chip_ident) | ||
214 | |||
215 | /* Sets I2S speed in bps. This is used to provide a standard way to select I2S | 180 | /* Sets I2S speed in bps. This is used to provide a standard way to select I2S |
216 | clock used by driving digital audio streams at some board designs. | 181 | clock used by driving digital audio streams at some board designs. |
217 | Usual values for the frequency are 1024000 and 2048000. | 182 | Usual values for the frequency are 1024000 and 2048000. |
@@ -254,4 +219,12 @@ struct v4l2_crystal_freq { | |||
254 | default values. */ | 219 | default values. */ |
255 | #define VIDIOC_INT_INIT _IOW ('d', 114, u32) | 220 | #define VIDIOC_INT_INIT _IOW ('d', 114, u32) |
256 | 221 | ||
222 | /* Set v4l2_std_id for video OUTPUT devices. This is ignored by | ||
223 | video input devices. */ | ||
224 | #define VIDIOC_INT_S_STD_OUTPUT _IOW ('d', 115, v4l2_std_id) | ||
225 | |||
226 | /* Get v4l2_std_id for video OUTPUT devices. This is ignored by | ||
227 | video input devices. */ | ||
228 | #define VIDIOC_INT_G_STD_OUTPUT _IOW ('d', 116, v4l2_std_id) | ||
229 | |||
257 | #endif /* V4L2_COMMON_H_ */ | 230 | #endif /* V4L2_COMMON_H_ */ |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 1dd3d3239ecf..d62847f846c2 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -127,6 +127,8 @@ struct video_device | |||
127 | struct v4l2_fmtdesc *f); | 127 | struct v4l2_fmtdesc *f); |
128 | int (*vidioc_enum_fmt_video_output)(struct file *file, void *fh, | 128 | int (*vidioc_enum_fmt_video_output)(struct file *file, void *fh, |
129 | struct v4l2_fmtdesc *f); | 129 | struct v4l2_fmtdesc *f); |
130 | int (*vidioc_enum_fmt_output_overlay) (struct file *file, void *fh, | ||
131 | struct v4l2_fmtdesc *f); | ||
130 | int (*vidioc_enum_fmt_vbi_output) (struct file *file, void *fh, | 132 | int (*vidioc_enum_fmt_vbi_output) (struct file *file, void *fh, |
131 | struct v4l2_fmtdesc *f); | 133 | struct v4l2_fmtdesc *f); |
132 | int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh, | 134 | int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh, |
@@ -145,6 +147,8 @@ struct video_device | |||
145 | struct v4l2_format *f); | 147 | struct v4l2_format *f); |
146 | int (*vidioc_g_fmt_video_output)(struct file *file, void *fh, | 148 | int (*vidioc_g_fmt_video_output)(struct file *file, void *fh, |
147 | struct v4l2_format *f); | 149 | struct v4l2_format *f); |
150 | int (*vidioc_g_fmt_output_overlay) (struct file *file, void *fh, | ||
151 | struct v4l2_format *f); | ||
148 | int (*vidioc_g_fmt_type_private)(struct file *file, void *fh, | 152 | int (*vidioc_g_fmt_type_private)(struct file *file, void *fh, |
149 | struct v4l2_format *f); | 153 | struct v4l2_format *f); |
150 | 154 | ||
@@ -162,6 +166,8 @@ struct video_device | |||
162 | struct v4l2_format *f); | 166 | struct v4l2_format *f); |
163 | int (*vidioc_s_fmt_video_output)(struct file *file, void *fh, | 167 | int (*vidioc_s_fmt_video_output)(struct file *file, void *fh, |
164 | struct v4l2_format *f); | 168 | struct v4l2_format *f); |
169 | int (*vidioc_s_fmt_output_overlay) (struct file *file, void *fh, | ||
170 | struct v4l2_format *f); | ||
165 | int (*vidioc_s_fmt_type_private)(struct file *file, void *fh, | 171 | int (*vidioc_s_fmt_type_private)(struct file *file, void *fh, |
166 | struct v4l2_format *f); | 172 | struct v4l2_format *f); |
167 | 173 | ||
@@ -178,6 +184,8 @@ struct video_device | |||
178 | struct v4l2_format *f); | 184 | struct v4l2_format *f); |
179 | int (*vidioc_try_fmt_video_output)(struct file *file, void *fh, | 185 | int (*vidioc_try_fmt_video_output)(struct file *file, void *fh, |
180 | struct v4l2_format *f); | 186 | struct v4l2_format *f); |
187 | int (*vidioc_try_fmt_output_overlay)(struct file *file, void *fh, | ||
188 | struct v4l2_format *f); | ||
181 | int (*vidioc_try_fmt_type_private)(struct file *file, void *fh, | 189 | int (*vidioc_try_fmt_type_private)(struct file *file, void *fh, |
182 | struct v4l2_format *f); | 190 | struct v4l2_format *f); |
183 | 191 | ||
@@ -309,6 +317,8 @@ struct video_device | |||
309 | int (*vidioc_s_register) (struct file *file, void *fh, | 317 | int (*vidioc_s_register) (struct file *file, void *fh, |
310 | struct v4l2_register *reg); | 318 | struct v4l2_register *reg); |
311 | #endif | 319 | #endif |
320 | int (*vidioc_g_chip_ident) (struct file *file, void *fh, | ||
321 | struct v4l2_chip_ident *chip); | ||
312 | 322 | ||
313 | 323 | ||
314 | #ifdef OBSOLETE_OWNER /* to be removed soon */ | 324 | #ifdef OBSOLETE_OWNER /* to be removed soon */ |