~ubuntu-branches/ubuntu/trusty/linux-armadaxp/trusty

« back to all changes in this revision

Viewing changes to drivers/media/dvb/dvb-usb/ttusb2.c

  • Committer: Package Import Robot
  • Author(s): Michael Casadevall, Bryan Wu, Dann Frazier, Michael Casadeall
  • Date: 2012-03-10 15:00:54 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120310150054-flugb39zon8vvgwe
Tags: 3.2.0-1600.1
[ Bryan Wu ]
* UBUNTU: import debian/debian.env and debian.armadaxp

[ Dann Frazier ]
* ARM: Armada XP: remove trailing '/' in dirnames in mvRules.mk

[ Michael Casadeall ]
* tools: add some tools for Marvell Armada XP processor
* kernel: timer tick hacking from Marvell
* kernel: Sheeva Errata: add delay on Sheeva when powering down
* net: add Marvell NFP netfilter
* net: socket and skb modifications made by Marvell
* miscdevice: add minor IDs for some Marvell Armada drivers
* fs: introduce memory pool for splice()
* video: EDID detection updates from Marvell Armada XP patchset
* video: backlight: add Marvell Dove LCD backlight driver
* video: display: add THS8200 display driver
* video: framebuffer: add Marvell Dove and Armada XP processor onchip LCD controller driver
* usbtest: add Interrupt transfer testing by Marvell Armada XP code
* usb: ehci: add support for Marvell EHCI controler
* tty/serial: 8250: add support for Marvell Armada XP processor and DeviceTree work
* rtc: add support for Marvell Armada XP onchip RTC controller
* net: pppoe: add Marvell ethernet NFP hook in PPPoE networking driver
* mtd: nand: add support for Marvell Armada XP Nand Flash Controller
* mtd: maps: add Marvell Armada XP specific map driver
* mmc: add support for Marvell Armada XP MMC/SD host controller
* i2c: add support for Marvell Armada XP onchip i2c bus controller
* hwmon: add Kconfig option for Armada XP onchip thermal sensor driver
* dmaengine: add Net DMA support for splice and update Marvell XOR DMA engine driver
* ata: add support for Marvell Armada XP SATA controller and update some quirks
* ARM: add Marvell Armada XP machine to mach-types
* ARM: oprofile: add support for Marvell PJ4B core
* ARM: mm: more ARMv6 switches for Marvell Armada XP
* ARM: remove static declaration to allow compilation
* ARM: alignment access fault trick
* ARM: mm: skip some fault fixing when run on NONE SMP ARMv6 mode during early abort event
* ARM: mm: add Marvell Sheeva CPU Architecture for PJ4B
* ARM: introduce optimized copy operation for Marvell Armada XP
* ARM: SAUCE: hardware breakpoint trick for Marvell Armada XP
* ARM: big endian and little endian tricks for Marvell Armada XP
* ARM: SAUCE: Add Marvell Armada XP build rules to arch/arm/kernel/Makefile
* ARM: vfp: add special handling for Marvell Armada XP
* ARM: add support for Marvell U-Boot
* ARM: add mv_controller_num for ARM PCI drivers
* ARM: add support for local PMUs, general SMP tweaks and cache flushing
* ARM: add Marvell device identifies in glue-proc.h
* ARM: add IPC driver support for Marvell platforms
* ARM: add DMA mapping for Marvell platforms
* ARM: add Sheeva errata and PJ4B code for booting
* ARM: update Kconfig and Makefile to include Marvell Armada XP platforms
* ARM: Armada XP: import LSP from Marvell for Armada XP 3.2 kernel enablement

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include "tda826x.h"
31
31
#include "tda10086.h"
32
32
#include "tda1002x.h"
 
33
#include "tda10048.h"
33
34
#include "tda827x.h"
34
35
#include "lnbp21.h"
 
36
/* CA */
 
37
#include "dvb_ca_en50221.h"
35
38
 
