aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/gp8psk.c
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2006-09-30 05:53:48 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-10-03 14:10:54 -0400
commit4d43e13f723e12734257277cc38497fab1efc605 (patch)
tree7debc4f9b7997f7d768dcf387210436b532198f4 /drivers/media/dvb/dvb-usb/gp8psk.c
parent8ccb3dcd1f8e80e8702642e1de26541b52f6bb7c (diff)
V4L/DVB (4643): Multi-input patch for DVB-USB device
This patch is the first commit of the Multiple Input Patch for the DVB-USB frame work. It changes the DVB-USB-device to be able to have more than one streaming input (e.g. multiple DVB-T sources) on one device. This is a necessary feature for the upcoming DiB7700 driven devices. Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/gp8psk.c')
-rw-r--r--drivers/media/dvb/dvb-usb/gp8psk.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/media/dvb/dvb-usb/gp8psk.c b/drivers/media/dvb/dvb-usb/gp8psk.c
index 9a98f3fdae31..334269bd065d 100644
--- a/drivers/media/dvb/dvb-usb/gp8psk.c
+++ b/drivers/media/dvb/dvb-usb/gp8psk.c
@@ -161,19 +161,18 @@ static int gp8psk_power_ctrl(struct dvb_usb_device *d, int onoff)
161} 161}
162 162
163 163
164static int gp8psk_streaming_ctrl(struct dvb_usb_device *d, int onoff) 164static int gp8psk_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
165{ 165{
166 return gp8psk_usb_out_op(d, ARM_TRANSFER, onoff, 0 , NULL, 0); 166 return gp8psk_usb_out_op(adap->dev, ARM_TRANSFER, onoff, 0 , NULL, 0);
167} 167}
168 168
169static int gp8psk_frontend_attach(struct dvb_usb_device *d) 169static int gp8psk_frontend_attach(struct dvb_usb_adapter *adap)
170{ 170{
171 d->fe = gp8psk_fe_attach(d); 171 adap->fe = gp8psk_fe_attach(adap->dev);
172
173 return 0; 172 return 0;
174} 173}
175 174
176static struct dvb_usb_properties gp8psk_properties; 175static struct dvb_usb_device_properties gp8psk_properties;
177 176
178static int gp8psk_usb_probe(struct usb_interface *intf, 177static int gp8psk_usb_probe(struct usb_interface *intf,
179 const struct usb_device_id *id) 178 const struct usb_device_id *id)
@@ -188,20 +187,18 @@ static struct usb_device_id gp8psk_usb_table [] = {
188}; 187};
189MODULE_DEVICE_TABLE(usb, gp8psk_usb_table); 188MODULE_DEVICE_TABLE(usb, gp8psk_usb_table);
190 189
191static struct dvb_usb_properties gp8psk_properties = { 190static struct dvb_usb_device_properties gp8psk_properties = {
192 .caps = 0,
193
194 .usb_ctrl = CYPRESS_FX2, 191 .usb_ctrl = CYPRESS_FX2,
195 .firmware = "dvb-usb-gp8psk-01.fw", 192 .firmware = "dvb-usb-gp8psk-01.fw",
196 193
194 .num_adapters = 1,
195 .adapter = {
196 {
197 .streaming_ctrl = gp8psk_streaming_ctrl, 197 .streaming_ctrl = gp8psk_streaming_ctrl,
198 .power_ctrl = gp8psk_power_ctrl,
199 .frontend_attach = gp8psk_frontend_attach, 198 .frontend_attach = gp8psk_frontend_attach,
200
201 .generic_bulk_ctrl_endpoint = 0x01,
202 /* parameter for the MPEG2-data transfer */ 199 /* parameter for the MPEG2-data transfer */
203 .urb = { 200 .stream = {
204 .type = DVB_USB_BULK, 201 .type = USB_BULK,
205 .count = 7, 202 .count = 7,
206 .endpoint = 0x82, 203 .endpoint = 0x82,
207 .u = { 204 .u = {
@@ -210,6 +207,11 @@ static struct dvb_usb_properties gp8psk_properties = {
210 } 207 }
211 } 208 }
212 }, 209 },
210 }
211 },
212 .power_ctrl = gp8psk_power_ctrl,
213
214 .generic_bulk_ctrl_endpoint = 0x01,
213 215
214 .num_device_descs = 1, 216 .num_device_descs = 1,
215 .devices = { 217 .devices = {