diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-24 14:21:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-24 14:21:08 -0400 |
commit | c328d54cd4ad120d76284e46dcca6c6cf996154a (patch) | |
tree | 104c023be66faa5fce6e0a56c0a6d13c62fd21e5 /include/media | |
parent | 346ad4b7fe392571f19314f153db9151dbc1d82b (diff) | |
parent | b0166ab3a6ae6d7af8d9a21a7836154963c69a11 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (452 commits)
V4L/DVB (7731): tuner-xc2028: fix signal strength calculus
V4L/DVB (7730): tuner-xc2028: Fix SCODE load for MTS firmwares
V4L/DVB (7729): Fix VIDIOCGAP corruption in ivtv
V4L/DVB (7728): tea5761: bugzilla #10462: tea5761 autodetection code were broken
V4L/DVB (7726): cx23885: Enable cx23417 support on the HVR1800
V4L/DVB (7725): cx23885: Add generic cx23417 hardware encoder support
V4L/DVB (7723): pvrusb2: Clean up input selection list generation in V4L interface
V4L/DVB (7722): pvrusb2: Implement FM radio support for Gotview USB2.0 DVD 2
V4L/DVB (7721): pvrusb2: Restructure cx23416 firmware loading to have a common exit point
V4L/DVB (7720): pvrusb2: Fix bad error code on cx23416 firmware load failure
V4L/DVB (7719): pvrusb2: Implement input selection enforcement
V4L/DVB (7718): pvrusb2-dvb: update Kbuild selections
V4L/DVB (7717): pvrusb2-dvb: add DVB-T support for Hauppauge pvrusb2 model 73xxx
V4L/DVB (7716): pvrusb2: clean up global functions
V4L/DVB (7715): pvrusb2: Clean out all use of __FUNCTION__
V4L/DVB (7714): pvrusb2: Fix hang on module removal
V4L/DVB (7713): pvrusb2: Implement cleaner DVB kernel thread shutdown
V4L/DVB (7712): pvrusb2: Close connect/disconnect race
V4L/DVB (7711): pvrusb2: Fix race on module unload
V4L/DVB (7710): pvrusb2: Implement critical digital streaming quirk for onair devices
...
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/ir-common.h | 3 | ||||
-rw-r--r-- | include/media/soc_camera.h | 179 | ||||
-rw-r--r-- | include/media/tuner-types.h | 17 | ||||
-rw-r--r-- | include/media/tuner.h | 2 | ||||
-rw-r--r-- | include/media/v4l2-chip-ident.h | 6 | ||||
-rw-r--r-- | include/media/v4l2-dev.h | 4 | ||||
-rw-r--r-- | include/media/videobuf-core.h | 24 | ||||
-rw-r--r-- | include/media/videobuf-dma-sg.h | 17 | ||||
-rw-r--r-- | include/media/videobuf-dvb.h | 3 | ||||
-rw-r--r-- | include/media/videobuf-vmalloc.h | 4 |
10 files changed, 233 insertions, 26 deletions
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index a4274203f252..bfee8be5d63f 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
@@ -107,6 +107,7 @@ extern IR_KEYTAB_TYPE ir_codes_avermedia[IR_KEYTAB_SIZE]; | |||
107 | extern IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE]; | 107 | extern IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE]; |
108 | extern IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE]; | 108 | extern IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE]; |
109 | extern IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE]; | 109 | extern IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE]; |
110 | extern IR_KEYTAB_TYPE ir_codes_pixelview_new[IR_KEYTAB_SIZE]; | ||
110 | extern IR_KEYTAB_TYPE ir_codes_nebula[IR_KEYTAB_SIZE]; | 111 | extern IR_KEYTAB_TYPE ir_codes_nebula[IR_KEYTAB_SIZE]; |
111 | extern IR_KEYTAB_TYPE ir_codes_dntv_live_dvb_t[IR_KEYTAB_SIZE]; | 112 | extern IR_KEYTAB_TYPE ir_codes_dntv_live_dvb_t[IR_KEYTAB_SIZE]; |
112 | extern IR_KEYTAB_TYPE ir_codes_iodata_bctv7e[IR_KEYTAB_SIZE]; | 113 | extern IR_KEYTAB_TYPE ir_codes_iodata_bctv7e[IR_KEYTAB_SIZE]; |
@@ -141,8 +142,10 @@ extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE]; | |||
141 | extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE]; | 142 | extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE]; |
142 | extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE]; | 143 | extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE]; |
143 | extern IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE]; | 144 | extern IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE]; |
145 | extern IR_KEYTAB_TYPE ir_codes_behold_columbus[IR_KEYTAB_SIZE]; | ||
144 | extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; | 146 | extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; |
145 | extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE]; | 147 | extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE]; |
148 | extern IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE]; | ||
146 | 149 | ||
147 | #endif | 150 | #endif |
148 | 151 | ||
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h new file mode 100644 index 000000000000..6a8c8be7a1ae --- /dev/null +++ b/include/media/soc_camera.h | |||
@@ -0,0 +1,179 @@ | |||
1 | /* | ||
2 | * camera image capture (abstract) bus driver header | ||
3 | * | ||
4 | * Copyright (C) 2006, Sascha Hauer, Pengutronix | ||
5 | * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef SOC_CAMERA_H | ||
13 | #define SOC_CAMERA_H | ||
14 | |||
15 | #include <linux/videodev2.h> | ||
16 | #include <media/videobuf-dma-sg.h> | ||
17 | |||
18 | struct soc_camera_device { | ||
19 | struct list_head list; | ||
20 | struct device dev; | ||
21 | struct device *control; | ||
22 | unsigned short width; /* Current window */ | ||
23 | unsigned short height; /* sizes */ | ||
24 | unsigned short x_min; /* Camera capabilities */ | ||
25 | unsigned short y_min; | ||
26 | unsigned short x_current; /* Current window location */ | ||
27 | unsigned short y_current; | ||
28 | unsigned short width_min; | ||
29 | unsigned short width_max; | ||
30 | unsigned short height_min; | ||
31 | unsigned short height_max; | ||
32 | unsigned short y_skip_top; /* Lines to skip at the top */ | ||
33 | unsigned short gain; | ||
34 | unsigned short exposure; | ||
35 | unsigned char iface; /* Host number */ | ||
36 | unsigned char devnum; /* Device number per host */ | ||
37 | unsigned char buswidth; /* See comment in .c */ | ||
38 | struct soc_camera_ops *ops; | ||
39 | struct video_device *vdev; | ||
40 | const struct soc_camera_data_format *current_fmt; | ||
41 | const struct soc_camera_data_format *formats; | ||
42 | int num_formats; | ||
43 | struct module *owner; | ||
44 | /* soc_camera.c private count. Only accessed with video_lock held */ | ||
45 | int use_count; | ||
46 | }; | ||
47 | |||
48 | struct soc_camera_file { | ||
49 | struct soc_camera_device *icd; | ||
50 | struct videobuf_queue vb_vidq; | ||
51 | spinlock_t *lock; | ||
52 | }; | ||
53 | |||
54 | struct soc_camera_host { | ||
55 | struct list_head list; | ||
56 | struct device dev; | ||
57 | unsigned char nr; /* Host number */ | ||
58 | size_t msize; | ||
59 | struct videobuf_queue_ops *vbq_ops; | ||
60 | void *priv; | ||
61 | char *drv_name; | ||
62 | struct soc_camera_host_ops *ops; | ||
63 | }; | ||
64 | |||
65 | struct soc_camera_host_ops { | ||
66 | struct module *owner; | ||
67 | int (*add)(struct soc_camera_device *); | ||
68 | void (*remove)(struct soc_camera_device *); | ||
69 | int (*set_fmt_cap)(struct soc_camera_device *, __u32, | ||
70 | struct v4l2_rect *); | ||
71 | int (*try_fmt_cap)(struct soc_camera_device *, struct v4l2_format *); | ||
72 | int (*reqbufs)(struct soc_camera_file *, struct v4l2_requestbuffers *); | ||
73 | int (*querycap)(struct soc_camera_host *, struct v4l2_capability *); | ||
74 | int (*try_bus_param)(struct soc_camera_device *, __u32); | ||
75 | int (*set_bus_param)(struct soc_camera_device *, __u32); | ||
76 | unsigned int (*poll)(struct file *, poll_table *); | ||
77 | spinlock_t* (*spinlock_alloc)(struct soc_camera_file *); | ||
78 | void (*spinlock_free)(spinlock_t *); | ||
79 | }; | ||
80 | |||
81 | struct soc_camera_link { | ||
82 | /* Camera bus id, used to match a camera and a bus */ | ||
83 | int bus_id; | ||
84 | /* GPIO number to switch between 8 and 10 bit modes */ | ||
85 | unsigned int gpio; | ||
86 | }; | ||
87 | |||
88 | static inline struct soc_camera_device *to_soc_camera_dev(struct device *dev) | ||
89 | { | ||
90 | return container_of(dev, struct soc_camera_device, dev); | ||
91 | } | ||
92 | |||
93 | static inline struct soc_camera_host *to_soc_camera_host(struct device *dev) | ||
94 | { | ||
95 | return container_of(dev, struct soc_camera_host, dev); | ||
96 | } | ||
97 | |||
98 | extern int soc_camera_host_register(struct soc_camera_host *ici); | ||
99 | extern void soc_camera_host_unregister(struct soc_camera_host *ici); | ||
100 | extern int soc_camera_device_register(struct soc_camera_device *icd); | ||
101 | extern void soc_camera_device_unregister(struct soc_camera_device *icd); | ||
102 | |||
103 | extern int soc_camera_video_start(struct soc_camera_device *icd); | ||
104 | extern void soc_camera_video_stop(struct soc_camera_device *icd); | ||
105 | |||
106 | struct soc_camera_data_format { | ||
107 | char *name; | ||
108 | unsigned int depth; | ||
109 | __u32 fourcc; | ||
110 | enum v4l2_colorspace colorspace; | ||
111 | }; | ||
112 | |||
113 | struct soc_camera_ops { | ||
114 | struct module *owner; | ||
115 | int (*probe)(struct soc_camera_device *); | ||
116 | void (*remove)(struct soc_camera_device *); | ||
117 | int (*init)(struct soc_camera_device *); | ||
118 | int (*release)(struct soc_camera_device *); | ||
119 | int (*start_capture)(struct soc_camera_device *); | ||
120 | int (*stop_capture)(struct soc_camera_device *); | ||
121 | int (*set_fmt_cap)(struct soc_camera_device *, __u32, | ||
122 | struct v4l2_rect *); | ||
123 | int (*try_fmt_cap)(struct soc_camera_device *, struct v4l2_format *); | ||
124 | unsigned long (*query_bus_param)(struct soc_camera_device *); | ||
125 | int (*set_bus_param)(struct soc_camera_device *, unsigned long); | ||
126 | int (*get_chip_id)(struct soc_camera_device *, | ||
127 | struct v4l2_chip_ident *); | ||
128 | #ifdef CONFIG_VIDEO_ADV_DEBUG | ||
129 | int (*get_register)(struct soc_camera_device *, struct v4l2_register *); | ||
130 | int (*set_register)(struct soc_camera_device *, struct v4l2_register *); | ||
131 | #endif | ||
132 | int (*get_control)(struct soc_camera_device *, struct v4l2_control *); | ||
133 | int (*set_control)(struct soc_camera_device *, struct v4l2_control *); | ||
134 | const struct v4l2_queryctrl *controls; | ||
135 | int num_controls; | ||
136 | }; | ||
137 | |||
138 | static inline struct v4l2_queryctrl const *soc_camera_find_qctrl( | ||
139 | struct soc_camera_ops *ops, int id) | ||
140 | { | ||
141 | int i; | ||
142 | |||
143 | for (i = 0; i < ops->num_controls; i++) | ||
144 | if (ops->controls[i].id == id) | ||
145 | return &ops->controls[i]; | ||
146 | |||
147 | return NULL; | ||
148 | } | ||
149 | |||
150 | #define SOCAM_MASTER (1 << 0) | ||
151 | #define SOCAM_SLAVE (1 << 1) | ||
152 | #define SOCAM_HSYNC_ACTIVE_HIGH (1 << 2) | ||
153 | #define SOCAM_HSYNC_ACTIVE_LOW (1 << 3) | ||
154 | #define SOCAM_VSYNC_ACTIVE_HIGH (1 << 4) | ||
155 | #define SOCAM_VSYNC_ACTIVE_LOW (1 << 5) | ||
156 | #define SOCAM_DATAWIDTH_8 (1 << 6) | ||
157 | #define SOCAM_DATAWIDTH_9 (1 << 7) | ||
158 | #define SOCAM_DATAWIDTH_10 (1 << 8) | ||
159 | #define SOCAM_PCLK_SAMPLE_RISING (1 << 9) | ||
160 | #define SOCAM_PCLK_SAMPLE_FALLING (1 << 10) | ||
161 | |||
162 | #define SOCAM_DATAWIDTH_MASK (SOCAM_DATAWIDTH_8 | SOCAM_DATAWIDTH_9 | \ | ||
163 | SOCAM_DATAWIDTH_10) | ||
164 | |||
165 | static inline unsigned long soc_camera_bus_param_compatible( | ||
166 | unsigned long camera_flags, unsigned long bus_flags) | ||
167 | { | ||
168 | unsigned long common_flags, hsync, vsync, pclk; | ||
169 | |||
170 | common_flags = camera_flags & bus_flags; | ||
171 | |||
172 | hsync = common_flags & (SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_LOW); | ||
173 | vsync = common_flags & (SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_LOW); | ||
174 | pclk = common_flags & (SOCAM_PCLK_SAMPLE_RISING | SOCAM_PCLK_SAMPLE_FALLING); | ||
175 | |||
176 | return (!hsync || !vsync || !pclk) ? 0 : common_flags; | ||
177 | } | ||
178 | |||
179 | #endif | ||
diff --git a/include/media/tuner-types.h b/include/media/tuner-types.h index b201371416a0..ab03c5344209 100644 --- a/include/media/tuner-types.h +++ b/include/media/tuner-types.h | |||
@@ -6,10 +6,11 @@ | |||
6 | #define __TUNER_TYPES_H__ | 6 | #define __TUNER_TYPES_H__ |
7 | 7 | ||
8 | enum param_type { | 8 | enum param_type { |
9 | TUNER_PARAM_TYPE_RADIO, \ | 9 | TUNER_PARAM_TYPE_RADIO, |
10 | TUNER_PARAM_TYPE_PAL, \ | 10 | TUNER_PARAM_TYPE_PAL, |
11 | TUNER_PARAM_TYPE_SECAM, \ | 11 | TUNER_PARAM_TYPE_SECAM, |
12 | TUNER_PARAM_TYPE_NTSC | 12 | TUNER_PARAM_TYPE_NTSC, |
13 | TUNER_PARAM_TYPE_DIGITAL, | ||
13 | }; | 14 | }; |
14 | 15 | ||
15 | struct tuner_range { | 16 | struct tuner_range { |
@@ -105,6 +106,7 @@ struct tuner_params { | |||
105 | the SECAM-L/L' standards. Range: -16:+15 */ | 106 | the SECAM-L/L' standards. Range: -16:+15 */ |
106 | signed int default_top_secam_high:5; | 107 | signed int default_top_secam_high:5; |
107 | 108 | ||
109 | u16 iffreq; | ||
108 | 110 | ||
109 | unsigned int count; | 111 | unsigned int count; |
110 | struct tuner_range *ranges; | 112 | struct tuner_range *ranges; |
@@ -114,6 +116,13 @@ struct tunertype { | |||
114 | char *name; | 116 | char *name; |
115 | unsigned int count; | 117 | unsigned int count; |
116 | struct tuner_params *params; | 118 | struct tuner_params *params; |
119 | |||
120 | u16 min; | ||
121 | u16 max; | ||
122 | u32 stepsize; | ||
123 | |||
124 | u8 *initdata; | ||
125 | u8 *sleepdata; | ||
117 | }; | 126 | }; |
118 | 127 | ||
119 | extern struct tunertype tuners[]; | 128 | extern struct tunertype tuners[]; |
diff --git a/include/media/tuner.h b/include/media/tuner.h index 1bf24a6ed8f1..77068fcc86bd 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h | |||
@@ -78,7 +78,7 @@ | |||
78 | 78 | ||
79 | #define TUNER_HITACHI_NTSC 40 | 79 | #define TUNER_HITACHI_NTSC 40 |
80 | #define TUNER_PHILIPS_PAL_MK 41 | 80 | #define TUNER_PHILIPS_PAL_MK 41 |
81 | #define TUNER_PHILIPS_ATSC 42 | 81 | #define TUNER_PHILIPS_FCV1236D 42 |
82 | #define TUNER_PHILIPS_FM1236_MK3 43 | 82 | #define TUNER_PHILIPS_FM1236_MK3 43 |
83 | 83 | ||
84 | #define TUNER_PHILIPS_4IN1 44 /* ATI TV Wonder Pro - Conexant */ | 84 | #define TUNER_PHILIPS_4IN1 44 /* ATI TV Wonder Pro - Conexant */ |
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h index 032bb75f69c2..0ea0bd85c036 100644 --- a/include/media/v4l2-chip-ident.h +++ b/include/media/v4l2-chip-ident.h | |||
@@ -153,6 +153,12 @@ enum { | |||
153 | V4L2_IDENT_MSP4428G = 44287, | 153 | V4L2_IDENT_MSP4428G = 44287, |
154 | V4L2_IDENT_MSP4448G = 44487, | 154 | V4L2_IDENT_MSP4448G = 44487, |
155 | V4L2_IDENT_MSP4458G = 44587, | 155 | V4L2_IDENT_MSP4458G = 44587, |
156 | |||
157 | /* Micron CMOS sensor chips: 45000-45099 */ | ||
158 | V4L2_IDENT_MT9M001C12ST = 45000, | ||
159 | V4L2_IDENT_MT9M001C12STM = 45005, | ||
160 | V4L2_IDENT_MT9V022IX7ATC = 45010, /* No way to detect "normal" I77ATx */ | ||
161 | V4L2_IDENT_MT9V022IX7ATM = 45015, /* and "lead free" IA7ATx chips */ | ||
156 | }; | 162 | }; |
157 | 163 | ||
158 | #endif | 164 | #endif |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index f2114459995d..a807d2f86ee8 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -318,6 +318,10 @@ struct video_device | |||
318 | int (*vidioc_g_chip_ident) (struct file *file, void *fh, | 318 | int (*vidioc_g_chip_ident) (struct file *file, void *fh, |
319 | struct v4l2_chip_ident *chip); | 319 | struct v4l2_chip_ident *chip); |
320 | 320 | ||
321 | /* For other private ioctls */ | ||
322 | int (*vidioc_default) (struct file *file, void *fh, | ||
323 | int cmd, void *arg); | ||
324 | |||
321 | 325 | ||
322 | #ifdef OBSOLETE_OWNER /* to be removed soon */ | 326 | #ifdef OBSOLETE_OWNER /* to be removed soon */ |
323 | /* obsolete -- fops->owner is used instead */ | 327 | /* obsolete -- fops->owner is used instead */ |
diff --git a/include/media/videobuf-core.h b/include/media/videobuf-core.h index 99033945cdee..5b39a22533fe 100644 --- a/include/media/videobuf-core.h +++ b/include/media/videobuf-core.h | |||
@@ -13,6 +13,9 @@ | |||
13 | * the Free Software Foundation; either version 2 | 13 | * the Free Software Foundation; either version 2 |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifndef _VIDEOBUF_CORE_H | ||
17 | #define _VIDEOBUF_CORE_H | ||
18 | |||
16 | #include <linux/poll.h> | 19 | #include <linux/poll.h> |
17 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | 20 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
18 | #include <linux/videodev.h> | 21 | #include <linux/videodev.h> |
@@ -123,7 +126,8 @@ struct videobuf_queue_ops { | |||
123 | struct videobuf_qtype_ops { | 126 | struct videobuf_qtype_ops { |
124 | u32 magic; | 127 | u32 magic; |
125 | 128 | ||
126 | void* (*alloc) (size_t size); | 129 | void *(*alloc) (size_t size); |
130 | void *(*vmalloc) (struct videobuf_buffer *buf); | ||
127 | int (*iolock) (struct videobuf_queue* q, | 131 | int (*iolock) (struct videobuf_queue* q, |
128 | struct videobuf_buffer *vb, | 132 | struct videobuf_buffer *vb, |
129 | struct v4l2_framebuffer *fbuf); | 133 | struct v4l2_framebuffer *fbuf); |
@@ -151,7 +155,9 @@ struct videobuf_qtype_ops { | |||
151 | struct videobuf_queue { | 155 | struct videobuf_queue { |
152 | struct mutex vb_lock; | 156 | struct mutex vb_lock; |
153 | spinlock_t *irqlock; | 157 | spinlock_t *irqlock; |
154 | void *dev; /* on pci, points to struct pci_dev */ | 158 | struct device *dev; |
159 | |||
160 | wait_queue_head_t wait; /* wait if queue is empty */ | ||
155 | 161 | ||
156 | enum v4l2_buf_type type; | 162 | enum v4l2_buf_type type; |
157 | unsigned int inputs; /* for V4L2_BUF_FLAG_INPUT */ | 163 | unsigned int inputs; /* for V4L2_BUF_FLAG_INPUT */ |
@@ -183,9 +189,13 @@ int videobuf_iolock(struct videobuf_queue* q, struct videobuf_buffer *vb, | |||
183 | 189 | ||
184 | void *videobuf_alloc(struct videobuf_queue* q); | 190 | void *videobuf_alloc(struct videobuf_queue* q); |
185 | 191 | ||
192 | /* Used on videobuf-dvb */ | ||
193 | void *videobuf_queue_to_vmalloc (struct videobuf_queue* q, | ||
194 | struct videobuf_buffer *buf); | ||
195 | |||
186 | void videobuf_queue_core_init(struct videobuf_queue *q, | 196 | void videobuf_queue_core_init(struct videobuf_queue *q, |
187 | struct videobuf_queue_ops *ops, | 197 | struct videobuf_queue_ops *ops, |
188 | void *dev, | 198 | struct device *dev, |
189 | spinlock_t *irqlock, | 199 | spinlock_t *irqlock, |
190 | enum v4l2_buf_type type, | 200 | enum v4l2_buf_type type, |
191 | enum v4l2_field field, | 201 | enum v4l2_field field, |
@@ -231,10 +241,4 @@ int videobuf_mmap_free(struct videobuf_queue *q); | |||
231 | int videobuf_mmap_mapper(struct videobuf_queue *q, | 241 | int videobuf_mmap_mapper(struct videobuf_queue *q, |
232 | struct vm_area_struct *vma); | 242 | struct vm_area_struct *vma); |
233 | 243 | ||
234 | /* --------------------------------------------------------------------- */ | 244 | #endif |
235 | |||
236 | /* | ||
237 | * Local variables: | ||
238 | * c-basic-offset: 8 | ||
239 | * End: | ||
240 | */ | ||
diff --git a/include/media/videobuf-dma-sg.h b/include/media/videobuf-dma-sg.h index 38105031db23..be8da269ee33 100644 --- a/include/media/videobuf-dma-sg.h +++ b/include/media/videobuf-dma-sg.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * helper functions for PCI DMA video4linux capture buffers | 2 | * helper functions for SG DMA video4linux capture buffers |
3 | * | 3 | * |
4 | * The functions expect the hardware being able to scatter gatter | 4 | * The functions expect the hardware being able to scatter gatter |
5 | * (i.e. the buffers are not linear in physical memory, but fragmented | 5 | * (i.e. the buffers are not linear in physical memory, but fragmented |
@@ -68,9 +68,6 @@ struct videobuf_dmabuf { | |||
68 | /* for kernel buffers */ | 68 | /* for kernel buffers */ |
69 | void *vmalloc; | 69 | void *vmalloc; |
70 | 70 | ||
71 | /* Stores the userspace pointer to vmalloc area */ | ||
72 | void *varea; | ||
73 | |||
74 | /* for overlay buffers (pci-pci dma) */ | 71 | /* for overlay buffers (pci-pci dma) */ |
75 | dma_addr_t bus_addr; | 72 | dma_addr_t bus_addr; |
76 | 73 | ||
@@ -81,7 +78,7 @@ struct videobuf_dmabuf { | |||
81 | int direction; | 78 | int direction; |
82 | }; | 79 | }; |
83 | 80 | ||
84 | struct videbuf_pci_sg_memory | 81 | struct videobuf_dma_sg_memory |
85 | { | 82 | { |
86 | u32 magic; | 83 | u32 magic; |
87 | 84 | ||
@@ -103,11 +100,11 @@ int videobuf_dma_sync(struct videobuf_queue* q,struct videobuf_dmabuf *dma); | |||
103 | int videobuf_dma_unmap(struct videobuf_queue* q,struct videobuf_dmabuf *dma); | 100 | int videobuf_dma_unmap(struct videobuf_queue* q,struct videobuf_dmabuf *dma); |
104 | struct videobuf_dmabuf *videobuf_to_dma (struct videobuf_buffer *buf); | 101 | struct videobuf_dmabuf *videobuf_to_dma (struct videobuf_buffer *buf); |
105 | 102 | ||
106 | void *videobuf_pci_alloc (size_t size); | 103 | void *videobuf_sg_alloc(size_t size); |
107 | 104 | ||
108 | void videobuf_queue_pci_init(struct videobuf_queue* q, | 105 | void videobuf_queue_sg_init(struct videobuf_queue* q, |
109 | struct videobuf_queue_ops *ops, | 106 | struct videobuf_queue_ops *ops, |
110 | void *dev, | 107 | struct device *dev, |
111 | spinlock_t *irqlock, | 108 | spinlock_t *irqlock, |
112 | enum v4l2_buf_type type, | 109 | enum v4l2_buf_type type, |
113 | enum v4l2_field field, | 110 | enum v4l2_field field, |
@@ -117,6 +114,6 @@ void videobuf_queue_pci_init(struct videobuf_queue* q, | |||
117 | /*FIXME: these variants are used only on *-alsa code, where videobuf is | 114 | /*FIXME: these variants are used only on *-alsa code, where videobuf is |
118 | * used without queue | 115 | * used without queue |
119 | */ | 116 | */ |
120 | int videobuf_pci_dma_map(struct pci_dev *pci,struct videobuf_dmabuf *dma); | 117 | int videobuf_sg_dma_map(struct device *dev, struct videobuf_dmabuf *dma); |
121 | int videobuf_pci_dma_unmap(struct pci_dev *pci,struct videobuf_dmabuf *dma); | 118 | int videobuf_sg_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma); |
122 | 119 | ||
diff --git a/include/media/videobuf-dvb.h b/include/media/videobuf-dvb.h index 8233cafdeef6..b77748696329 100644 --- a/include/media/videobuf-dvb.h +++ b/include/media/videobuf-dvb.h | |||
@@ -27,7 +27,8 @@ struct videobuf_dvb { | |||
27 | int videobuf_dvb_register(struct videobuf_dvb *dvb, | 27 | int videobuf_dvb_register(struct videobuf_dvb *dvb, |
28 | struct module *module, | 28 | struct module *module, |
29 | void *adapter_priv, | 29 | void *adapter_priv, |
30 | struct device *device); | 30 | struct device *device, |
31 | short *adapter_nr); | ||
31 | void videobuf_dvb_unregister(struct videobuf_dvb *dvb); | 32 | void videobuf_dvb_unregister(struct videobuf_dvb *dvb); |
32 | 33 | ||
33 | /* | 34 | /* |
diff --git a/include/media/videobuf-vmalloc.h b/include/media/videobuf-vmalloc.h index ec63ab0fab93..aed39460c154 100644 --- a/include/media/videobuf-vmalloc.h +++ b/include/media/videobuf-vmalloc.h | |||
@@ -12,6 +12,8 @@ | |||
12 | * it under the terms of the GNU General Public License as published by | 12 | * it under the terms of the GNU General Public License as published by |
13 | * the Free Software Foundation; either version 2 | 13 | * the Free Software Foundation; either version 2 |
14 | */ | 14 | */ |
15 | #ifndef _VIDEOBUF_VMALLOC_H | ||
16 | #define _VIDEOBUF_VMALLOC_H | ||
15 | 17 | ||
16 | #include <media/videobuf-core.h> | 18 | #include <media/videobuf-core.h> |
17 | 19 | ||
@@ -39,3 +41,5 @@ void videobuf_queue_vmalloc_init(struct videobuf_queue* q, | |||
39 | void *videobuf_to_vmalloc (struct videobuf_buffer *buf); | 41 | void *videobuf_to_vmalloc (struct videobuf_buffer *buf); |
40 | 42 | ||
41 | void videobuf_vmalloc_free (struct videobuf_buffer *buf); | 43 | void videobuf_vmalloc_free (struct videobuf_buffer *buf); |
44 | |||
45 | #endif | ||