36
39
/* debug */
37
40
static int dvb_usb_ttusb2_debug;
38
41
#define deb_info(args...)   dprintk(dvb_usb_ttusb2_debug,0x01,args)
39
42
module_param_named(debug,dvb_usb_ttusb2_debug, int, 0644);
40
43
MODULE_PARM_DESC(debug, "set debugging level (1=info (or-able))." DVB_USB_DEBUG_STATUS);
 
44
static int dvb_usb_ttusb2_debug_ci;
 
45
module_param_named(debug_ci,dvb_usb_ttusb2_debug_ci, int, 0644);
 
46
MODULE_PARM_DESC(debug_ci, "set debugging ci." DVB_USB_DEBUG_STATUS);
41
47
 
42
48
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
43
49
 
 
50
#define ci_dbg(format, arg...)                \
 
51
do {                                          \
 
52
        if (dvb_usb_ttusb2_debug_ci)                                    \
 
53
                printk(KERN_DEBUG DVB_USB_LOG_PREFIX \
 
54
                        ": %s " format "\n" , __func__, ## arg);       \
 
55
} while (0)
 
56
 
 
57
enum {
 
58
        TT3650_CMD_CI_TEST = 0x40,
 
59
        TT3650_CMD_CI_RD_CTRL,
 
60
        TT3650_CMD_CI_WR_CTRL,
 
61
        TT3650_CMD_CI_RD_ATTR,
 
62
        TT3650_CMD_CI_WR_ATTR,
 
63
        TT3650_CMD_CI_RESET,
 
64
        TT3650_CMD_CI_SET_VIDEO_PORT
 
65
};
 
66
 
44
67
struct ttusb2_state {
 
68
        struct dvb_ca_en50221 ca;
 
69
        struct mutex ca_mutex;
45
70
        u8 id;
46
71
        u16 last_rc_key;
47
72
};
78
103
        return 0;
79
104
}
80
105
 
 
106
/* ci */
 
107
static int tt3650_ci_msg(struct dvb_usb_device *d, u8 cmd, u8 *data, unsigned int write_len, unsigned int read_len)
 
108
{
 
109
        int ret;
 
110
        u8 rx[60];/* (64 -4) */
 
111
        ret = ttusb2_msg(d, cmd, data, write_len, rx, read_len);
 
112
        if (!ret)
 
113
                memcpy(data, rx, read_len);
 
114
        return ret;
 
115
}
 
116
 
 
117
static int tt3650_ci_msg_locked(struct dvb_ca_en50221 *ca, u8 cmd, u8 *data, unsigned int write_len, unsigned int read_len)
 
118
{
 
119
        struct dvb_usb_device *d = ca->data;
 
120
        struct ttusb2_state *state = d->priv;
 
121
        int ret;
 
122
 
 
123
        mutex_lock(&state->ca_mutex);
 
124
        ret = tt3650_ci_msg(d, cmd, data, write_len, read_len);
 
125
        mutex_unlock(&state->ca_mutex);
 
126
 
 
127
        return ret;
 
128
}
 
129
 
 
130
static int tt3650_ci_read_attribute_mem(struct dvb_ca_en50221 *ca, int slot, int address)
 
131
{
 
132
        u8 buf[3];
 
133
        int ret = 0;
 
134
 
 
135
        if (slot)
 
136
                return -EINVAL;
 
137
 
 
138
        buf[0] = (address >> 8) & 0x0F;
 
139
        buf[1] = address;
 
140
 
 
141
 
 
142
        ret = tt3650_ci_msg_locked(ca, TT3650_CMD_CI_RD_ATTR, buf, 2, 3);
 
143
 
 
144
        ci_dbg("%04x -> %d 0x%02x", address, ret, buf[2]);
 
145
 
 
146
        if (ret < 0)
 
147
                return ret;
 
148
 
 
149
        return buf[2];
 
150
}
 
151
 
 
152
static int tt3650_ci_write_attribute_mem(struct dvb_ca_en50221 *ca, int slot, int address, u8 value)
 
153
{
 
154
        u8 buf[3];
 
155
 
 
156
        ci_dbg("%d 0x%04x 0x%02x", slot, address, value);
 
157
 
 
158
        if (slot)
 
159
                return -EINVAL;
 
160
 
 
161
        buf[0] = (address >> 8) & 0x0F;
 
162
        buf[1] = address;
 
163
        buf[2] = value;
 
164
 
 
165
        return tt3650_ci_msg_locked(ca, TT3650_CMD_CI_WR_ATTR, buf, 3, 3);
 
166
}
 
167
 
 
168
static int tt3650_ci_read_cam_control(struct dvb_ca_en50221 *ca, int slot, u8 address)
 
169
{
 
170
        u8 buf[2];
 
171
        int ret;
 
172
 
 
173
        if (slot)
 
174
                return -EINVAL;
 
175
 
 
176
        buf[0] = address & 3;
 
177
 
 
178
        ret = tt3650_ci_msg_locked(ca, TT3650_CMD_CI_RD_CTRL, buf, 1, 2);
 
179
 
 
180
        ci_dbg("0x%02x -> %d 0x%02x", address, ret, buf[1]);
 
181
 
 
182
        if (ret < 0)
 
183
                return ret;
 
184
 
 
185
        return buf[1];
 
186
}
 
187
 
 
188
static int tt3650_ci_write_cam_control(struct dvb_ca_en50221 *ca, int slot, u8 address, u8 value)
 
189
{
 
190
        u8 buf[2];
 
191
 
 
192
        ci_dbg("%d 0x%02x 0x%02x", slot, address, value);
 
193
 
 
194
        if (slot)
 
195
                return -EINVAL;
 
196
 
 
197
        buf[0] = address;
 
198
        buf[1] = value;
 
199
 
 
200
        return tt3650_ci_msg_locked(ca, TT3650_CMD_CI_WR_CTRL, buf, 2, 2);
 
201
}
 
202
 
 
203
static int tt3650_ci_set_video_port(struct dvb_ca_en50221 *ca, int slot, int enable)
 
204
{
 
205
        u8 buf[1];
 
206
        int ret;
 
207
 
 
208
        ci_dbg("%d %d", slot, enable);
 
209
 
 
210
        if (slot)
 
211
                return -EINVAL;
 
212
 
 
213
        buf[0] = enable;
 
214
 
 
215
        ret = tt3650_ci_msg_locked(ca, TT3650_CMD_CI_SET_VIDEO_PORT, buf, 1, 1);
 
216
        if (ret < 0)
 
217
                return ret;
 
218
 
 
219
        if (enable != buf[0]) {
 
220
                err("CI not %sabled.", enable ? "en" : "dis");
 
221
                return -EIO;
 
222
        }
 
223
 
 
224
        return 0;
 
225
}
 
226
 
 
227
static int tt3650_ci_slot_shutdown(struct dvb_ca_en50221 *ca, int slot)
 
228
{
 
229
        return tt3650_ci_set_video_port(ca, slot, 0);
 
230
}
 
231
 
 
232
static int tt3650_ci_slot_ts_enable(struct dvb_ca_en50221 *ca, int slot)
 
233
{
 
234
        return tt3650_ci_set_video_port(ca, slot, 1);
 
235
}
 
236
 
 
237
static int tt3650_ci_slot_reset(struct dvb_ca_en50221 *ca, int slot)
 
238
{
 
239
        struct dvb_usb_device *d = ca->data;
 
240
        struct ttusb2_state *state = d->priv;
 
241
        u8 buf[1];
 
242
        int ret;
 
243
 
 
244
        ci_dbg("%d", slot);
 
245
 
 
246
        if (slot)
 
247
                return -EINVAL;
 
248
 
 
249
        buf[0] = 0;
 
250
 
 
251
        mutex_lock(&state->ca_mutex);
 
252
 
 
253
        ret = tt3650_ci_msg(d, TT3650_CMD_CI_RESET, buf, 1, 1);
 
254
        if (ret)
 
255
                goto failed;
 
256
 
 
257
        msleep(500);
 
258
 
 
259
        buf[0] = 1;
 
260
 
 
261
        ret = tt3650_ci_msg(d, TT3650_CMD_CI_RESET, buf, 1, 1);
 
262
        if (ret)
 
263
                goto failed;
 
264
 
 
265
        msleep(500);
 
266
 
 
267
        buf[0] = 0; /* FTA */
 
268
 
 
269
        ret = tt3650_ci_msg(d, TT3650_CMD_CI_SET_VIDEO_PORT, buf, 1, 1);
 
270
 
 
271
        msleep(1100);
 
272
 
 
273
 failed:
 
274
        mutex_unlock(&state->ca_mutex);
 
275
 
 
276
        return ret;
 
277
}
 
278
 
 
279
static int tt3650_ci_poll_slot_status(struct dvb_ca_en50221 *ca, int slot, int open)
 
280
{
 
281
        u8 buf[1];
 
282
        int ret;
 
283
 
 
284
        if (slot)
 
285
                return -EINVAL;
 
286
 
 
287
        ret = tt3650_ci_msg_locked(ca, TT3650_CMD_CI_TEST, buf, 0, 1);
 
288
        if (ret)
 
289
                return ret;
 
290
 
 
291
        if (1 == buf[0]) {
 
292
                return DVB_CA_EN50221_POLL_CAM_PRESENT |
 
293
                        DVB_CA_EN50221_POLL_CAM_READY;
 
294
        }
 
295
        return 0;
 
296
}
 
297
 
 
298
static void tt3650_ci_uninit(struct dvb_usb_device *d)
 
299
{
 
300
        struct ttusb2_state *state;
 
301
 
 
302
        ci_dbg("");
 
303
 
 
304
        if (NULL == d)
 
305
                return;
 
306
 
 
307
        state = d->priv;
 
308
        if (NULL == state)
 
309
                return;
 
310
 
 
311
        if (NULL == state->ca.data)
 
312
                return;
 
313
 
 
314
        dvb_ca_en50221_release(&state->ca);
 
315
 
 
316
        memset(&state->ca, 0, sizeof(state->ca));
 
317
}
 
318
 
 
319
static int tt3650_ci_init(struct dvb_usb_adapter *a)
 
320
{
 
321
        struct dvb_usb_device *d = a->dev;
 
322
        struct ttusb2_state *state = d->priv;
 
323
        int ret;
 
324
 
 
325
        ci_dbg("");
 
326
 
 
327
        mutex_init(&state->ca_mutex);
 
328
 
 
329
        state->ca.owner = THIS_MODULE;
 
330
        state->ca.read_attribute_mem = tt3650_ci_read_attribute_mem;
 
331
        state->ca.write_attribute_mem = tt3650_ci_write_attribute_mem;
 
332
        state->ca.read_cam_control = tt3650_ci_read_cam_control;
 
333
        state->ca.write_cam_control = tt3650_ci_write_cam_control;
 
334
        state->ca.slot_reset = tt3650_ci_slot_reset;
 
335
        state->ca.slot_shutdown = tt3650_ci_slot_shutdown;
 
336
        state->ca.slot_ts_enable = tt3650_ci_slot_ts_enable;
 
337
        state->ca.poll_slot_status = tt3650_ci_poll_slot_status;
 
338
        state->ca.data = d;
 
339
 
 
340
        ret = dvb_ca_en50221_init(&a->dvb_adap,
 
341
                                  &state->ca,
 
342
                                  /* flags */ 0,
 
343
                                  /* n_slots */ 1);
 
344
        if (ret) {
 
345
                err("Cannot initialize CI: Error %d.", ret);
 
346
                memset(&state->ca, 0, sizeof(state->ca));
 
347
                return ret;
 
348
        }
 
349
 
 
350
        info("CI initialized.");
 
351
 
 
352
        return 0;
 
353
}
 
354
 
81
355
static int ttusb2_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num)
82
356
{
83
357
        struct dvb_usb_device *d = i2c_get_adapdata(adap);
84
358
        static u8 obuf[60], ibuf[60];
85
 
        int i,read;
 
359
        int i, write_read, read;
86
360
 
87
361
        if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
88
362
                return -EAGAIN;
91
365
                warn("more than 2 i2c messages at a time is not handled yet. TODO.");
92
366
 
93
367
        for (i = 0; i < num; i++) {
94
 
                read = i+1 < num && (msg[i+1].flags & I2C_M_RD);
 
368
                write_read = i+1 < num && (msg[i+1].flags & I2C_M_RD);
 
369
                read = msg[i].flags & I2C_M_RD;
95
370
 
96
 
                obuf[0] = (msg[i].addr << 1) | read;
97
 
                obuf[1] = msg[i].len;
 
371
                obuf[0] = (msg[i].addr << 1) | (write_read | read);
 
372
                if (read)
 
373
                        obuf[1] = 0;
 
374
                else
 
375
                        obuf[1] = msg[i].len;
98
376
 
99
377
                /* read request */
100
 
                if (read)
 
378
                if (write_read)
101
379
                        obuf[2] = msg[i+1].len;
 
380
                else if (read)
 
381
                        obuf[2] = msg[i].len;
102
382
                else
103
383
                        obuf[2] = 0;
104
384
 
105
 
                memcpy(&obuf[3],msg[i].buf,msg[i].len);
 
385
                memcpy(&obuf[3], msg[i].buf, msg[i].len);
106
386
 
107
387
                if (ttusb2_msg(d, CMD_I2C_XFER, obuf, msg[i].len+3, ibuf, obuf[2] + 3) < 0) {
108
388
                        err("i2c transfer failed.");
109
389
                        break;
110
390
                }
111
391
 
112
 
                if (read) {
113
 
                        memcpy(msg[i+1].buf,&ibuf[3],msg[i+1].len);
 
392
                if (write_read) {
 
393
                        memcpy(msg[i+1].buf, &ibuf[3], msg[i+1].len);
114
394
                        i++;
115
 
                }
 
395
                } else if (read)
 
396
                        memcpy(msg[i].buf, &ibuf[3], msg[i].len);
116
397
        }
117
398
 
118
399
        mutex_unlock(&d->i2c_mutex);
190
471
        .deltaf = 0xa511,
191
472
};
192
473
 
 
474
static struct tda10048_config tda10048_config = {
 
475
        .demod_address    = 0x10 >> 1,
 
476
        .output_mode      = TDA10048_PARALLEL_OUTPUT,
 
477
        .inversion        = TDA10048_INVERSION_ON,
 
478
        .dtv6_if_freq_khz = TDA10048_IF_4000,
 
479
        .dtv7_if_freq_khz = TDA10048_IF_4500,
 
480
        .dtv8_if_freq_khz = TDA10048_IF_5000,
 
481
        .clk_freq_khz     = TDA10048_CLK_16000,
 
482
        .no_firmware      = 1,
 
483
        .set_pll          = true ,
 
484
        .pll_m            = 5,
 
485
        .pll_n            = 3,
 
486
        .pll_p            = 0,
 
487
};
 
488
 
 
489
static struct tda827x_config tda827x_config = {
 
490
        .config = 0,
 
491
};
 
492
 
193
493
static int ttusb2_frontend_tda10086_attach(struct dvb_usb_adapter *adap)
194
494
{
195
495
        if (usb_set_interface(adap->dev->udev,0,3) < 0)
196
496
                err("set interface to alts=3 failed");
197
497
 
198
 
        if ((adap->fe = dvb_attach(tda10086_attach, &tda10086_config, &adap->dev->i2c_adap)) == NULL) {
 
498
        if ((adap->fe_adap[0].fe = dvb_attach(tda10086_attach, &tda10086_config, &adap->dev->i2c_adap)) == NULL) {
199
499
                deb_info("TDA10086 attach failed\n");
200
500
                return -ENODEV;
201
501
        }
203
503
        return 0;
204
504
}
205
505
 
 
506
static int ttusb2_ct3650_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
 
507
{
 
508
        struct dvb_usb_adapter *adap = fe->dvb->priv;
 
509
 
 
510
        return adap->fe_adap[0].fe->ops.i2c_gate_ctrl(adap->fe_adap[0].fe, enable);
 
511
}
 
512
 
206
513
static int ttusb2_frontend_tda10023_attach(struct dvb_usb_adapter *adap)
207
514
{
208
515
        if (usb_set_interface(adap->dev->udev, 0, 3) < 0)
209
516
                err("set interface to alts=3 failed");
210
 
        if ((adap->fe = dvb_attach(tda10023_attach, &tda10023_config, &adap->dev->i2c_adap, 0x48)) == NULL) {
211
 
                deb_info("TDA10023 attach failed\n");
212
 
                return -ENODEV;
 
517
 
 
518
        if (adap->fe_adap[0].fe == NULL) {
 
519
                /* FE 0 DVB-C */
 
520
                adap->fe_adap[0].fe = dvb_attach(tda10023_attach,
 
521
                        &tda10023_config, &adap->dev->i2c_adap, 0x48);
 
522
 
 
523
                if (adap->fe_adap[0].fe == NULL) {
 
524
                        deb_info("TDA10023 attach failed\n");
 
525
                        return -ENODEV;
 
526
                }
 
527
                tt3650_ci_init(adap);
 
528
        } else {
 
529
                adap->fe_adap[1].fe = dvb_attach(tda10048_attach,
 
530
                        &tda10048_config, &adap->dev->i2c_adap);
 
531
 
 
532
                if (adap->fe_adap[1].fe == NULL) {
 
533
                        deb_info("TDA10048 attach failed\n");
 
534
                        return -ENODEV;
 
535
                }
 
536
 
 
537
                /* tuner is behind TDA10023 I2C-gate */
 
538
                adap->fe_adap[1].fe->ops.i2c_gate_ctrl = ttusb2_ct3650_i2c_gate_ctrl;
 
539
 
213
540
        }
 
541
 
214
542
        return 0;
215
543
}
216
544
 
217
545
static int ttusb2_tuner_tda827x_attach(struct dvb_usb_adapter *adap)
218
546
{
219
 
        if (dvb_attach(tda827x_attach, adap->fe, 0x61, &adap->dev->i2c_adap, NULL) == NULL) {
 
547
        struct dvb_frontend *fe;
 
548
 
 
549
        /* MFE: select correct FE to attach tuner since that's called twice */
 
550
        if (adap->fe_adap[1].fe == NULL)
 
551
                fe = adap->fe_adap[0].fe;
 
552
        else
 
553
                fe = adap->fe_adap[1].fe;
 
554
 
 
555
        /* attach tuner */
 
556
        if (dvb_attach(tda827x_attach, fe, 0x61, &adap->dev->i2c_adap, &tda827x_config) == NULL) {
220
557
                printk(KERN_ERR "%s: No tda827x found!\n", __func__);
221
558
                return -ENODEV;
222
559
        }
225
562
 
226
563
static int ttusb2_tuner_tda826x_attach(struct dvb_usb_adapter *adap)
227
564
{
228
 
        if (dvb_attach(tda826x_attach, adap->fe, 0x60, &adap->dev->i2c_adap, 0) == NULL) {
 
565
        if (dvb_attach(tda826x_attach, adap->fe_adap[0].fe, 0x60, &adap->dev->i2c_adap, 0) == NULL) {
229
566
                deb_info("TDA8263 attach failed\n");
230
567
                return -ENODEV;
231
568
        }
232
569
 
233
 
        if (dvb_attach(lnbp21_attach, adap->fe, &adap->dev->i2c_adap, 0, 0) == NULL) {
 
570
        if (dvb_attach(lnbp21_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, 0, 0) == NULL) {
234
571
                deb_info("LNBP21 attach failed\n");
235
572
                return -ENODEV;
236
573
        }
242
579
static struct dvb_usb_device_properties ttusb2_properties_s2400;
243
580
static struct dvb_usb_device_properties ttusb2_properties_ct3650;
244
581
 
 
582
static void ttusb2_usb_disconnect(struct usb_interface *intf)
 
583
{
 
584
        struct dvb_usb_device *d = usb_get_intfdata(intf);
 
585
 
 
586
        tt3650_ci_uninit(d);
 
587
        dvb_usb_device_exit(intf);
 
588
}
 
589
 
245
590
static int ttusb2_probe(struct usb_interface *intf,
246
591
                const struct usb_device_id *id)
247
592
{
277
622
        .num_adapters = 1,
278
623
        .adapter = {
279
624
                {
 
625
                .num_frontends = 1,
 
626
                .fe = {{
280
627
                        .streaming_ctrl   = NULL, // ttusb2_streaming_ctrl,
281
628
 
282
629
                        .frontend_attach  = ttusb2_frontend_tda10086_attach,
295
642
                                        }
296
643
                                }
297
644
                        }
 
645
                }},
298
646
                }
299
647
        },
300
648
 
329
677
        .num_adapters = 1,
330
678
        .adapter = {
331
679
                {
 
680
                .num_frontends = 1,
 
681
                .fe = {{
332
682
                        .streaming_ctrl   = NULL,
333
683
 
334
684
                        .frontend_attach  = ttusb2_frontend_tda10086_attach,
347
697
                                        }
348
698
                                }
349
699
                        }
 
700
                }},
350
701
                }
351
702
        },
352
703
 
383
734
        .num_adapters = 1,
384
735
        .adapter = {
385
736
                {
386
 
                        .streaming_ctrl   = NULL,
387
 
 
388
 
                        .frontend_attach  = ttusb2_frontend_tda10023_attach,
389
 
                        .tuner_attach = ttusb2_tuner_tda827x_attach,
390
 
 
391
 
                        /* parameter for the MPEG2-data transfer */
392
 
                        .stream = {
393
 
                                .type = USB_ISOC,
394
 
                                .count = 5,
395
 
                                .endpoint = 0x02,
396
 
                                .u = {
397
 
                                        .isoc = {
398
 
                                                .framesperurb = 4,
399
 
                                                .framesize = 940,
400
 
                                                .interval = 1,
401
 
                                        }
402
 
                                }
403
 
                        }
 
737
                .num_frontends = 2,
 
738
                .fe = {{
 
739
                        .streaming_ctrl   = NULL,
 
740
 
 
741
                        .frontend_attach  = ttusb2_frontend_tda10023_attach,
 
742
                        .tuner_attach = ttusb2_tuner_tda827x_attach,
 
743
 
 
744
                        /* parameter for the MPEG2-data transfer */
 
745
                        .stream = {
 
746
                                .type = USB_ISOC,
 
747
                                .count = 5,
 
748
                                .endpoint = 0x02,
 
749
                                .u = {
 
750
                                        .isoc = {
 
751
                                                .framesperurb = 4,
 
752
                                                .framesize = 940,
 
753
                                                .interval = 1,
 
754
                                        }
 
755
                                }
 
756
                        }
 
757
                }, {
 
758
                        .streaming_ctrl   = NULL,
 
759
 
 
760
                        .frontend_attach  = ttusb2_frontend_tda10023_attach,
 
761
                        .tuner_attach = ttusb2_tuner_tda827x_attach,
 
762
 
 
763
                        /* parameter for the MPEG2-data transfer */
 
764
                        .stream = {
 
765
                                .type = USB_ISOC,
 
766
                                .count = 5,
 
767
                                .endpoint = 0x02,
 
768
                                .u = {
 
769
                                        .isoc = {
 
770
                                                .framesperurb = 4,
 
771
                                                .framesize = 940,
 
772
                                                .interval = 1,
 
773
                                        }
 
774
                                }
 
775
                        }
 
776
                }},
404
777
                },
405
778
        },
406
779
 
422
795
static struct usb_driver ttusb2_driver = {
423
796
        .name           = "dvb_usb_ttusb2",
424
797
        .probe          = ttusb2_probe,
425
 
        .disconnect = dvb_usb_device_exit,
 
798
        .disconnect     = ttusb2_usb_disconnect,
426
799
        .id_table       = ttusb2_table,
427
800
};
428
801