Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 1 | /* DVB USB compliant linux driver for Conexant USB reference design. |
| 2 | * |
| 3 | * The Conexant reference design I saw on their website was only for analogue |
| 4 | * capturing (using the cx25842). The box I took to write this driver (reverse |
| 5 | * engineered) is the one labeled Medion MD95700. In addition to the cx25842 |
| 6 | * for analogue capturing it also has a cx22702 DVB-T demodulator on the main |
| 7 | * board. Besides it has a atiremote (X10) and a USB2.0 hub onboard. |
| 8 | * |
| 9 | * Maybe it is a little bit premature to call this driver cxusb, but I assume |
| 10 | * the USB protocol is identical or at least inherited from the reference |
| 11 | * design, so it can be reused for the "analogue-only" device (if it will |
| 12 | * appear at all). |
| 13 | * |
Michael Krufky | 81481e9 | 2006-01-09 18:21:38 -0200 | [diff] [blame] | 14 | * TODO: Use the cx25840-driver for the analogue part |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 15 | * |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 16 | * Copyright (C) 2005 Patrick Boettcher (patrick.boettcher@desy.de) |
Michael Krufky | 5b9ed28 | 2006-10-15 14:51:08 -0300 | [diff] [blame] | 17 | * Copyright (C) 2006 Michael Krufky (mkrufky@linuxtv.org) |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 18 | * Copyright (C) 2006, 2007 Chris Pascoe (c.pascoe@itee.uq.edu.au) |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 19 | * |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 20 | * This program is free software; you can redistribute it and/or modify it |
| 21 | * under the terms of the GNU General Public License as published by the Free |
| 22 | * Software Foundation, version 2. |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 23 | * |
| 24 | * see Documentation/dvb/README.dvb-usb for more information |
| 25 | */ |
Michael Krufky | 827855d | 2008-04-22 14:46:16 -0300 | [diff] [blame] | 26 | #include <media/tuner.h> |
David Woodhouse | e62f89f | 2008-05-24 00:12:42 +0100 | [diff] [blame] | 27 | #include <linux/vmalloc.h> |
Tejun Heo | 5a0e3ad | 2010-03-24 17:04:11 +0900 | [diff] [blame] | 28 | #include <linux/slab.h> |
Michael Krufky | 827855d | 2008-04-22 14:46:16 -0300 | [diff] [blame] | 29 | |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 30 | #include "cxusb.h" |
| 31 | |
| 32 | #include "cx22702.h" |
Michael Krufky | effee03 | 2006-01-09 15:25:47 -0200 | [diff] [blame] | 33 | #include "lgdt330x.h" |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 34 | #include "mt352.h" |
| 35 | #include "mt352_priv.h" |
Michael Krufky | c9ce394 | 2006-06-11 04:24:31 -0300 | [diff] [blame] | 36 | #include "zl10353.h" |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 37 | #include "tuner-xc2028.h" |
Michael Krufky | 827855d | 2008-04-22 14:46:16 -0300 | [diff] [blame] | 38 | #include "tuner-simple.h" |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 39 | #include "mxl5005s.h" |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 40 | #include "max2165.h" |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 41 | #include "dib7000p.h" |
| 42 | #include "dib0070.h" |
David T.L. Wong | 6bf1a99 | 2009-08-05 13:07:10 -0300 | [diff] [blame] | 43 | #include "lgs8gxx.h" |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 44 | #include "atbm8830.h" |
Olli Salonen | 26c42b0 | 2014-07-13 10:52:22 -0300 | [diff] [blame] | 45 | #include "si2168.h" |
| 46 | #include "si2157.h" |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 47 | |
Mauro Carvalho Chehab | 64f7ef8 | 2013-11-02 07:18:09 -0300 | [diff] [blame] | 48 | /* Max transfer size done by I2C transfer functions */ |
Mauro Carvalho Chehab | eb9da07 | 2014-06-30 11:56:33 -0300 | [diff] [blame] | 49 | #define MAX_XFER_SIZE 80 |
Mauro Carvalho Chehab | 64f7ef8 | 2013-11-02 07:18:09 -0300 | [diff] [blame] | 50 | |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 51 | /* debug */ |
Adrian Bunk | 53133af | 2007-11-05 14:07:06 -0300 | [diff] [blame] | 52 | static int dvb_usb_cxusb_debug; |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 53 | module_param_named(debug, dvb_usb_cxusb_debug, int, 0644); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 54 | MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS); |
Janne Grunau | 78e9200 | 2008-04-09 19:13:13 -0300 | [diff] [blame] | 55 | |
| 56 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); |
| 57 | |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 58 | #define deb_info(args...) dprintk(dvb_usb_cxusb_debug, 0x03, args) |
| 59 | #define deb_i2c(args...) dprintk(dvb_usb_cxusb_debug, 0x02, args) |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 60 | |
| 61 | static int cxusb_ctrl_msg(struct dvb_usb_device *d, |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 62 | u8 cmd, u8 *wbuf, int wlen, u8 *rbuf, int rlen) |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 63 | { |
| 64 | int wo = (rbuf == NULL || rlen == 0); /* write-only */ |
Mauro Carvalho Chehab | 64f7ef8 | 2013-11-02 07:18:09 -0300 | [diff] [blame] | 65 | u8 sndbuf[MAX_XFER_SIZE]; |
| 66 | |
| 67 | if (1 + wlen > sizeof(sndbuf)) { |
| 68 | warn("i2c wr: len=%d is too big!\n", |
| 69 | wlen); |
| 70 | return -EOPNOTSUPP; |
| 71 | } |
| 72 | |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 73 | memset(sndbuf, 0, 1+wlen); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 74 | |
| 75 | sndbuf[0] = cmd; |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 76 | memcpy(&sndbuf[1], wbuf, wlen); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 77 | if (wo) |
Chris Pascoe | b17f109 | 2007-11-19 02:42:44 -0300 | [diff] [blame] | 78 | return dvb_usb_generic_write(d, sndbuf, 1+wlen); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 79 | else |
Chris Pascoe | b17f109 | 2007-11-19 02:42:44 -0300 | [diff] [blame] | 80 | return dvb_usb_generic_rw(d, sndbuf, 1+wlen, rbuf, rlen, 0); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 81 | } |
| 82 | |
Patrick Boettcher | e2efeab | 2005-09-09 13:02:51 -0700 | [diff] [blame] | 83 | /* GPIO */ |
| 84 | static void cxusb_gpio_tuner(struct dvb_usb_device *d, int onoff) |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 85 | { |
| 86 | struct cxusb_state *st = d->priv; |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 87 | u8 o[2], i; |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 88 | |
Patrick Boettcher | e2efeab | 2005-09-09 13:02:51 -0700 | [diff] [blame] | 89 | if (st->gpio_write_state[GPIO_TUNER] == onoff) |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 90 | return; |
| 91 | |
Patrick Boettcher | e2efeab | 2005-09-09 13:02:51 -0700 | [diff] [blame] | 92 | o[0] = GPIO_TUNER; |
| 93 | o[1] = onoff; |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 94 | cxusb_ctrl_msg(d, CMD_GPIO_WRITE, o, 2, &i, 1); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 95 | |
| 96 | if (i != 0x01) |
Patrick Boettcher | e2efeab | 2005-09-09 13:02:51 -0700 | [diff] [blame] | 97 | deb_info("gpio_write failed.\n"); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 98 | |
Patrick Boettcher | e2efeab | 2005-09-09 13:02:51 -0700 | [diff] [blame] | 99 | st->gpio_write_state[GPIO_TUNER] = onoff; |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 100 | } |
| 101 | |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 102 | static int cxusb_bluebird_gpio_rw(struct dvb_usb_device *d, u8 changemask, |
| 103 | u8 newval) |
| 104 | { |
| 105 | u8 o[2], gpio_state; |
| 106 | int rc; |
| 107 | |
| 108 | o[0] = 0xff & ~changemask; /* mask of bits to keep */ |
| 109 | o[1] = newval & changemask; /* new values for bits */ |
| 110 | |
| 111 | rc = cxusb_ctrl_msg(d, CMD_BLUEBIRD_GPIO_RW, o, 2, &gpio_state, 1); |
| 112 | if (rc < 0 || (gpio_state & changemask) != (newval & changemask)) |
| 113 | deb_info("bluebird_gpio_write failed.\n"); |
| 114 | |
| 115 | return rc < 0 ? rc : gpio_state; |
| 116 | } |
| 117 | |
| 118 | static void cxusb_bluebird_gpio_pulse(struct dvb_usb_device *d, u8 pin, int low) |
| 119 | { |
| 120 | cxusb_bluebird_gpio_rw(d, pin, low ? 0 : pin); |
| 121 | msleep(5); |
| 122 | cxusb_bluebird_gpio_rw(d, pin, low ? pin : 0); |
| 123 | } |
| 124 | |
Chris Pascoe | 5ccaf90 | 2007-11-20 01:53:31 -0300 | [diff] [blame] | 125 | static void cxusb_nano2_led(struct dvb_usb_device *d, int onoff) |
| 126 | { |
| 127 | cxusb_bluebird_gpio_rw(d, 0x40, onoff ? 0 : 0x40); |
| 128 | } |
| 129 | |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 130 | static int cxusb_d680_dmb_gpio_tuner(struct dvb_usb_device *d, |
| 131 | u8 addr, int onoff) |
| 132 | { |
| 133 | u8 o[2] = {addr, onoff}; |
| 134 | u8 i; |
| 135 | int rc; |
| 136 | |
| 137 | rc = cxusb_ctrl_msg(d, CMD_GPIO_WRITE, o, 2, &i, 1); |
| 138 | |
| 139 | if (rc < 0) |
| 140 | return rc; |
| 141 | if (i == 0x01) |
| 142 | return 0; |
| 143 | else { |
| 144 | deb_info("gpio_write failed.\n"); |
| 145 | return -EIO; |
| 146 | } |
| 147 | } |
| 148 | |
Patrick Boettcher | e2efeab | 2005-09-09 13:02:51 -0700 | [diff] [blame] | 149 | /* I2C */ |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 150 | static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], |
| 151 | int num) |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 152 | { |
| 153 | struct dvb_usb_device *d = i2c_get_adapdata(adap); |
Dan Carpenter | 1cdbcc5 | 2013-11-22 04:55:43 -0300 | [diff] [blame] | 154 | int ret; |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 155 | int i; |
| 156 | |
Ingo Molnar | 3593cab | 2006-02-07 06:49:14 -0200 | [diff] [blame] | 157 | if (mutex_lock_interruptible(&d->i2c_mutex) < 0) |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 158 | return -EAGAIN; |
| 159 | |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 160 | for (i = 0; i < num; i++) { |
| 161 | |
Hans Verkuil | 41150cb | 2014-08-21 11:55:00 -0300 | [diff] [blame] | 162 | if (le16_to_cpu(d->udev->descriptor.idVendor) == USB_VID_MEDION) |
Michael Krufky | 5e805ef | 2006-03-23 00:01:34 -0300 | [diff] [blame] | 163 | switch (msg[i].addr) { |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 164 | case 0x63: |
| 165 | cxusb_gpio_tuner(d, 0); |
| 166 | break; |
| 167 | default: |
| 168 | cxusb_gpio_tuner(d, 1); |
| 169 | break; |
Michael Krufky | 5e805ef | 2006-03-23 00:01:34 -0300 | [diff] [blame] | 170 | } |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 171 | |
Chris Pascoe | 272479d7 | 2007-11-19 03:01:22 -0300 | [diff] [blame] | 172 | if (msg[i].flags & I2C_M_RD) { |
| 173 | /* read only */ |
Mauro Carvalho Chehab | 64f7ef8 | 2013-11-02 07:18:09 -0300 | [diff] [blame] | 174 | u8 obuf[3], ibuf[MAX_XFER_SIZE]; |
| 175 | |
| 176 | if (1 + msg[i].len > sizeof(ibuf)) { |
| 177 | warn("i2c rd: len=%d is too big!\n", |
| 178 | msg[i].len); |
Dan Carpenter | 1cdbcc5 | 2013-11-22 04:55:43 -0300 | [diff] [blame] | 179 | ret = -EOPNOTSUPP; |
| 180 | goto unlock; |
Mauro Carvalho Chehab | 64f7ef8 | 2013-11-02 07:18:09 -0300 | [diff] [blame] | 181 | } |
Chris Pascoe | 272479d7 | 2007-11-19 03:01:22 -0300 | [diff] [blame] | 182 | obuf[0] = 0; |
| 183 | obuf[1] = msg[i].len; |
| 184 | obuf[2] = msg[i].addr; |
| 185 | if (cxusb_ctrl_msg(d, CMD_I2C_READ, |
| 186 | obuf, 3, |
| 187 | ibuf, 1+msg[i].len) < 0) { |
| 188 | warn("i2c read failed"); |
| 189 | break; |
| 190 | } |
| 191 | memcpy(msg[i].buf, &ibuf[1], msg[i].len); |
Chris Pascoe | a644e4a | 2007-11-19 03:05:09 -0300 | [diff] [blame] | 192 | } else if (i+1 < num && (msg[i+1].flags & I2C_M_RD) && |
| 193 | msg[i].addr == msg[i+1].addr) { |
| 194 | /* write to then read from same address */ |
Mauro Carvalho Chehab | 64f7ef8 | 2013-11-02 07:18:09 -0300 | [diff] [blame] | 195 | u8 obuf[MAX_XFER_SIZE], ibuf[MAX_XFER_SIZE]; |
| 196 | |
| 197 | if (3 + msg[i].len > sizeof(obuf)) { |
| 198 | warn("i2c wr: len=%d is too big!\n", |
| 199 | msg[i].len); |
Dan Carpenter | 1cdbcc5 | 2013-11-22 04:55:43 -0300 | [diff] [blame] | 200 | ret = -EOPNOTSUPP; |
| 201 | goto unlock; |
Mauro Carvalho Chehab | 64f7ef8 | 2013-11-02 07:18:09 -0300 | [diff] [blame] | 202 | } |
| 203 | if (1 + msg[i + 1].len > sizeof(ibuf)) { |
| 204 | warn("i2c rd: len=%d is too big!\n", |
| 205 | msg[i + 1].len); |
Dan Carpenter | 1cdbcc5 | 2013-11-22 04:55:43 -0300 | [diff] [blame] | 206 | ret = -EOPNOTSUPP; |
| 207 | goto unlock; |
Mauro Carvalho Chehab | 64f7ef8 | 2013-11-02 07:18:09 -0300 | [diff] [blame] | 208 | } |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 209 | obuf[0] = msg[i].len; |
| 210 | obuf[1] = msg[i+1].len; |
| 211 | obuf[2] = msg[i].addr; |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 212 | memcpy(&obuf[3], msg[i].buf, msg[i].len); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 213 | |
| 214 | if (cxusb_ctrl_msg(d, CMD_I2C_READ, |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 215 | obuf, 3+msg[i].len, |
| 216 | ibuf, 1+msg[i+1].len) < 0) |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 217 | break; |
| 218 | |
| 219 | if (ibuf[0] != 0x08) |
Michael Krufky | ae62e3d | 2006-03-23 01:11:18 -0300 | [diff] [blame] | 220 | deb_i2c("i2c read may have failed\n"); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 221 | |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 222 | memcpy(msg[i+1].buf, &ibuf[1], msg[i+1].len); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 223 | |
| 224 | i++; |
Chris Pascoe | 272479d7 | 2007-11-19 03:01:22 -0300 | [diff] [blame] | 225 | } else { |
| 226 | /* write only */ |
Mauro Carvalho Chehab | 64f7ef8 | 2013-11-02 07:18:09 -0300 | [diff] [blame] | 227 | u8 obuf[MAX_XFER_SIZE], ibuf; |
| 228 | |
| 229 | if (2 + msg[i].len > sizeof(obuf)) { |
| 230 | warn("i2c wr: len=%d is too big!\n", |
| 231 | msg[i].len); |
Dan Carpenter | 1cdbcc5 | 2013-11-22 04:55:43 -0300 | [diff] [blame] | 232 | ret = -EOPNOTSUPP; |
| 233 | goto unlock; |
Mauro Carvalho Chehab | 64f7ef8 | 2013-11-02 07:18:09 -0300 | [diff] [blame] | 234 | } |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 235 | obuf[0] = msg[i].addr; |
| 236 | obuf[1] = msg[i].len; |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 237 | memcpy(&obuf[2], msg[i].buf, msg[i].len); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 238 | |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 239 | if (cxusb_ctrl_msg(d, CMD_I2C_WRITE, obuf, |
| 240 | 2+msg[i].len, &ibuf,1) < 0) |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 241 | break; |
| 242 | if (ibuf != 0x08) |
Michael Krufky | ae62e3d | 2006-03-23 01:11:18 -0300 | [diff] [blame] | 243 | deb_i2c("i2c write may have failed\n"); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 244 | } |
| 245 | } |
| 246 | |
Dan Carpenter | 1cdbcc5 | 2013-11-22 04:55:43 -0300 | [diff] [blame] | 247 | if (i == num) |
| 248 | ret = num; |
| 249 | else |
| 250 | ret = -EREMOTEIO; |
| 251 | |
| 252 | unlock: |
Ingo Molnar | 3593cab | 2006-02-07 06:49:14 -0200 | [diff] [blame] | 253 | mutex_unlock(&d->i2c_mutex); |
Dan Carpenter | 1cdbcc5 | 2013-11-22 04:55:43 -0300 | [diff] [blame] | 254 | return ret; |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 255 | } |
| 256 | |
| 257 | static u32 cxusb_i2c_func(struct i2c_adapter *adapter) |
| 258 | { |
| 259 | return I2C_FUNC_I2C; |
| 260 | } |
| 261 | |
| 262 | static struct i2c_algorithm cxusb_i2c_algo = { |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 263 | .master_xfer = cxusb_i2c_xfer, |
| 264 | .functionality = cxusb_i2c_func, |
| 265 | }; |
| 266 | |
| 267 | static int cxusb_power_ctrl(struct dvb_usb_device *d, int onoff) |
| 268 | { |
Patrick Boettcher | e2efeab | 2005-09-09 13:02:51 -0700 | [diff] [blame] | 269 | u8 b = 0; |
| 270 | if (onoff) |
| 271 | return cxusb_ctrl_msg(d, CMD_POWER_ON, &b, 1, NULL, 0); |
| 272 | else |
| 273 | return cxusb_ctrl_msg(d, CMD_POWER_OFF, &b, 1, NULL, 0); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 274 | } |
| 275 | |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 276 | static int cxusb_aver_power_ctrl(struct dvb_usb_device *d, int onoff) |
| 277 | { |
| 278 | int ret; |
| 279 | if (!onoff) |
| 280 | return cxusb_ctrl_msg(d, CMD_POWER_OFF, NULL, 0, NULL, 0); |
| 281 | if (d->state == DVB_USB_STATE_INIT && |
| 282 | usb_set_interface(d->udev, 0, 0) < 0) |
| 283 | err("set interface failed"); |
Hans Verkuil | c6eb8ea | 2008-09-03 17:11:54 -0300 | [diff] [blame] | 284 | do {} while (!(ret = cxusb_ctrl_msg(d, CMD_POWER_ON, NULL, 0, NULL, 0)) && |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 285 | !(ret = cxusb_ctrl_msg(d, 0x15, NULL, 0, NULL, 0)) && |
| 286 | !(ret = cxusb_ctrl_msg(d, 0x17, NULL, 0, NULL, 0)) && 0); |
| 287 | if (!ret) { |
| 288 | /* FIXME: We don't know why, but we need to configure the |
| 289 | * lgdt3303 with the register settings below on resume */ |
| 290 | int i; |
| 291 | u8 buf, bufs[] = { |
| 292 | 0x0e, 0x2, 0x00, 0x7f, |
| 293 | 0x0e, 0x2, 0x02, 0xfe, |
| 294 | 0x0e, 0x2, 0x02, 0x01, |
| 295 | 0x0e, 0x2, 0x00, 0x03, |
| 296 | 0x0e, 0x2, 0x0d, 0x40, |
| 297 | 0x0e, 0x2, 0x0e, 0x87, |
| 298 | 0x0e, 0x2, 0x0f, 0x8e, |
| 299 | 0x0e, 0x2, 0x10, 0x01, |
| 300 | 0x0e, 0x2, 0x14, 0xd7, |
| 301 | 0x0e, 0x2, 0x47, 0x88, |
| 302 | }; |
| 303 | msleep(20); |
| 304 | for (i = 0; i < sizeof(bufs)/sizeof(u8); i += 4/sizeof(u8)) { |
| 305 | ret = cxusb_ctrl_msg(d, CMD_I2C_WRITE, |
| 306 | bufs+i, 4, &buf, 1); |
| 307 | if (ret) |
| 308 | break; |
| 309 | if (buf != 0x8) |
| 310 | return -EREMOTEIO; |
| 311 | } |
| 312 | } |
| 313 | return ret; |
| 314 | } |
| 315 | |
Michael Krufky | 5691c84 | 2006-04-19 20:40:01 -0300 | [diff] [blame] | 316 | static int cxusb_bluebird_power_ctrl(struct dvb_usb_device *d, int onoff) |
| 317 | { |
| 318 | u8 b = 0; |
| 319 | if (onoff) |
| 320 | return cxusb_ctrl_msg(d, CMD_POWER_ON, &b, 1, NULL, 0); |
| 321 | else |
| 322 | return 0; |
| 323 | } |
| 324 | |
Chris Pascoe | 5ccaf90 | 2007-11-20 01:53:31 -0300 | [diff] [blame] | 325 | static int cxusb_nano2_power_ctrl(struct dvb_usb_device *d, int onoff) |
| 326 | { |
| 327 | int rc = 0; |
| 328 | |
| 329 | rc = cxusb_power_ctrl(d, onoff); |
| 330 | if (!onoff) |
| 331 | cxusb_nano2_led(d, 0); |
| 332 | |
| 333 | return rc; |
| 334 | } |
| 335 | |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 336 | static int cxusb_d680_dmb_power_ctrl(struct dvb_usb_device *d, int onoff) |
| 337 | { |
| 338 | int ret; |
| 339 | u8 b; |
| 340 | ret = cxusb_power_ctrl(d, onoff); |
| 341 | if (!onoff) |
| 342 | return ret; |
| 343 | |
| 344 | msleep(128); |
| 345 | cxusb_ctrl_msg(d, CMD_DIGITAL, NULL, 0, &b, 1); |
| 346 | msleep(100); |
| 347 | return ret; |
| 348 | } |
| 349 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 350 | static int cxusb_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 351 | { |
Patrick Boettcher | 8257e8a | 2005-07-07 17:58:15 -0700 | [diff] [blame] | 352 | u8 buf[2] = { 0x03, 0x00 }; |
| 353 | if (onoff) |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 354 | cxusb_ctrl_msg(adap->dev, CMD_STREAMING_ON, buf, 2, NULL, 0); |
Patrick Boettcher | 8257e8a | 2005-07-07 17:58:15 -0700 | [diff] [blame] | 355 | else |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 356 | cxusb_ctrl_msg(adap->dev, CMD_STREAMING_OFF, NULL, 0, NULL, 0); |
Patrick Boettcher | 8257e8a | 2005-07-07 17:58:15 -0700 | [diff] [blame] | 357 | |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 358 | return 0; |
| 359 | } |
| 360 | |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 361 | static int cxusb_aver_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) |
| 362 | { |
| 363 | if (onoff) |
| 364 | cxusb_ctrl_msg(adap->dev, CMD_AVER_STREAM_ON, NULL, 0, NULL, 0); |
| 365 | else |
| 366 | cxusb_ctrl_msg(adap->dev, CMD_AVER_STREAM_OFF, |
| 367 | NULL, 0, NULL, 0); |
| 368 | return 0; |
| 369 | } |
| 370 | |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 371 | static void cxusb_d680_dmb_drain_message(struct dvb_usb_device *d) |
| 372 | { |
| 373 | int ep = d->props.generic_bulk_ctrl_endpoint; |
| 374 | const int timeout = 100; |
| 375 | const int junk_len = 32; |
| 376 | u8 *junk; |
| 377 | int rd_count; |
| 378 | |
| 379 | /* Discard remaining data in video pipe */ |
| 380 | junk = kmalloc(junk_len, GFP_KERNEL); |
| 381 | if (!junk) |
| 382 | return; |
| 383 | while (1) { |
| 384 | if (usb_bulk_msg(d->udev, |
| 385 | usb_rcvbulkpipe(d->udev, ep), |
| 386 | junk, junk_len, &rd_count, timeout) < 0) |
| 387 | break; |
| 388 | if (!rd_count) |
| 389 | break; |
| 390 | } |
| 391 | kfree(junk); |
| 392 | } |
| 393 | |
| 394 | static void cxusb_d680_dmb_drain_video(struct dvb_usb_device *d) |
| 395 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 396 | struct usb_data_stream_properties *p = &d->props.adapter[0].fe[0].stream; |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 397 | const int timeout = 100; |
| 398 | const int junk_len = p->u.bulk.buffersize; |
| 399 | u8 *junk; |
| 400 | int rd_count; |
| 401 | |
| 402 | /* Discard remaining data in video pipe */ |
| 403 | junk = kmalloc(junk_len, GFP_KERNEL); |
| 404 | if (!junk) |
| 405 | return; |
| 406 | while (1) { |
| 407 | if (usb_bulk_msg(d->udev, |
| 408 | usb_rcvbulkpipe(d->udev, p->endpoint), |
| 409 | junk, junk_len, &rd_count, timeout) < 0) |
| 410 | break; |
| 411 | if (!rd_count) |
| 412 | break; |
| 413 | } |
| 414 | kfree(junk); |
| 415 | } |
| 416 | |
| 417 | static int cxusb_d680_dmb_streaming_ctrl( |
| 418 | struct dvb_usb_adapter *adap, int onoff) |
| 419 | { |
| 420 | if (onoff) { |
| 421 | u8 buf[2] = { 0x03, 0x00 }; |
| 422 | cxusb_d680_dmb_drain_video(adap->dev); |
| 423 | return cxusb_ctrl_msg(adap->dev, CMD_STREAMING_ON, |
| 424 | buf, sizeof(buf), NULL, 0); |
| 425 | } else { |
| 426 | int ret = cxusb_ctrl_msg(adap->dev, |
| 427 | CMD_STREAMING_OFF, NULL, 0, NULL, 0); |
| 428 | return ret; |
| 429 | } |
| 430 | } |
| 431 | |
Chris Pascoe | 7c23970 | 2006-01-09 18:21:29 -0200 | [diff] [blame] | 432 | static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state) |
| 433 | { |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 434 | struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table; |
Michael Krufky | a07e609 | 2006-01-09 18:21:31 -0200 | [diff] [blame] | 435 | u8 ircode[4]; |
Chris Pascoe | 7c23970 | 2006-01-09 18:21:29 -0200 | [diff] [blame] | 436 | int i; |
| 437 | |
Michael Krufky | a07e609 | 2006-01-09 18:21:31 -0200 | [diff] [blame] | 438 | cxusb_ctrl_msg(d, CMD_GET_IR_CODE, NULL, 0, ircode, 4); |
Chris Pascoe | 7c23970 | 2006-01-09 18:21:29 -0200 | [diff] [blame] | 439 | |
| 440 | *event = 0; |
| 441 | *state = REMOTE_NO_KEY_PRESSED; |
| 442 | |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 443 | for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) { |
Mauro Carvalho Chehab | 2e36588 | 2009-08-29 15:19:31 -0300 | [diff] [blame] | 444 | if (rc5_custom(&keymap[i]) == ircode[2] && |
| 445 | rc5_data(&keymap[i]) == ircode[3]) { |
Mauro Carvalho Chehab | 34abf21 | 2010-07-31 11:24:57 -0300 | [diff] [blame] | 446 | *event = keymap[i].keycode; |
Chris Pascoe | 7c23970 | 2006-01-09 18:21:29 -0200 | [diff] [blame] | 447 | *state = REMOTE_KEY_PRESSED; |
| 448 | |
| 449 | return 0; |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | return 0; |
| 454 | } |
| 455 | |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 456 | static int cxusb_bluebird2_rc_query(struct dvb_usb_device *d, u32 *event, |
| 457 | int *state) |
| 458 | { |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 459 | struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table; |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 460 | u8 ircode[4]; |
| 461 | int i; |
| 462 | struct i2c_msg msg = { .addr = 0x6b, .flags = I2C_M_RD, |
| 463 | .buf = ircode, .len = 4 }; |
| 464 | |
| 465 | *event = 0; |
| 466 | *state = REMOTE_NO_KEY_PRESSED; |
| 467 | |
| 468 | if (cxusb_i2c_xfer(&d->i2c_adap, &msg, 1) != 1) |
| 469 | return 0; |
| 470 | |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 471 | for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) { |
Mauro Carvalho Chehab | 2e36588 | 2009-08-29 15:19:31 -0300 | [diff] [blame] | 472 | if (rc5_custom(&keymap[i]) == ircode[1] && |
| 473 | rc5_data(&keymap[i]) == ircode[2]) { |
Mauro Carvalho Chehab | 34abf21 | 2010-07-31 11:24:57 -0300 | [diff] [blame] | 474 | *event = keymap[i].keycode; |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 475 | *state = REMOTE_KEY_PRESSED; |
| 476 | |
| 477 | return 0; |
| 478 | } |
| 479 | } |
| 480 | |
| 481 | return 0; |
| 482 | } |
| 483 | |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 484 | static int cxusb_d680_dmb_rc_query(struct dvb_usb_device *d, u32 *event, |
| 485 | int *state) |
| 486 | { |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 487 | struct rc_map_table *keymap = d->props.rc.legacy.rc_map_table; |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 488 | u8 ircode[2]; |
| 489 | int i; |
| 490 | |
| 491 | *event = 0; |
| 492 | *state = REMOTE_NO_KEY_PRESSED; |
| 493 | |
| 494 | if (cxusb_ctrl_msg(d, 0x10, NULL, 0, ircode, 2) < 0) |
| 495 | return 0; |
| 496 | |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 497 | for (i = 0; i < d->props.rc.legacy.rc_map_size; i++) { |
Mauro Carvalho Chehab | 2e36588 | 2009-08-29 15:19:31 -0300 | [diff] [blame] | 498 | if (rc5_custom(&keymap[i]) == ircode[0] && |
| 499 | rc5_data(&keymap[i]) == ircode[1]) { |
Mauro Carvalho Chehab | 34abf21 | 2010-07-31 11:24:57 -0300 | [diff] [blame] | 500 | *event = keymap[i].keycode; |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 501 | *state = REMOTE_KEY_PRESSED; |
| 502 | |
| 503 | return 0; |
| 504 | } |
| 505 | } |
| 506 | |
| 507 | return 0; |
| 508 | } |
| 509 | |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 510 | static struct rc_map_table rc_map_dvico_mce_table[] = { |
Mauro Carvalho Chehab | 2e36588 | 2009-08-29 15:19:31 -0300 | [diff] [blame] | 511 | { 0xfe02, KEY_TV }, |
| 512 | { 0xfe0e, KEY_MP3 }, |
| 513 | { 0xfe1a, KEY_DVD }, |
| 514 | { 0xfe1e, KEY_FAVORITES }, |
| 515 | { 0xfe16, KEY_SETUP }, |
| 516 | { 0xfe46, KEY_POWER2 }, |
| 517 | { 0xfe0a, KEY_EPG }, |
| 518 | { 0xfe49, KEY_BACK }, |
| 519 | { 0xfe4d, KEY_MENU }, |
| 520 | { 0xfe51, KEY_UP }, |
| 521 | { 0xfe5b, KEY_LEFT }, |
| 522 | { 0xfe5f, KEY_RIGHT }, |
| 523 | { 0xfe53, KEY_DOWN }, |
| 524 | { 0xfe5e, KEY_OK }, |
| 525 | { 0xfe59, KEY_INFO }, |
| 526 | { 0xfe55, KEY_TAB }, |
| 527 | { 0xfe0f, KEY_PREVIOUSSONG },/* Replay */ |
| 528 | { 0xfe12, KEY_NEXTSONG }, /* Skip */ |
| 529 | { 0xfe42, KEY_ENTER }, /* Windows/Start */ |
| 530 | { 0xfe15, KEY_VOLUMEUP }, |
| 531 | { 0xfe05, KEY_VOLUMEDOWN }, |
| 532 | { 0xfe11, KEY_CHANNELUP }, |
| 533 | { 0xfe09, KEY_CHANNELDOWN }, |
| 534 | { 0xfe52, KEY_CAMERA }, |
| 535 | { 0xfe5a, KEY_TUNER }, /* Live */ |
| 536 | { 0xfe19, KEY_OPEN }, |
| 537 | { 0xfe0b, KEY_1 }, |
| 538 | { 0xfe17, KEY_2 }, |
| 539 | { 0xfe1b, KEY_3 }, |
| 540 | { 0xfe07, KEY_4 }, |
| 541 | { 0xfe50, KEY_5 }, |
| 542 | { 0xfe54, KEY_6 }, |
| 543 | { 0xfe48, KEY_7 }, |
| 544 | { 0xfe4c, KEY_8 }, |
| 545 | { 0xfe58, KEY_9 }, |
| 546 | { 0xfe13, KEY_ANGLE }, /* Aspect */ |
| 547 | { 0xfe03, KEY_0 }, |
| 548 | { 0xfe1f, KEY_ZOOM }, |
| 549 | { 0xfe43, KEY_REWIND }, |
| 550 | { 0xfe47, KEY_PLAYPAUSE }, |
| 551 | { 0xfe4f, KEY_FASTFORWARD }, |
| 552 | { 0xfe57, KEY_MUTE }, |
| 553 | { 0xfe0d, KEY_STOP }, |
| 554 | { 0xfe01, KEY_RECORD }, |
| 555 | { 0xfe4e, KEY_POWER }, |
Michael Krufky | a07e609 | 2006-01-09 18:21:31 -0200 | [diff] [blame] | 556 | }; |
| 557 | |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 558 | static struct rc_map_table rc_map_dvico_portable_table[] = { |
Mauro Carvalho Chehab | 2e36588 | 2009-08-29 15:19:31 -0300 | [diff] [blame] | 559 | { 0xfc02, KEY_SETUP }, /* Profile */ |
| 560 | { 0xfc43, KEY_POWER2 }, |
| 561 | { 0xfc06, KEY_EPG }, |
| 562 | { 0xfc5a, KEY_BACK }, |
| 563 | { 0xfc05, KEY_MENU }, |
| 564 | { 0xfc47, KEY_INFO }, |
| 565 | { 0xfc01, KEY_TAB }, |
| 566 | { 0xfc42, KEY_PREVIOUSSONG },/* Replay */ |
| 567 | { 0xfc49, KEY_VOLUMEUP }, |
| 568 | { 0xfc09, KEY_VOLUMEDOWN }, |
| 569 | { 0xfc54, KEY_CHANNELUP }, |
| 570 | { 0xfc0b, KEY_CHANNELDOWN }, |
| 571 | { 0xfc16, KEY_CAMERA }, |
| 572 | { 0xfc40, KEY_TUNER }, /* ATV/DTV */ |
| 573 | { 0xfc45, KEY_OPEN }, |
| 574 | { 0xfc19, KEY_1 }, |
| 575 | { 0xfc18, KEY_2 }, |
| 576 | { 0xfc1b, KEY_3 }, |
| 577 | { 0xfc1a, KEY_4 }, |
| 578 | { 0xfc58, KEY_5 }, |
| 579 | { 0xfc59, KEY_6 }, |
| 580 | { 0xfc15, KEY_7 }, |
| 581 | { 0xfc14, KEY_8 }, |
| 582 | { 0xfc17, KEY_9 }, |
| 583 | { 0xfc44, KEY_ANGLE }, /* Aspect */ |
| 584 | { 0xfc55, KEY_0 }, |
| 585 | { 0xfc07, KEY_ZOOM }, |
| 586 | { 0xfc0a, KEY_REWIND }, |
| 587 | { 0xfc08, KEY_PLAYPAUSE }, |
| 588 | { 0xfc4b, KEY_FASTFORWARD }, |
| 589 | { 0xfc5b, KEY_MUTE }, |
| 590 | { 0xfc04, KEY_STOP }, |
| 591 | { 0xfc56, KEY_RECORD }, |
| 592 | { 0xfc57, KEY_POWER }, |
| 593 | { 0xfc41, KEY_UNKNOWN }, /* INPUT */ |
| 594 | { 0xfc00, KEY_UNKNOWN }, /* HD */ |
Michael Krufky | c150178 | 2006-03-26 05:43:36 -0300 | [diff] [blame] | 595 | }; |
| 596 | |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 597 | static struct rc_map_table rc_map_d680_dmb_table[] = { |
Mauro Carvalho Chehab | 2e36588 | 2009-08-29 15:19:31 -0300 | [diff] [blame] | 598 | { 0x0038, KEY_UNKNOWN }, /* TV/AV */ |
| 599 | { 0x080c, KEY_ZOOM }, |
| 600 | { 0x0800, KEY_0 }, |
| 601 | { 0x0001, KEY_1 }, |
| 602 | { 0x0802, KEY_2 }, |
| 603 | { 0x0003, KEY_3 }, |
| 604 | { 0x0804, KEY_4 }, |
| 605 | { 0x0005, KEY_5 }, |
| 606 | { 0x0806, KEY_6 }, |
| 607 | { 0x0007, KEY_7 }, |
| 608 | { 0x0808, KEY_8 }, |
| 609 | { 0x0009, KEY_9 }, |
| 610 | { 0x000a, KEY_MUTE }, |
| 611 | { 0x0829, KEY_BACK }, |
| 612 | { 0x0012, KEY_CHANNELUP }, |
| 613 | { 0x0813, KEY_CHANNELDOWN }, |
| 614 | { 0x002b, KEY_VOLUMEUP }, |
| 615 | { 0x082c, KEY_VOLUMEDOWN }, |
| 616 | { 0x0020, KEY_UP }, |
| 617 | { 0x0821, KEY_DOWN }, |
| 618 | { 0x0011, KEY_LEFT }, |
| 619 | { 0x0810, KEY_RIGHT }, |
| 620 | { 0x000d, KEY_OK }, |
| 621 | { 0x081f, KEY_RECORD }, |
| 622 | { 0x0017, KEY_PLAYPAUSE }, |
| 623 | { 0x0816, KEY_PLAYPAUSE }, |
| 624 | { 0x000b, KEY_STOP }, |
| 625 | { 0x0827, KEY_FASTFORWARD }, |
| 626 | { 0x0026, KEY_REWIND }, |
| 627 | { 0x081e, KEY_UNKNOWN }, /* Time Shift */ |
| 628 | { 0x000e, KEY_UNKNOWN }, /* Snapshot */ |
| 629 | { 0x082d, KEY_UNKNOWN }, /* Mouse Cursor */ |
| 630 | { 0x000f, KEY_UNKNOWN }, /* Minimize/Maximize */ |
| 631 | { 0x0814, KEY_UNKNOWN }, /* Shuffle */ |
| 632 | { 0x0025, KEY_POWER }, |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 633 | }; |
| 634 | |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 635 | static int cxusb_dee1601_demod_init(struct dvb_frontend* fe) |
| 636 | { |
Chris Pascoe | d9ed881 | 2006-02-07 06:49:11 -0200 | [diff] [blame] | 637 | static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x28 }; |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 638 | static u8 reset [] = { RESET, 0x80 }; |
| 639 | static u8 adc_ctl_1_cfg [] = { ADC_CTL_1, 0x40 }; |
| 640 | static u8 agc_cfg [] = { AGC_TARGET, 0x28, 0x20 }; |
| 641 | static u8 gpp_ctl_cfg [] = { GPP_CTL, 0x33 }; |
| 642 | static u8 capt_range_cfg[] = { CAPT_RANGE, 0x32 }; |
| 643 | |
| 644 | mt352_write(fe, clock_config, sizeof(clock_config)); |
| 645 | udelay(200); |
| 646 | mt352_write(fe, reset, sizeof(reset)); |
| 647 | mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg)); |
| 648 | |
| 649 | mt352_write(fe, agc_cfg, sizeof(agc_cfg)); |
| 650 | mt352_write(fe, gpp_ctl_cfg, sizeof(gpp_ctl_cfg)); |
| 651 | mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg)); |
| 652 | |
| 653 | return 0; |
| 654 | } |
| 655 | |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 656 | static int cxusb_mt352_demod_init(struct dvb_frontend* fe) |
| 657 | { /* used in both lgz201 and th7579 */ |
Michael Krufky | fb51fd2 | 2006-02-07 06:49:12 -0200 | [diff] [blame] | 658 | static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x29 }; |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 659 | static u8 reset [] = { RESET, 0x80 }; |
| 660 | static u8 adc_ctl_1_cfg [] = { ADC_CTL_1, 0x40 }; |
| 661 | static u8 agc_cfg [] = { AGC_TARGET, 0x24, 0x20 }; |
| 662 | static u8 gpp_ctl_cfg [] = { GPP_CTL, 0x33 }; |
| 663 | static u8 capt_range_cfg[] = { CAPT_RANGE, 0x32 }; |
| 664 | |
| 665 | mt352_write(fe, clock_config, sizeof(clock_config)); |
| 666 | udelay(200); |
| 667 | mt352_write(fe, reset, sizeof(reset)); |
| 668 | mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg)); |
| 669 | |
| 670 | mt352_write(fe, agc_cfg, sizeof(agc_cfg)); |
| 671 | mt352_write(fe, gpp_ctl_cfg, sizeof(gpp_ctl_cfg)); |
| 672 | mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg)); |
| 673 | return 0; |
| 674 | } |
| 675 | |
Adrian Bunk | 703cb2c | 2006-01-23 17:11:09 -0200 | [diff] [blame] | 676 | static struct cx22702_config cxusb_cx22702_config = { |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 677 | .demod_address = 0x63, |
Patrick Boettcher | 8257e8a | 2005-07-07 17:58:15 -0700 | [diff] [blame] | 678 | .output_mode = CX22702_PARALLEL_OUTPUT, |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 679 | }; |
| 680 | |
Michael Krufky | fddd632 | 2006-02-27 00:08:17 -0300 | [diff] [blame] | 681 | static struct lgdt330x_config cxusb_lgdt3303_config = { |
Michael Krufky | effee03 | 2006-01-09 15:25:47 -0200 | [diff] [blame] | 682 | .demod_address = 0x0e, |
| 683 | .demod_chip = LGDT3303, |
Michael Krufky | effee03 | 2006-01-09 15:25:47 -0200 | [diff] [blame] | 684 | }; |
| 685 | |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 686 | static struct lgdt330x_config cxusb_aver_lgdt3303_config = { |
| 687 | .demod_address = 0x0e, |
| 688 | .demod_chip = LGDT3303, |
| 689 | .clock_polarity_flip = 2, |
| 690 | }; |
| 691 | |
Adrian Bunk | 703cb2c | 2006-01-23 17:11:09 -0200 | [diff] [blame] | 692 | static struct mt352_config cxusb_dee1601_config = { |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 693 | .demod_address = 0x0f, |
| 694 | .demod_init = cxusb_dee1601_demod_init, |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 695 | }; |
| 696 | |
Michael Krufky | c9ce394 | 2006-06-11 04:24:31 -0300 | [diff] [blame] | 697 | static struct zl10353_config cxusb_zl10353_dee1601_config = { |
| 698 | .demod_address = 0x0f, |
Chris Pascoe | 8fb9578 | 2006-08-10 03:17:16 -0300 | [diff] [blame] | 699 | .parallel_ts = 1, |
Michael Krufky | c9ce394 | 2006-06-11 04:24:31 -0300 | [diff] [blame] | 700 | }; |
| 701 | |
Adrian Bunk | 6fe00b0 | 2006-04-19 20:49:28 -0300 | [diff] [blame] | 702 | static struct mt352_config cxusb_mt352_config = { |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 703 | /* used in both lgz201 and th7579 */ |
| 704 | .demod_address = 0x0f, |
| 705 | .demod_init = cxusb_mt352_demod_init, |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 706 | }; |
| 707 | |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 708 | static struct zl10353_config cxusb_zl10353_xc3028_config = { |
| 709 | .demod_address = 0x0f, |
Chris Pascoe | a1dcd9d | 2007-11-20 08:17:54 -0300 | [diff] [blame] | 710 | .if2 = 45600, |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 711 | .no_tuner = 1, |
| 712 | .parallel_ts = 1, |
| 713 | }; |
| 714 | |
Robert Lowery | 0bc3518 | 2009-11-08 00:00:11 -0300 | [diff] [blame] | 715 | static struct zl10353_config cxusb_zl10353_xc3028_config_no_i2c_gate = { |
| 716 | .demod_address = 0x0f, |
| 717 | .if2 = 45600, |
| 718 | .no_tuner = 1, |
| 719 | .parallel_ts = 1, |
| 720 | .disable_i2c_gate_ctrl = 1, |
| 721 | }; |
| 722 | |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 723 | static struct mt352_config cxusb_mt352_xc3028_config = { |
| 724 | .demod_address = 0x0f, |
| 725 | .if2 = 4560, |
| 726 | .no_tuner = 1, |
| 727 | .demod_init = cxusb_mt352_demod_init, |
| 728 | }; |
| 729 | |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 730 | /* FIXME: needs tweaking */ |
| 731 | static struct mxl5005s_config aver_a868r_tuner = { |
| 732 | .i2c_address = 0x63, |
| 733 | .if_freq = 6000000UL, |
| 734 | .xtal_freq = CRYSTAL_FREQ_16000000HZ, |
| 735 | .agc_mode = MXL_SINGLE_AGC, |
| 736 | .tracking_filter = MXL_TF_C, |
| 737 | .rssi_enable = MXL_RSSI_ENABLE, |
| 738 | .cap_select = MXL_CAP_SEL_ENABLE, |
| 739 | .div_out = MXL_DIV_OUT_4, |
| 740 | .clock_out = MXL_CLOCK_OUT_DISABLE, |
| 741 | .output_load = MXL5005S_IF_OUTPUT_LOAD_200_OHM, |
| 742 | .top = MXL5005S_TOP_25P2, |
| 743 | .mod_mode = MXL_DIGITAL_MODE, |
| 744 | .if_mode = MXL_ZERO_IF, |
| 745 | .AgcMasterByte = 0x00, |
| 746 | }; |
| 747 | |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 748 | /* FIXME: needs tweaking */ |
| 749 | static struct mxl5005s_config d680_dmb_tuner = { |
| 750 | .i2c_address = 0x63, |
| 751 | .if_freq = 36125000UL, |
| 752 | .xtal_freq = CRYSTAL_FREQ_16000000HZ, |
| 753 | .agc_mode = MXL_SINGLE_AGC, |
| 754 | .tracking_filter = MXL_TF_C, |
| 755 | .rssi_enable = MXL_RSSI_ENABLE, |
| 756 | .cap_select = MXL_CAP_SEL_ENABLE, |
| 757 | .div_out = MXL_DIV_OUT_4, |
| 758 | .clock_out = MXL_CLOCK_OUT_DISABLE, |
| 759 | .output_load = MXL5005S_IF_OUTPUT_LOAD_200_OHM, |
| 760 | .top = MXL5005S_TOP_25P2, |
| 761 | .mod_mode = MXL_DIGITAL_MODE, |
| 762 | .if_mode = MXL_ZERO_IF, |
| 763 | .AgcMasterByte = 0x00, |
| 764 | }; |
| 765 | |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 766 | static struct max2165_config mygica_d689_max2165_cfg = { |
| 767 | .i2c_address = 0x60, |
| 768 | .osc_clk = 20 |
| 769 | }; |
| 770 | |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 771 | /* Callbacks for DVB USB */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 772 | static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap) |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 773 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 774 | dvb_attach(simple_tuner_attach, adap->fe_adap[0].fe, |
Michael Krufky | cb89cd3 | 2008-04-22 14:46:16 -0300 | [diff] [blame] | 775 | &adap->dev->i2c_adap, 0x61, |
| 776 | TUNER_PHILIPS_FMD1216ME_MK3); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 777 | return 0; |
| 778 | } |
| 779 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 780 | static int cxusb_dee1601_tuner_attach(struct dvb_usb_adapter *adap) |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 781 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 782 | dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x61, |
Michael Krufky | 47a9991 | 2007-06-12 16:10:51 -0300 | [diff] [blame] | 783 | NULL, DVB_PLL_THOMSON_DTT7579); |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 784 | return 0; |
| 785 | } |
| 786 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 787 | static int cxusb_lgz201_tuner_attach(struct dvb_usb_adapter *adap) |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 788 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 789 | dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x61, NULL, DVB_PLL_LG_Z201); |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 790 | return 0; |
| 791 | } |
| 792 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 793 | static int cxusb_dtt7579_tuner_attach(struct dvb_usb_adapter *adap) |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 794 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 795 | dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, |
Michael Krufky | 47a9991 | 2007-06-12 16:10:51 -0300 | [diff] [blame] | 796 | NULL, DVB_PLL_THOMSON_DTT7579); |
Patrick Boettcher | 332bed5 | 2006-05-14 04:49:00 -0300 | [diff] [blame] | 797 | return 0; |
| 798 | } |
| 799 | |
Michael Krufky | f71a56c | 2006-10-13 21:55:57 -0300 | [diff] [blame] | 800 | static int cxusb_lgh064f_tuner_attach(struct dvb_usb_adapter *adap) |
Patrick Boettcher | 332bed5 | 2006-05-14 04:49:00 -0300 | [diff] [blame] | 801 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 802 | dvb_attach(simple_tuner_attach, adap->fe_adap[0].fe, |
Michael Krufky | 827855d | 2008-04-22 14:46:16 -0300 | [diff] [blame] | 803 | &adap->dev->i2c_adap, 0x61, TUNER_LG_TDVS_H06XF); |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 804 | return 0; |
| 805 | } |
| 806 | |
Michael Krufky | d7cba04 | 2008-09-12 13:31:45 -0300 | [diff] [blame] | 807 | static int dvico_bluebird_xc2028_callback(void *ptr, int component, |
| 808 | int command, int arg) |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 809 | { |
Robert Lowery | d483b73 | 2008-07-30 19:43:11 -0300 | [diff] [blame] | 810 | struct dvb_usb_adapter *adap = ptr; |
| 811 | struct dvb_usb_device *d = adap->dev; |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 812 | |
| 813 | switch (command) { |
| 814 | case XC2028_TUNER_RESET: |
Harvey Harrison | 708bebd | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 815 | deb_info("%s: XC2028_TUNER_RESET %d\n", __func__, arg); |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 816 | cxusb_bluebird_gpio_pulse(d, 0x01, 1); |
| 817 | break; |
| 818 | case XC2028_RESET_CLK: |
Harvey Harrison | 708bebd | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 819 | deb_info("%s: XC2028_RESET_CLK %d\n", __func__, arg); |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 820 | break; |
| 821 | default: |
Harvey Harrison | 708bebd | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 822 | deb_info("%s: unknown command %d, arg %d\n", __func__, |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 823 | command, arg); |
| 824 | return -EINVAL; |
| 825 | } |
| 826 | |
| 827 | return 0; |
| 828 | } |
| 829 | |
| 830 | static int cxusb_dvico_xc3028_tuner_attach(struct dvb_usb_adapter *adap) |
| 831 | { |
| 832 | struct dvb_frontend *fe; |
| 833 | struct xc2028_config cfg = { |
| 834 | .i2c_adap = &adap->dev->i2c_adap, |
| 835 | .i2c_addr = 0x61, |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 836 | }; |
| 837 | static struct xc2028_ctrl ctl = { |
Michael Krufky | ef80bfe | 2008-09-16 02:15:30 -0300 | [diff] [blame] | 838 | .fname = XC2028_DEFAULT_FIRMWARE, |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 839 | .max_len = 64, |
Robert Lowery | d483b73 | 2008-07-30 19:43:11 -0300 | [diff] [blame] | 840 | .demod = XC3028_FE_ZARLINK456, |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 841 | }; |
| 842 | |
Michael Krufky | d7cba04 | 2008-09-12 13:31:45 -0300 | [diff] [blame] | 843 | /* FIXME: generalize & move to common area */ |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 844 | adap->fe_adap[0].fe->callback = dvico_bluebird_xc2028_callback; |
Michael Krufky | d7cba04 | 2008-09-12 13:31:45 -0300 | [diff] [blame] | 845 | |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 846 | fe = dvb_attach(xc2028_attach, adap->fe_adap[0].fe, &cfg); |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 847 | if (fe == NULL || fe->ops.tuner_ops.set_config == NULL) |
| 848 | return -EIO; |
| 849 | |
| 850 | fe->ops.tuner_ops.set_config(fe, &ctl); |
| 851 | |
| 852 | return 0; |
| 853 | } |
| 854 | |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 855 | static int cxusb_mxl5003s_tuner_attach(struct dvb_usb_adapter *adap) |
| 856 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 857 | dvb_attach(mxl5005s_attach, adap->fe_adap[0].fe, |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 858 | &adap->dev->i2c_adap, &aver_a868r_tuner); |
| 859 | return 0; |
| 860 | } |
| 861 | |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 862 | static int cxusb_d680_dmb_tuner_attach(struct dvb_usb_adapter *adap) |
| 863 | { |
| 864 | struct dvb_frontend *fe; |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 865 | fe = dvb_attach(mxl5005s_attach, adap->fe_adap[0].fe, |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 866 | &adap->dev->i2c_adap, &d680_dmb_tuner); |
| 867 | return (fe == NULL) ? -EIO : 0; |
| 868 | } |
| 869 | |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 870 | static int cxusb_mygica_d689_tuner_attach(struct dvb_usb_adapter *adap) |
| 871 | { |
| 872 | struct dvb_frontend *fe; |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 873 | fe = dvb_attach(max2165_attach, adap->fe_adap[0].fe, |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 874 | &adap->dev->i2c_adap, &mygica_d689_max2165_cfg); |
| 875 | return (fe == NULL) ? -EIO : 0; |
| 876 | } |
| 877 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 878 | static int cxusb_cx22702_frontend_attach(struct dvb_usb_adapter *adap) |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 879 | { |
Patrick Boettcher | e2efeab | 2005-09-09 13:02:51 -0700 | [diff] [blame] | 880 | u8 b; |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 881 | if (usb_set_interface(adap->dev->udev, 0, 6) < 0) |
Patrick Boettcher | 8257e8a | 2005-07-07 17:58:15 -0700 | [diff] [blame] | 882 | err("set interface failed"); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 883 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 884 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, &b, 1); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 885 | |
Michael Krufky | 310df36 | 2011-09-17 14:22:59 -0300 | [diff] [blame] | 886 | adap->fe_adap[0].fe = dvb_attach(cx22702_attach, &cxusb_cx22702_config, |
| 887 | &adap->dev->i2c_adap); |
| 888 | if ((adap->fe_adap[0].fe) != NULL) |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 889 | return 0; |
| 890 | |
| 891 | return -EIO; |
| 892 | } |
| 893 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 894 | static int cxusb_lgdt3303_frontend_attach(struct dvb_usb_adapter *adap) |
Michael Krufky | effee03 | 2006-01-09 15:25:47 -0200 | [diff] [blame] | 895 | { |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 896 | if (usb_set_interface(adap->dev->udev, 0, 7) < 0) |
Michael Krufky | effee03 | 2006-01-09 15:25:47 -0200 | [diff] [blame] | 897 | err("set interface failed"); |
| 898 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 899 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); |
Michael Krufky | effee03 | 2006-01-09 15:25:47 -0200 | [diff] [blame] | 900 | |
Michael Krufky | 310df36 | 2011-09-17 14:22:59 -0300 | [diff] [blame] | 901 | adap->fe_adap[0].fe = dvb_attach(lgdt330x_attach, |
| 902 | &cxusb_lgdt3303_config, |
| 903 | &adap->dev->i2c_adap); |
| 904 | if ((adap->fe_adap[0].fe) != NULL) |
Michael Krufky | effee03 | 2006-01-09 15:25:47 -0200 | [diff] [blame] | 905 | return 0; |
| 906 | |
| 907 | return -EIO; |
| 908 | } |
| 909 | |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 910 | static int cxusb_aver_lgdt3303_frontend_attach(struct dvb_usb_adapter *adap) |
| 911 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 912 | adap->fe_adap[0].fe = dvb_attach(lgdt330x_attach, &cxusb_aver_lgdt3303_config, |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 913 | &adap->dev->i2c_adap); |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 914 | if (adap->fe_adap[0].fe != NULL) |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 915 | return 0; |
| 916 | |
| 917 | return -EIO; |
| 918 | } |
| 919 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 920 | static int cxusb_mt352_frontend_attach(struct dvb_usb_adapter *adap) |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 921 | { |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 922 | /* used in both lgz201 and th7579 */ |
| 923 | if (usb_set_interface(adap->dev->udev, 0, 0) < 0) |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 924 | err("set interface failed"); |
| 925 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 926 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 927 | |
Michael Krufky | 310df36 | 2011-09-17 14:22:59 -0300 | [diff] [blame] | 928 | adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_mt352_config, |
| 929 | &adap->dev->i2c_adap); |
| 930 | if ((adap->fe_adap[0].fe) != NULL) |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 931 | return 0; |
| 932 | |
| 933 | return -EIO; |
| 934 | } |
| 935 | |
| 936 | static int cxusb_dee1601_frontend_attach(struct dvb_usb_adapter *adap) |
| 937 | { |
| 938 | if (usb_set_interface(adap->dev->udev, 0, 0) < 0) |
| 939 | err("set interface failed"); |
| 940 | |
| 941 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); |
| 942 | |
Michael Krufky | 310df36 | 2011-09-17 14:22:59 -0300 | [diff] [blame] | 943 | adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_dee1601_config, |
| 944 | &adap->dev->i2c_adap); |
| 945 | if ((adap->fe_adap[0].fe) != NULL) |
| 946 | return 0; |
| 947 | |
| 948 | adap->fe_adap[0].fe = dvb_attach(zl10353_attach, |
| 949 | &cxusb_zl10353_dee1601_config, |
| 950 | &adap->dev->i2c_adap); |
| 951 | if ((adap->fe_adap[0].fe) != NULL) |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 952 | return 0; |
| 953 | |
| 954 | return -EIO; |
| 955 | } |
| 956 | |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 957 | static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap) |
| 958 | { |
| 959 | u8 ircode[4]; |
| 960 | int i; |
| 961 | struct i2c_msg msg = { .addr = 0x6b, .flags = I2C_M_RD, |
| 962 | .buf = ircode, .len = 4 }; |
| 963 | |
| 964 | if (usb_set_interface(adap->dev->udev, 0, 1) < 0) |
| 965 | err("set interface failed"); |
| 966 | |
| 967 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); |
| 968 | |
| 969 | /* reset the tuner and demodulator */ |
| 970 | cxusb_bluebird_gpio_rw(adap->dev, 0x04, 0); |
| 971 | cxusb_bluebird_gpio_pulse(adap->dev, 0x01, 1); |
| 972 | cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1); |
| 973 | |
Michael Krufky | 310df36 | 2011-09-17 14:22:59 -0300 | [diff] [blame] | 974 | adap->fe_adap[0].fe = |
| 975 | dvb_attach(zl10353_attach, |
| 976 | &cxusb_zl10353_xc3028_config_no_i2c_gate, |
| 977 | &adap->dev->i2c_adap); |
| 978 | if ((adap->fe_adap[0].fe) == NULL) |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 979 | return -EIO; |
| 980 | |
| 981 | /* try to determine if there is no IR decoder on the I2C bus */ |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 982 | for (i = 0; adap->dev->props.rc.legacy.rc_map_table != NULL && i < 5; i++) { |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 983 | msleep(20); |
| 984 | if (cxusb_i2c_xfer(&adap->dev->i2c_adap, &msg, 1) != 1) |
| 985 | goto no_IR; |
| 986 | if (ircode[0] == 0 && ircode[1] == 0) |
| 987 | continue; |
| 988 | if (ircode[2] + ircode[3] != 0xff) { |
| 989 | no_IR: |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 990 | adap->dev->props.rc.legacy.rc_map_table = NULL; |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 991 | info("No IR receiver detected on this device."); |
| 992 | break; |
| 993 | } |
| 994 | } |
| 995 | |
| 996 | return 0; |
| 997 | } |
| 998 | |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 999 | static struct dibx000_agc_config dib7070_agc_config = { |
| 1000 | .band_caps = BAND_UHF | BAND_VHF | BAND_LBAND | BAND_SBAND, |
| 1001 | |
| 1002 | /* |
| 1003 | * P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=5, |
| 1004 | * P_agc_inv_pwm1=0, P_agc_inv_pwm2=0, P_agc_inh_dc_rv_est=0, |
| 1005 | * P_agc_time_est=3, P_agc_freeze=0, P_agc_nb_est=5, P_agc_write=0 |
| 1006 | */ |
| 1007 | .setup = (0 << 15) | (0 << 14) | (5 << 11) | (0 << 10) | (0 << 9) | |
| 1008 | (0 << 8) | (3 << 5) | (0 << 4) | (5 << 1) | (0 << 0), |
| 1009 | .inv_gain = 600, |
| 1010 | .time_stabiliz = 10, |
| 1011 | .alpha_level = 0, |
| 1012 | .thlock = 118, |
| 1013 | .wbd_inv = 0, |
| 1014 | .wbd_ref = 3530, |
| 1015 | .wbd_sel = 1, |
| 1016 | .wbd_alpha = 5, |
| 1017 | .agc1_max = 65535, |
| 1018 | .agc1_min = 0, |
| 1019 | .agc2_max = 65535, |
| 1020 | .agc2_min = 0, |
| 1021 | .agc1_pt1 = 0, |
| 1022 | .agc1_pt2 = 40, |
| 1023 | .agc1_pt3 = 183, |
| 1024 | .agc1_slope1 = 206, |
| 1025 | .agc1_slope2 = 255, |
| 1026 | .agc2_pt1 = 72, |
| 1027 | .agc2_pt2 = 152, |
| 1028 | .agc2_slope1 = 88, |
| 1029 | .agc2_slope2 = 90, |
| 1030 | .alpha_mant = 17, |
| 1031 | .alpha_exp = 27, |
| 1032 | .beta_mant = 23, |
| 1033 | .beta_exp = 51, |
| 1034 | .perform_agc_softsplit = 0, |
| 1035 | }; |
| 1036 | |
| 1037 | static struct dibx000_bandwidth_config dib7070_bw_config_12_mhz = { |
| 1038 | .internal = 60000, |
| 1039 | .sampling = 15000, |
| 1040 | .pll_prediv = 1, |
| 1041 | .pll_ratio = 20, |
| 1042 | .pll_range = 3, |
| 1043 | .pll_reset = 1, |
| 1044 | .pll_bypass = 0, |
| 1045 | .enable_refdiv = 0, |
| 1046 | .bypclk_div = 0, |
| 1047 | .IO_CLK_en_core = 1, |
| 1048 | .ADClkSrc = 1, |
| 1049 | .modulo = 2, |
| 1050 | /* refsel, sel, freq_15k */ |
| 1051 | .sad_cfg = (3 << 14) | (1 << 12) | (524 << 0), |
| 1052 | .ifreq = (0 << 25) | 0, |
| 1053 | .timf = 20452225, |
| 1054 | .xtal_hz = 12000000, |
| 1055 | }; |
| 1056 | |
| 1057 | static struct dib7000p_config cxusb_dualdig4_rev2_config = { |
| 1058 | .output_mode = OUTMODE_MPEG2_PAR_GATED_CLK, |
| 1059 | .output_mpeg2_in_188_bytes = 1, |
| 1060 | |
| 1061 | .agc_config_count = 1, |
| 1062 | .agc = &dib7070_agc_config, |
| 1063 | .bw = &dib7070_bw_config_12_mhz, |
| 1064 | .tuner_is_baseband = 1, |
| 1065 | .spur_protect = 1, |
| 1066 | |
| 1067 | .gpio_dir = 0xfcef, |
| 1068 | .gpio_val = 0x0110, |
| 1069 | |
| 1070 | .gpio_pwm_pos = DIB7000P_GPIO_DEFAULT_PWM_POS, |
| 1071 | |
| 1072 | .hostbus_diversity = 1, |
| 1073 | }; |
| 1074 | |
Mauro Carvalho Chehab | 8abe4a0 | 2014-05-29 09:20:15 -0300 | [diff] [blame] | 1075 | struct dib0700_adapter_state { |
| 1076 | int (*set_param_save)(struct dvb_frontend *); |
| 1077 | struct dib7000p_ops dib7000p_ops; |
| 1078 | }; |
| 1079 | |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 1080 | static int cxusb_dualdig4_rev2_frontend_attach(struct dvb_usb_adapter *adap) |
| 1081 | { |
Mauro Carvalho Chehab | 8abe4a0 | 2014-05-29 09:20:15 -0300 | [diff] [blame] | 1082 | struct dib0700_adapter_state *state = adap->priv; |
| 1083 | |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 1084 | if (usb_set_interface(adap->dev->udev, 0, 1) < 0) |
| 1085 | err("set interface failed"); |
| 1086 | |
| 1087 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); |
| 1088 | |
| 1089 | cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1); |
| 1090 | |
Mauro Carvalho Chehab | 8abe4a0 | 2014-05-29 09:20:15 -0300 | [diff] [blame] | 1091 | if (!dvb_attach(dib7000p_attach, &state->dib7000p_ops)) |
| 1092 | return -ENODEV; |
| 1093 | |
| 1094 | if (state->dib7000p_ops.i2c_enumeration(&adap->dev->i2c_adap, 1, 18, |
| 1095 | &cxusb_dualdig4_rev2_config) < 0) { |
Prarit Bhargava | a49ba16 | 2010-05-12 19:30:02 -0300 | [diff] [blame] | 1096 | printk(KERN_WARNING "Unable to enumerate dib7000p\n"); |
Randy Dunlap | 30d81bb | 2010-02-08 20:30:44 -0300 | [diff] [blame] | 1097 | return -ENODEV; |
Prarit Bhargava | a49ba16 | 2010-05-12 19:30:02 -0300 | [diff] [blame] | 1098 | } |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 1099 | |
Mauro Carvalho Chehab | 8abe4a0 | 2014-05-29 09:20:15 -0300 | [diff] [blame] | 1100 | adap->fe_adap[0].fe = state->dib7000p_ops.init(&adap->dev->i2c_adap, 0x80, |
| 1101 | &cxusb_dualdig4_rev2_config); |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1102 | if (adap->fe_adap[0].fe == NULL) |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 1103 | return -EIO; |
| 1104 | |
| 1105 | return 0; |
| 1106 | } |
| 1107 | |
| 1108 | static int dib7070_tuner_reset(struct dvb_frontend *fe, int onoff) |
| 1109 | { |
Mauro Carvalho Chehab | 8abe4a0 | 2014-05-29 09:20:15 -0300 | [diff] [blame] | 1110 | struct dvb_usb_adapter *adap = fe->dvb->priv; |
| 1111 | struct dib0700_adapter_state *state = adap->priv; |
| 1112 | |
| 1113 | return state->dib7000p_ops.set_gpio(fe, 8, 0, !onoff); |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 1114 | } |
| 1115 | |
| 1116 | static int dib7070_tuner_sleep(struct dvb_frontend *fe, int onoff) |
| 1117 | { |
| 1118 | return 0; |
| 1119 | } |
| 1120 | |
| 1121 | static struct dib0070_config dib7070p_dib0070_config = { |
| 1122 | .i2c_address = DEFAULT_DIB0070_I2C_ADDRESS, |
| 1123 | .reset = dib7070_tuner_reset, |
| 1124 | .sleep = dib7070_tuner_sleep, |
| 1125 | .clock_khz = 12000, |
| 1126 | }; |
| 1127 | |
Mauro Carvalho Chehab | 14d24d1 | 2011-12-24 12:24:33 -0300 | [diff] [blame] | 1128 | static int dib7070_set_param_override(struct dvb_frontend *fe) |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 1129 | { |
Mauro Carvalho Chehab | afd2b38 | 2011-12-24 10:17:30 -0300 | [diff] [blame] | 1130 | struct dtv_frontend_properties *p = &fe->dtv_property_cache; |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 1131 | struct dvb_usb_adapter *adap = fe->dvb->priv; |
| 1132 | struct dib0700_adapter_state *state = adap->priv; |
| 1133 | |
| 1134 | u16 offset; |
Mauro Carvalho Chehab | afd2b38 | 2011-12-24 10:17:30 -0300 | [diff] [blame] | 1135 | u8 band = BAND_OF_FREQUENCY(p->frequency/1000); |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 1136 | switch (band) { |
Michael Krufky | a2dc86b | 2008-08-09 13:06:26 -0300 | [diff] [blame] | 1137 | case BAND_VHF: offset = 950; break; |
| 1138 | default: |
| 1139 | case BAND_UHF: offset = 550; break; |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 1140 | } |
| 1141 | |
Mauro Carvalho Chehab | 8abe4a0 | 2014-05-29 09:20:15 -0300 | [diff] [blame] | 1142 | state->dib7000p_ops.set_wbd_ref(fe, offset + dib0070_wbd_offset(fe)); |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 1143 | |
Mauro Carvalho Chehab | 14d24d1 | 2011-12-24 12:24:33 -0300 | [diff] [blame] | 1144 | return state->set_param_save(fe); |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 1145 | } |
| 1146 | |
| 1147 | static int cxusb_dualdig4_rev2_tuner_attach(struct dvb_usb_adapter *adap) |
| 1148 | { |
| 1149 | struct dib0700_adapter_state *st = adap->priv; |
Mauro Carvalho Chehab | 8abe4a0 | 2014-05-29 09:20:15 -0300 | [diff] [blame] | 1150 | struct i2c_adapter *tun_i2c; |
| 1151 | |
| 1152 | /* |
| 1153 | * No need to call dvb7000p_attach here, as it was called |
| 1154 | * already, as frontend_attach method is called first, and |
| 1155 | * tuner_attach is only called on sucess. |
| 1156 | */ |
| 1157 | tun_i2c = st->dib7000p_ops.get_i2c_master(adap->fe_adap[0].fe, |
Michael Krufky | a2dc86b | 2008-08-09 13:06:26 -0300 | [diff] [blame] | 1158 | DIBX000_I2C_INTERFACE_TUNER, 1); |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 1159 | |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1160 | if (dvb_attach(dib0070_attach, adap->fe_adap[0].fe, tun_i2c, |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 1161 | &dib7070p_dib0070_config) == NULL) |
| 1162 | return -ENODEV; |
| 1163 | |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1164 | st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params; |
| 1165 | adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7070_set_param_override; |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 1166 | return 0; |
| 1167 | } |
| 1168 | |
Chris Pascoe | 5ccaf90 | 2007-11-20 01:53:31 -0300 | [diff] [blame] | 1169 | static int cxusb_nano2_frontend_attach(struct dvb_usb_adapter *adap) |
| 1170 | { |
| 1171 | if (usb_set_interface(adap->dev->udev, 0, 1) < 0) |
| 1172 | err("set interface failed"); |
| 1173 | |
| 1174 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); |
| 1175 | |
| 1176 | /* reset the tuner and demodulator */ |
| 1177 | cxusb_bluebird_gpio_rw(adap->dev, 0x04, 0); |
| 1178 | cxusb_bluebird_gpio_pulse(adap->dev, 0x01, 1); |
| 1179 | cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1); |
| 1180 | |
Michael Krufky | 310df36 | 2011-09-17 14:22:59 -0300 | [diff] [blame] | 1181 | adap->fe_adap[0].fe = dvb_attach(zl10353_attach, |
| 1182 | &cxusb_zl10353_xc3028_config, |
| 1183 | &adap->dev->i2c_adap); |
| 1184 | if ((adap->fe_adap[0].fe) != NULL) |
Chris Pascoe | 5ccaf90 | 2007-11-20 01:53:31 -0300 | [diff] [blame] | 1185 | return 0; |
| 1186 | |
Michael Krufky | 310df36 | 2011-09-17 14:22:59 -0300 | [diff] [blame] | 1187 | adap->fe_adap[0].fe = dvb_attach(mt352_attach, |
| 1188 | &cxusb_mt352_xc3028_config, |
| 1189 | &adap->dev->i2c_adap); |
| 1190 | if ((adap->fe_adap[0].fe) != NULL) |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 1191 | return 0; |
| 1192 | |
Chris Pascoe | 5ccaf90 | 2007-11-20 01:53:31 -0300 | [diff] [blame] | 1193 | return -EIO; |
| 1194 | } |
| 1195 | |
David T.L. Wong | 6bf1a99 | 2009-08-05 13:07:10 -0300 | [diff] [blame] | 1196 | static struct lgs8gxx_config d680_lgs8gl5_cfg = { |
| 1197 | .prod = LGS8GXX_PROD_LGS8GL5, |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 1198 | .demod_address = 0x19, |
David T.L. Wong | 6bf1a99 | 2009-08-05 13:07:10 -0300 | [diff] [blame] | 1199 | .serial_ts = 0, |
| 1200 | .ts_clk_pol = 0, |
| 1201 | .ts_clk_gated = 1, |
| 1202 | .if_clk_freq = 30400, /* 30.4 MHz */ |
| 1203 | .if_freq = 5725, /* 5.725 MHz */ |
| 1204 | .if_neg_center = 0, |
| 1205 | .ext_adc = 0, |
| 1206 | .adc_signed = 0, |
| 1207 | .if_neg_edge = 0, |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 1208 | }; |
| 1209 | |
| 1210 | static int cxusb_d680_dmb_frontend_attach(struct dvb_usb_adapter *adap) |
| 1211 | { |
| 1212 | struct dvb_usb_device *d = adap->dev; |
| 1213 | int n; |
| 1214 | |
| 1215 | /* Select required USB configuration */ |
| 1216 | if (usb_set_interface(d->udev, 0, 0) < 0) |
| 1217 | err("set interface failed"); |
| 1218 | |
| 1219 | /* Unblock all USB pipes */ |
| 1220 | usb_clear_halt(d->udev, |
| 1221 | usb_sndbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); |
| 1222 | usb_clear_halt(d->udev, |
| 1223 | usb_rcvbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); |
| 1224 | usb_clear_halt(d->udev, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1225 | usb_rcvbulkpipe(d->udev, d->props.adapter[0].fe[0].stream.endpoint)); |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 1226 | |
| 1227 | /* Drain USB pipes to avoid hang after reboot */ |
| 1228 | for (n = 0; n < 5; n++) { |
| 1229 | cxusb_d680_dmb_drain_message(d); |
| 1230 | cxusb_d680_dmb_drain_video(d); |
| 1231 | msleep(200); |
| 1232 | } |
| 1233 | |
| 1234 | /* Reset the tuner */ |
| 1235 | if (cxusb_d680_dmb_gpio_tuner(d, 0x07, 0) < 0) { |
| 1236 | err("clear tuner gpio failed"); |
| 1237 | return -EIO; |
| 1238 | } |
| 1239 | msleep(100); |
| 1240 | if (cxusb_d680_dmb_gpio_tuner(d, 0x07, 1) < 0) { |
| 1241 | err("set tuner gpio failed"); |
| 1242 | return -EIO; |
| 1243 | } |
| 1244 | msleep(100); |
| 1245 | |
| 1246 | /* Attach frontend */ |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1247 | adap->fe_adap[0].fe = dvb_attach(lgs8gxx_attach, &d680_lgs8gl5_cfg, &d->i2c_adap); |
| 1248 | if (adap->fe_adap[0].fe == NULL) |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 1249 | return -EIO; |
| 1250 | |
| 1251 | return 0; |
| 1252 | } |
| 1253 | |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 1254 | static struct atbm8830_config mygica_d689_atbm8830_cfg = { |
| 1255 | .prod = ATBM8830_PROD_8830, |
| 1256 | .demod_address = 0x40, |
| 1257 | .serial_ts = 0, |
| 1258 | .ts_sampling_edge = 1, |
| 1259 | .ts_clk_gated = 0, |
| 1260 | .osc_clk_freq = 30400, /* in kHz */ |
| 1261 | .if_freq = 0, /* zero IF */ |
| 1262 | .zif_swap_iq = 1, |
David Wong | c245c75 | 2009-11-28 08:36:31 -0300 | [diff] [blame] | 1263 | .agc_min = 0x2E, |
| 1264 | .agc_max = 0x90, |
| 1265 | .agc_hold_loop = 0, |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 1266 | }; |
| 1267 | |
| 1268 | static int cxusb_mygica_d689_frontend_attach(struct dvb_usb_adapter *adap) |
| 1269 | { |
| 1270 | struct dvb_usb_device *d = adap->dev; |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 1271 | |
| 1272 | /* Select required USB configuration */ |
| 1273 | if (usb_set_interface(d->udev, 0, 0) < 0) |
| 1274 | err("set interface failed"); |
| 1275 | |
| 1276 | /* Unblock all USB pipes */ |
| 1277 | usb_clear_halt(d->udev, |
| 1278 | usb_sndbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); |
| 1279 | usb_clear_halt(d->udev, |
| 1280 | usb_rcvbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); |
| 1281 | usb_clear_halt(d->udev, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1282 | usb_rcvbulkpipe(d->udev, d->props.adapter[0].fe[0].stream.endpoint)); |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 1283 | |
| 1284 | |
| 1285 | /* Reset the tuner */ |
| 1286 | if (cxusb_d680_dmb_gpio_tuner(d, 0x07, 0) < 0) { |
| 1287 | err("clear tuner gpio failed"); |
| 1288 | return -EIO; |
| 1289 | } |
| 1290 | msleep(100); |
| 1291 | if (cxusb_d680_dmb_gpio_tuner(d, 0x07, 1) < 0) { |
| 1292 | err("set tuner gpio failed"); |
| 1293 | return -EIO; |
| 1294 | } |
| 1295 | msleep(100); |
| 1296 | |
| 1297 | /* Attach frontend */ |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1298 | adap->fe_adap[0].fe = dvb_attach(atbm8830_attach, &mygica_d689_atbm8830_cfg, |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 1299 | &d->i2c_adap); |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1300 | if (adap->fe_adap[0].fe == NULL) |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 1301 | return -EIO; |
| 1302 | |
| 1303 | return 0; |
| 1304 | } |
| 1305 | |
CrazyCat | a0f629b | 2014-11-14 18:24:28 -0300 | [diff] [blame] | 1306 | static int cxusb_mygica_t230_frontend_attach(struct dvb_usb_adapter *adap) |
| 1307 | { |
| 1308 | struct dvb_usb_device *d = adap->dev; |
| 1309 | struct cxusb_state *st = d->priv; |
| 1310 | struct i2c_adapter *adapter; |
| 1311 | struct i2c_client *client_demod; |
| 1312 | struct i2c_client *client_tuner; |
| 1313 | struct i2c_board_info info; |
| 1314 | struct si2168_config si2168_config; |
| 1315 | struct si2157_config si2157_config; |
| 1316 | |
| 1317 | /* Select required USB configuration */ |
| 1318 | if (usb_set_interface(d->udev, 0, 0) < 0) |
| 1319 | err("set interface failed"); |
| 1320 | |
| 1321 | /* Unblock all USB pipes */ |
| 1322 | usb_clear_halt(d->udev, |
| 1323 | usb_sndbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); |
| 1324 | usb_clear_halt(d->udev, |
| 1325 | usb_rcvbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint)); |
| 1326 | usb_clear_halt(d->udev, |
| 1327 | usb_rcvbulkpipe(d->udev, d->props.adapter[0].fe[0].stream.endpoint)); |
| 1328 | |
| 1329 | /* attach frontend */ |
| 1330 | si2168_config.i2c_adapter = &adapter; |
| 1331 | si2168_config.fe = &adap->fe_adap[0].fe; |
| 1332 | si2168_config.ts_mode = SI2168_TS_PARALLEL; |
| 1333 | si2168_config.ts_clock_inv = 1; |
| 1334 | memset(&info, 0, sizeof(struct i2c_board_info)); |
| 1335 | strlcpy(info.type, "si2168", I2C_NAME_SIZE); |
| 1336 | info.addr = 0x64; |
| 1337 | info.platform_data = &si2168_config; |
| 1338 | request_module(info.type); |
| 1339 | client_demod = i2c_new_device(&d->i2c_adap, &info); |
| 1340 | if (client_demod == NULL || client_demod->dev.driver == NULL) |
| 1341 | return -ENODEV; |
| 1342 | |
| 1343 | if (!try_module_get(client_demod->dev.driver->owner)) { |
| 1344 | i2c_unregister_device(client_demod); |
| 1345 | return -ENODEV; |
| 1346 | } |
| 1347 | |
| 1348 | st->i2c_client_demod = client_demod; |
| 1349 | |
| 1350 | /* attach tuner */ |
| 1351 | memset(&si2157_config, 0, sizeof(si2157_config)); |
| 1352 | si2157_config.fe = adap->fe_adap[0].fe; |
| 1353 | memset(&info, 0, sizeof(struct i2c_board_info)); |
| 1354 | strlcpy(info.type, "si2157", I2C_NAME_SIZE); |
| 1355 | info.addr = 0x60; |
| 1356 | info.platform_data = &si2157_config; |
| 1357 | request_module(info.type); |
| 1358 | client_tuner = i2c_new_device(adapter, &info); |
| 1359 | if (client_tuner == NULL || client_tuner->dev.driver == NULL) { |
| 1360 | module_put(client_demod->dev.driver->owner); |
| 1361 | i2c_unregister_device(client_demod); |
| 1362 | return -ENODEV; |
| 1363 | } |
| 1364 | if (!try_module_get(client_tuner->dev.driver->owner)) { |
| 1365 | i2c_unregister_device(client_tuner); |
| 1366 | module_put(client_demod->dev.driver->owner); |
| 1367 | i2c_unregister_device(client_demod); |
| 1368 | return -ENODEV; |
| 1369 | } |
| 1370 | |
| 1371 | st->i2c_client_tuner = client_tuner; |
| 1372 | |
| 1373 | return 0; |
| 1374 | } |
| 1375 | |
Patrick Boettcher | f537378 | 2006-01-09 18:21:38 -0200 | [diff] [blame] | 1376 | /* |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 1377 | * DViCO has shipped two devices with the same USB ID, but only one of them |
| 1378 | * needs a firmware download. Check the device class details to see if they |
| 1379 | * have non-default values to decide whether the device is actually cold or |
| 1380 | * not, and forget a match if it turns out we selected the wrong device. |
| 1381 | */ |
| 1382 | static int bluebird_fx2_identify_state(struct usb_device *udev, |
| 1383 | struct dvb_usb_device_properties *props, |
| 1384 | struct dvb_usb_device_description **desc, |
| 1385 | int *cold) |
| 1386 | { |
| 1387 | int wascold = *cold; |
| 1388 | |
| 1389 | *cold = udev->descriptor.bDeviceClass == 0xff && |
| 1390 | udev->descriptor.bDeviceSubClass == 0xff && |
| 1391 | udev->descriptor.bDeviceProtocol == 0xff; |
| 1392 | |
| 1393 | if (*cold && !wascold) |
| 1394 | *desc = NULL; |
| 1395 | |
| 1396 | return 0; |
| 1397 | } |
| 1398 | |
| 1399 | /* |
Patrick Boettcher | f537378 | 2006-01-09 18:21:38 -0200 | [diff] [blame] | 1400 | * DViCO bluebird firmware needs the "warm" product ID to be patched into the |
| 1401 | * firmware file before download. |
| 1402 | */ |
| 1403 | |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 1404 | static const int dvico_firmware_id_offsets[] = { 6638, 3204 }; |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 1405 | static int bluebird_patch_dvico_firmware_download(struct usb_device *udev, |
| 1406 | const struct firmware *fw) |
Patrick Boettcher | f537378 | 2006-01-09 18:21:38 -0200 | [diff] [blame] | 1407 | { |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 1408 | int pos; |
Patrick Boettcher | f537378 | 2006-01-09 18:21:38 -0200 | [diff] [blame] | 1409 | |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 1410 | for (pos = 0; pos < ARRAY_SIZE(dvico_firmware_id_offsets); pos++) { |
| 1411 | int idoff = dvico_firmware_id_offsets[pos]; |
Patrick Boettcher | f537378 | 2006-01-09 18:21:38 -0200 | [diff] [blame] | 1412 | |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 1413 | if (fw->size < idoff + 4) |
| 1414 | continue; |
Patrick Boettcher | f537378 | 2006-01-09 18:21:38 -0200 | [diff] [blame] | 1415 | |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 1416 | if (fw->data[idoff] == (USB_VID_DVICO & 0xff) && |
| 1417 | fw->data[idoff + 1] == USB_VID_DVICO >> 8) { |
David Woodhouse | e62f89f | 2008-05-24 00:12:42 +0100 | [diff] [blame] | 1418 | struct firmware new_fw; |
| 1419 | u8 *new_fw_data = vmalloc(fw->size); |
| 1420 | int ret; |
| 1421 | |
| 1422 | if (!new_fw_data) |
| 1423 | return -ENOMEM; |
| 1424 | |
| 1425 | memcpy(new_fw_data, fw->data, fw->size); |
| 1426 | new_fw.size = fw->size; |
| 1427 | new_fw.data = new_fw_data; |
| 1428 | |
| 1429 | new_fw_data[idoff + 2] = |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 1430 | le16_to_cpu(udev->descriptor.idProduct) + 1; |
David Woodhouse | e62f89f | 2008-05-24 00:12:42 +0100 | [diff] [blame] | 1431 | new_fw_data[idoff + 3] = |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 1432 | le16_to_cpu(udev->descriptor.idProduct) >> 8; |
| 1433 | |
David Woodhouse | e62f89f | 2008-05-24 00:12:42 +0100 | [diff] [blame] | 1434 | ret = usb_cypress_load_firmware(udev, &new_fw, |
| 1435 | CYPRESS_FX2); |
| 1436 | vfree(new_fw_data); |
| 1437 | return ret; |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 1438 | } |
Patrick Boettcher | f537378 | 2006-01-09 18:21:38 -0200 | [diff] [blame] | 1439 | } |
| 1440 | |
| 1441 | return -EINVAL; |
| 1442 | } |
| 1443 | |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 1444 | /* DVB USB Driver stuff */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1445 | static struct dvb_usb_device_properties cxusb_medion_properties; |
| 1446 | static struct dvb_usb_device_properties cxusb_bluebird_lgh064f_properties; |
| 1447 | static struct dvb_usb_device_properties cxusb_bluebird_dee1601_properties; |
| 1448 | static struct dvb_usb_device_properties cxusb_bluebird_lgz201_properties; |
| 1449 | static struct dvb_usb_device_properties cxusb_bluebird_dtt7579_properties; |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 1450 | static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties; |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 1451 | static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_rev2_properties; |
Chris Pascoe | 5ccaf90 | 2007-11-20 01:53:31 -0300 | [diff] [blame] | 1452 | static struct dvb_usb_device_properties cxusb_bluebird_nano2_properties; |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 1453 | static struct dvb_usb_device_properties cxusb_bluebird_nano2_needsfirmware_properties; |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 1454 | static struct dvb_usb_device_properties cxusb_aver_a868r_properties; |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 1455 | static struct dvb_usb_device_properties cxusb_d680_dmb_properties; |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 1456 | static struct dvb_usb_device_properties cxusb_mygica_d689_properties; |
CrazyCat | a0f629b | 2014-11-14 18:24:28 -0300 | [diff] [blame] | 1457 | static struct dvb_usb_device_properties cxusb_mygica_t230_properties; |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 1458 | |
| 1459 | static int cxusb_probe(struct usb_interface *intf, |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 1460 | const struct usb_device_id *id) |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 1461 | { |
Janne Grunau | 78e9200 | 2008-04-09 19:13:13 -0300 | [diff] [blame] | 1462 | if (0 == dvb_usb_device_init(intf, &cxusb_medion_properties, |
| 1463 | THIS_MODULE, NULL, adapter_nr) || |
| 1464 | 0 == dvb_usb_device_init(intf, &cxusb_bluebird_lgh064f_properties, |
| 1465 | THIS_MODULE, NULL, adapter_nr) || |
| 1466 | 0 == dvb_usb_device_init(intf, &cxusb_bluebird_dee1601_properties, |
| 1467 | THIS_MODULE, NULL, adapter_nr) || |
| 1468 | 0 == dvb_usb_device_init(intf, &cxusb_bluebird_lgz201_properties, |
| 1469 | THIS_MODULE, NULL, adapter_nr) || |
| 1470 | 0 == dvb_usb_device_init(intf, &cxusb_bluebird_dtt7579_properties, |
| 1471 | THIS_MODULE, NULL, adapter_nr) || |
| 1472 | 0 == dvb_usb_device_init(intf, &cxusb_bluebird_dualdig4_properties, |
| 1473 | THIS_MODULE, NULL, adapter_nr) || |
| 1474 | 0 == dvb_usb_device_init(intf, &cxusb_bluebird_nano2_properties, |
| 1475 | THIS_MODULE, NULL, adapter_nr) || |
| 1476 | 0 == dvb_usb_device_init(intf, |
| 1477 | &cxusb_bluebird_nano2_needsfirmware_properties, |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 1478 | THIS_MODULE, NULL, adapter_nr) || |
| 1479 | 0 == dvb_usb_device_init(intf, &cxusb_aver_a868r_properties, |
| 1480 | THIS_MODULE, NULL, adapter_nr) || |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 1481 | 0 == dvb_usb_device_init(intf, |
| 1482 | &cxusb_bluebird_dualdig4_rev2_properties, |
| 1483 | THIS_MODULE, NULL, adapter_nr) || |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 1484 | 0 == dvb_usb_device_init(intf, &cxusb_d680_dmb_properties, |
| 1485 | THIS_MODULE, NULL, adapter_nr) || |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 1486 | 0 == dvb_usb_device_init(intf, &cxusb_mygica_d689_properties, |
| 1487 | THIS_MODULE, NULL, adapter_nr) || |
CrazyCat | a0f629b | 2014-11-14 18:24:28 -0300 | [diff] [blame] | 1488 | 0 == dvb_usb_device_init(intf, &cxusb_mygica_t230_properties, |
| 1489 | THIS_MODULE, NULL, adapter_nr) || |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 1490 | 0) |
Michael Krufky | effee03 | 2006-01-09 15:25:47 -0200 | [diff] [blame] | 1491 | return 0; |
Michael Krufky | effee03 | 2006-01-09 15:25:47 -0200 | [diff] [blame] | 1492 | |
| 1493 | return -EINVAL; |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 1494 | } |
| 1495 | |
Olli Salonen | 26c42b0 | 2014-07-13 10:52:22 -0300 | [diff] [blame] | 1496 | static void cxusb_disconnect(struct usb_interface *intf) |
| 1497 | { |
| 1498 | struct dvb_usb_device *d = usb_get_intfdata(intf); |
| 1499 | struct cxusb_state *st = d->priv; |
| 1500 | struct i2c_client *client; |
| 1501 | |
| 1502 | /* remove I2C client for tuner */ |
| 1503 | client = st->i2c_client_tuner; |
| 1504 | if (client) { |
| 1505 | module_put(client->dev.driver->owner); |
| 1506 | i2c_unregister_device(client); |
| 1507 | } |
| 1508 | |
| 1509 | /* remove I2C client for demodulator */ |
| 1510 | client = st->i2c_client_demod; |
| 1511 | if (client) { |
| 1512 | module_put(client->dev.driver->owner); |
| 1513 | i2c_unregister_device(client); |
| 1514 | } |
| 1515 | |
| 1516 | dvb_usb_device_exit(intf); |
| 1517 | } |
| 1518 | |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 1519 | static struct usb_device_id cxusb_table [] = { |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 1520 | { USB_DEVICE(USB_VID_MEDION, USB_PID_MEDION_MD95700) }, |
| 1521 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_LG064F_COLD) }, |
| 1522 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_LG064F_WARM) }, |
| 1523 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_1_COLD) }, |
| 1524 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_1_WARM) }, |
| 1525 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_LGZ201_COLD) }, |
| 1526 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_LGZ201_WARM) }, |
| 1527 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_TH7579_COLD) }, |
| 1528 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_TH7579_WARM) }, |
| 1529 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DIGITALNOW_BLUEBIRD_DUAL_1_COLD) }, |
| 1530 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DIGITALNOW_BLUEBIRD_DUAL_1_WARM) }, |
| 1531 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_2_COLD) }, |
| 1532 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_2_WARM) }, |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 1533 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_4) }, |
Chris Pascoe | 5ccaf90 | 2007-11-20 01:53:31 -0300 | [diff] [blame] | 1534 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DVB_T_NANO_2) }, |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 1535 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DVB_T_NANO_2_NFW_WARM) }, |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 1536 | { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_VOLAR_A868R) }, |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 1537 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_4_REV_2) }, |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 1538 | { USB_DEVICE(USB_VID_CONEXANT, USB_PID_CONEXANT_D680_DMB) }, |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 1539 | { USB_DEVICE(USB_VID_CONEXANT, USB_PID_MYGICA_D689) }, |
CrazyCat | a0f629b | 2014-11-14 18:24:28 -0300 | [diff] [blame] | 1540 | { USB_DEVICE(USB_VID_CONEXANT, USB_PID_MYGICA_T230) }, |
Michael Krufky | f35db23 | 2006-12-05 14:53:39 -0300 | [diff] [blame] | 1541 | {} /* Terminating entry */ |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 1542 | }; |
| 1543 | MODULE_DEVICE_TABLE (usb, cxusb_table); |
| 1544 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1545 | static struct dvb_usb_device_properties cxusb_medion_properties = { |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 1546 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
| 1547 | |
| 1548 | .usb_ctrl = CYPRESS_FX2, |
| 1549 | |
| 1550 | .size_of_priv = sizeof(struct cxusb_state), |
| 1551 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1552 | .num_adapters = 1, |
| 1553 | .adapter = { |
| 1554 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1555 | .num_frontends = 1, |
| 1556 | .fe = {{ |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 1557 | .streaming_ctrl = cxusb_streaming_ctrl, |
| 1558 | .frontend_attach = cxusb_cx22702_frontend_attach, |
| 1559 | .tuner_attach = cxusb_fmd1216me_tuner_attach, |
| 1560 | /* parameter for the MPEG2-data transfer */ |
| 1561 | .stream = { |
| 1562 | .type = USB_BULK, |
| 1563 | .count = 5, |
| 1564 | .endpoint = 0x02, |
| 1565 | .u = { |
| 1566 | .bulk = { |
| 1567 | .buffersize = 8192, |
| 1568 | } |
| 1569 | } |
| 1570 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1571 | }}, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1572 | }, |
| 1573 | }, |
| 1574 | .power_ctrl = cxusb_power_ctrl, |
| 1575 | |
| 1576 | .i2c_algo = &cxusb_i2c_algo, |
| 1577 | |
| 1578 | .generic_bulk_ctrl_endpoint = 0x01, |
| 1579 | |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 1580 | .num_device_descs = 1, |
| 1581 | .devices = { |
| 1582 | { "Medion MD95700 (MDUSBTV-HYBRID)", |
| 1583 | { NULL }, |
| 1584 | { &cxusb_table[0], NULL }, |
| 1585 | }, |
| 1586 | } |
| 1587 | }; |
| 1588 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1589 | static struct dvb_usb_device_properties cxusb_bluebird_lgh064f_properties = { |
Michael Krufky | effee03 | 2006-01-09 15:25:47 -0200 | [diff] [blame] | 1590 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
| 1591 | |
Patrick Boettcher | f537378 | 2006-01-09 18:21:38 -0200 | [diff] [blame] | 1592 | .usb_ctrl = DEVICE_SPECIFIC, |
| 1593 | .firmware = "dvb-usb-bluebird-01.fw", |
| 1594 | .download_firmware = bluebird_patch_dvico_firmware_download, |
Michael Krufky | 37bdfa0 | 2006-01-09 15:25:47 -0200 | [diff] [blame] | 1595 | /* use usb alt setting 0 for EP4 transfer (dvb-t), |
| 1596 | use usb alt setting 7 for EP2 transfer (atsc) */ |
Michael Krufky | effee03 | 2006-01-09 15:25:47 -0200 | [diff] [blame] | 1597 | |
| 1598 | .size_of_priv = sizeof(struct cxusb_state), |
| 1599 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1600 | .num_adapters = 1, |
| 1601 | .adapter = { |
| 1602 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1603 | .num_frontends = 1, |
| 1604 | .fe = {{ |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 1605 | .streaming_ctrl = cxusb_streaming_ctrl, |
| 1606 | .frontend_attach = cxusb_lgdt3303_frontend_attach, |
Michael Krufky | f71a56c | 2006-10-13 21:55:57 -0300 | [diff] [blame] | 1607 | .tuner_attach = cxusb_lgh064f_tuner_attach, |
Michael Krufky | effee03 | 2006-01-09 15:25:47 -0200 | [diff] [blame] | 1608 | |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 1609 | /* parameter for the MPEG2-data transfer */ |
| 1610 | .stream = { |
| 1611 | .type = USB_BULK, |
| 1612 | .count = 5, |
| 1613 | .endpoint = 0x02, |
| 1614 | .u = { |
| 1615 | .bulk = { |
| 1616 | .buffersize = 8192, |
| 1617 | } |
| 1618 | } |
| 1619 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1620 | }}, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1621 | }, |
| 1622 | }, |
| 1623 | |
| 1624 | .power_ctrl = cxusb_bluebird_power_ctrl, |
| 1625 | |
Michael Krufky | effee03 | 2006-01-09 15:25:47 -0200 | [diff] [blame] | 1626 | .i2c_algo = &cxusb_i2c_algo, |
| 1627 | |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1628 | .rc.legacy = { |
| 1629 | .rc_interval = 100, |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 1630 | .rc_map_table = rc_map_dvico_portable_table, |
| 1631 | .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1632 | .rc_query = cxusb_rc_query, |
| 1633 | }, |
Michael Krufky | c150178 | 2006-03-26 05:43:36 -0300 | [diff] [blame] | 1634 | |
Michael Krufky | effee03 | 2006-01-09 15:25:47 -0200 | [diff] [blame] | 1635 | .generic_bulk_ctrl_endpoint = 0x01, |
Michael Krufky | effee03 | 2006-01-09 15:25:47 -0200 | [diff] [blame] | 1636 | |
| 1637 | .num_device_descs = 1, |
| 1638 | .devices = { |
| 1639 | { "DViCO FusionHDTV5 USB Gold", |
| 1640 | { &cxusb_table[1], NULL }, |
| 1641 | { &cxusb_table[2], NULL }, |
| 1642 | }, |
| 1643 | } |
| 1644 | }; |
| 1645 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1646 | static struct dvb_usb_device_properties cxusb_bluebird_dee1601_properties = { |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 1647 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
| 1648 | |
Patrick Boettcher | f537378 | 2006-01-09 18:21:38 -0200 | [diff] [blame] | 1649 | .usb_ctrl = DEVICE_SPECIFIC, |
| 1650 | .firmware = "dvb-usb-bluebird-01.fw", |
| 1651 | .download_firmware = bluebird_patch_dvico_firmware_download, |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 1652 | /* use usb alt setting 0 for EP4 transfer (dvb-t), |
| 1653 | use usb alt setting 7 for EP2 transfer (atsc) */ |
| 1654 | |
| 1655 | .size_of_priv = sizeof(struct cxusb_state), |
| 1656 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1657 | .num_adapters = 1, |
| 1658 | .adapter = { |
| 1659 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1660 | .num_frontends = 1, |
| 1661 | .fe = {{ |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 1662 | .streaming_ctrl = cxusb_streaming_ctrl, |
| 1663 | .frontend_attach = cxusb_dee1601_frontend_attach, |
| 1664 | .tuner_attach = cxusb_dee1601_tuner_attach, |
| 1665 | /* parameter for the MPEG2-data transfer */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1666 | .stream = { |
| 1667 | .type = USB_BULK, |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 1668 | .count = 5, |
| 1669 | .endpoint = 0x04, |
| 1670 | .u = { |
| 1671 | .bulk = { |
| 1672 | .buffersize = 8192, |
| 1673 | } |
| 1674 | } |
| 1675 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1676 | }}, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1677 | }, |
| 1678 | }, |
| 1679 | |
| 1680 | .power_ctrl = cxusb_bluebird_power_ctrl, |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 1681 | |
| 1682 | .i2c_algo = &cxusb_i2c_algo, |
| 1683 | |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1684 | .rc.legacy = { |
| 1685 | .rc_interval = 150, |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 1686 | .rc_map_table = rc_map_dvico_mce_table, |
| 1687 | .rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table), |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1688 | .rc_query = cxusb_rc_query, |
| 1689 | }, |
Chris Pascoe | 7c23970 | 2006-01-09 18:21:29 -0200 | [diff] [blame] | 1690 | |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 1691 | .generic_bulk_ctrl_endpoint = 0x01, |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 1692 | |
Michael Krufky | 587c03d | 2006-09-28 02:16:01 -0300 | [diff] [blame] | 1693 | .num_device_descs = 3, |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 1694 | .devices = { |
| 1695 | { "DViCO FusionHDTV DVB-T Dual USB", |
| 1696 | { &cxusb_table[3], NULL }, |
| 1697 | { &cxusb_table[4], NULL }, |
| 1698 | }, |
Michael Krufky | ac9ffb9 | 2006-01-11 23:21:00 -0200 | [diff] [blame] | 1699 | { "DigitalNow DVB-T Dual USB", |
| 1700 | { &cxusb_table[9], NULL }, |
| 1701 | { &cxusb_table[10], NULL }, |
| 1702 | }, |
Michael Krufky | 587c03d | 2006-09-28 02:16:01 -0300 | [diff] [blame] | 1703 | { "DViCO FusionHDTV DVB-T Dual Digital 2", |
| 1704 | { &cxusb_table[11], NULL }, |
| 1705 | { &cxusb_table[12], NULL }, |
| 1706 | }, |
Chris Pascoe | 0029ee1 | 2006-01-09 18:21:28 -0200 | [diff] [blame] | 1707 | } |
| 1708 | }; |
| 1709 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1710 | static struct dvb_usb_device_properties cxusb_bluebird_lgz201_properties = { |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 1711 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
| 1712 | |
| 1713 | .usb_ctrl = DEVICE_SPECIFIC, |
| 1714 | .firmware = "dvb-usb-bluebird-01.fw", |
| 1715 | .download_firmware = bluebird_patch_dvico_firmware_download, |
| 1716 | /* use usb alt setting 0 for EP4 transfer (dvb-t), |
| 1717 | use usb alt setting 7 for EP2 transfer (atsc) */ |
| 1718 | |
| 1719 | .size_of_priv = sizeof(struct cxusb_state), |
| 1720 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1721 | .num_adapters = 2, |
| 1722 | .adapter = { |
| 1723 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1724 | .num_frontends = 1, |
| 1725 | .fe = {{ |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 1726 | .streaming_ctrl = cxusb_streaming_ctrl, |
| 1727 | .frontend_attach = cxusb_mt352_frontend_attach, |
| 1728 | .tuner_attach = cxusb_lgz201_tuner_attach, |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 1729 | |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 1730 | /* parameter for the MPEG2-data transfer */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1731 | .stream = { |
| 1732 | .type = USB_BULK, |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 1733 | .count = 5, |
| 1734 | .endpoint = 0x04, |
| 1735 | .u = { |
| 1736 | .bulk = { |
| 1737 | .buffersize = 8192, |
| 1738 | } |
| 1739 | } |
| 1740 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1741 | }}, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1742 | }, |
| 1743 | }, |
| 1744 | .power_ctrl = cxusb_bluebird_power_ctrl, |
| 1745 | |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 1746 | .i2c_algo = &cxusb_i2c_algo, |
| 1747 | |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1748 | .rc.legacy = { |
| 1749 | .rc_interval = 100, |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 1750 | .rc_map_table = rc_map_dvico_portable_table, |
| 1751 | .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1752 | .rc_query = cxusb_rc_query, |
| 1753 | }, |
Michael Krufky | c150178 | 2006-03-26 05:43:36 -0300 | [diff] [blame] | 1754 | |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 1755 | .generic_bulk_ctrl_endpoint = 0x01, |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 1756 | .num_device_descs = 1, |
| 1757 | .devices = { |
| 1758 | { "DViCO FusionHDTV DVB-T USB (LGZ201)", |
| 1759 | { &cxusb_table[5], NULL }, |
| 1760 | { &cxusb_table[6], NULL }, |
| 1761 | }, |
| 1762 | } |
| 1763 | }; |
| 1764 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1765 | static struct dvb_usb_device_properties cxusb_bluebird_dtt7579_properties = { |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 1766 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
| 1767 | |
| 1768 | .usb_ctrl = DEVICE_SPECIFIC, |
| 1769 | .firmware = "dvb-usb-bluebird-01.fw", |
| 1770 | .download_firmware = bluebird_patch_dvico_firmware_download, |
| 1771 | /* use usb alt setting 0 for EP4 transfer (dvb-t), |
| 1772 | use usb alt setting 7 for EP2 transfer (atsc) */ |
| 1773 | |
| 1774 | .size_of_priv = sizeof(struct cxusb_state), |
| 1775 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1776 | .num_adapters = 1, |
| 1777 | .adapter = { |
| 1778 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1779 | .num_frontends = 1, |
| 1780 | .fe = {{ |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 1781 | .streaming_ctrl = cxusb_streaming_ctrl, |
| 1782 | .frontend_attach = cxusb_mt352_frontend_attach, |
| 1783 | .tuner_attach = cxusb_dtt7579_tuner_attach, |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 1784 | |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 1785 | /* parameter for the MPEG2-data transfer */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1786 | .stream = { |
| 1787 | .type = USB_BULK, |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 1788 | .count = 5, |
| 1789 | .endpoint = 0x04, |
| 1790 | .u = { |
| 1791 | .bulk = { |
| 1792 | .buffersize = 8192, |
| 1793 | } |
| 1794 | } |
| 1795 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1796 | }}, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 1797 | }, |
| 1798 | }, |
| 1799 | .power_ctrl = cxusb_bluebird_power_ctrl, |
| 1800 | |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 1801 | .i2c_algo = &cxusb_i2c_algo, |
| 1802 | |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1803 | .rc.legacy = { |
| 1804 | .rc_interval = 100, |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 1805 | .rc_map_table = rc_map_dvico_portable_table, |
| 1806 | .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1807 | .rc_query = cxusb_rc_query, |
| 1808 | }, |
Michael Krufky | c150178 | 2006-03-26 05:43:36 -0300 | [diff] [blame] | 1809 | |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 1810 | .generic_bulk_ctrl_endpoint = 0x01, |
Michael Krufky | 6f44725 | 2006-01-11 19:40:33 -0200 | [diff] [blame] | 1811 | |
| 1812 | .num_device_descs = 1, |
| 1813 | .devices = { |
| 1814 | { "DViCO FusionHDTV DVB-T USB (TH7579)", |
| 1815 | { &cxusb_table[7], NULL }, |
| 1816 | { &cxusb_table[8], NULL }, |
| 1817 | }, |
| 1818 | } |
| 1819 | }; |
| 1820 | |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 1821 | static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties = { |
| 1822 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
| 1823 | |
| 1824 | .usb_ctrl = CYPRESS_FX2, |
| 1825 | |
| 1826 | .size_of_priv = sizeof(struct cxusb_state), |
| 1827 | |
| 1828 | .num_adapters = 1, |
| 1829 | .adapter = { |
| 1830 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1831 | .num_frontends = 1, |
| 1832 | .fe = {{ |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 1833 | .streaming_ctrl = cxusb_streaming_ctrl, |
| 1834 | .frontend_attach = cxusb_dualdig4_frontend_attach, |
| 1835 | .tuner_attach = cxusb_dvico_xc3028_tuner_attach, |
| 1836 | /* parameter for the MPEG2-data transfer */ |
| 1837 | .stream = { |
| 1838 | .type = USB_BULK, |
| 1839 | .count = 5, |
| 1840 | .endpoint = 0x02, |
| 1841 | .u = { |
| 1842 | .bulk = { |
| 1843 | .buffersize = 8192, |
| 1844 | } |
| 1845 | } |
| 1846 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1847 | }}, |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 1848 | }, |
| 1849 | }, |
| 1850 | |
| 1851 | .power_ctrl = cxusb_power_ctrl, |
| 1852 | |
| 1853 | .i2c_algo = &cxusb_i2c_algo, |
| 1854 | |
| 1855 | .generic_bulk_ctrl_endpoint = 0x01, |
| 1856 | |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1857 | .rc.legacy = { |
| 1858 | .rc_interval = 100, |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 1859 | .rc_map_table = rc_map_dvico_mce_table, |
| 1860 | .rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table), |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1861 | .rc_query = cxusb_bluebird2_rc_query, |
| 1862 | }, |
Chris Pascoe | aeb012b | 2007-11-19 21:57:10 -0300 | [diff] [blame] | 1863 | |
| 1864 | .num_device_descs = 1, |
| 1865 | .devices = { |
| 1866 | { "DViCO FusionHDTV DVB-T Dual Digital 4", |
| 1867 | { NULL }, |
| 1868 | { &cxusb_table[13], NULL }, |
| 1869 | }, |
| 1870 | } |
| 1871 | }; |
| 1872 | |
Chris Pascoe | 5ccaf90 | 2007-11-20 01:53:31 -0300 | [diff] [blame] | 1873 | static struct dvb_usb_device_properties cxusb_bluebird_nano2_properties = { |
| 1874 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
| 1875 | |
| 1876 | .usb_ctrl = CYPRESS_FX2, |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 1877 | .identify_state = bluebird_fx2_identify_state, |
Chris Pascoe | 5ccaf90 | 2007-11-20 01:53:31 -0300 | [diff] [blame] | 1878 | |
| 1879 | .size_of_priv = sizeof(struct cxusb_state), |
| 1880 | |
| 1881 | .num_adapters = 1, |
| 1882 | .adapter = { |
| 1883 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1884 | .num_frontends = 1, |
| 1885 | .fe = {{ |
Chris Pascoe | 5ccaf90 | 2007-11-20 01:53:31 -0300 | [diff] [blame] | 1886 | .streaming_ctrl = cxusb_streaming_ctrl, |
| 1887 | .frontend_attach = cxusb_nano2_frontend_attach, |
| 1888 | .tuner_attach = cxusb_dvico_xc3028_tuner_attach, |
| 1889 | /* parameter for the MPEG2-data transfer */ |
| 1890 | .stream = { |
| 1891 | .type = USB_BULK, |
| 1892 | .count = 5, |
| 1893 | .endpoint = 0x02, |
| 1894 | .u = { |
| 1895 | .bulk = { |
| 1896 | .buffersize = 8192, |
| 1897 | } |
| 1898 | } |
| 1899 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1900 | }}, |
Chris Pascoe | 5ccaf90 | 2007-11-20 01:53:31 -0300 | [diff] [blame] | 1901 | }, |
| 1902 | }, |
| 1903 | |
| 1904 | .power_ctrl = cxusb_nano2_power_ctrl, |
| 1905 | |
| 1906 | .i2c_algo = &cxusb_i2c_algo, |
| 1907 | |
| 1908 | .generic_bulk_ctrl_endpoint = 0x01, |
| 1909 | |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1910 | .rc.legacy = { |
| 1911 | .rc_interval = 100, |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 1912 | .rc_map_table = rc_map_dvico_portable_table, |
| 1913 | .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1914 | .rc_query = cxusb_bluebird2_rc_query, |
| 1915 | }, |
Chris Pascoe | 5ccaf90 | 2007-11-20 01:53:31 -0300 | [diff] [blame] | 1916 | |
| 1917 | .num_device_descs = 1, |
| 1918 | .devices = { |
| 1919 | { "DViCO FusionHDTV DVB-T NANO2", |
| 1920 | { NULL }, |
| 1921 | { &cxusb_table[14], NULL }, |
| 1922 | }, |
| 1923 | } |
| 1924 | }; |
| 1925 | |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 1926 | static struct dvb_usb_device_properties cxusb_bluebird_nano2_needsfirmware_properties = { |
| 1927 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
| 1928 | |
| 1929 | .usb_ctrl = DEVICE_SPECIFIC, |
| 1930 | .firmware = "dvb-usb-bluebird-02.fw", |
| 1931 | .download_firmware = bluebird_patch_dvico_firmware_download, |
| 1932 | .identify_state = bluebird_fx2_identify_state, |
| 1933 | |
| 1934 | .size_of_priv = sizeof(struct cxusb_state), |
| 1935 | |
| 1936 | .num_adapters = 1, |
| 1937 | .adapter = { |
| 1938 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1939 | .num_frontends = 1, |
| 1940 | .fe = {{ |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 1941 | .streaming_ctrl = cxusb_streaming_ctrl, |
| 1942 | .frontend_attach = cxusb_nano2_frontend_attach, |
| 1943 | .tuner_attach = cxusb_dvico_xc3028_tuner_attach, |
| 1944 | /* parameter for the MPEG2-data transfer */ |
| 1945 | .stream = { |
| 1946 | .type = USB_BULK, |
| 1947 | .count = 5, |
| 1948 | .endpoint = 0x02, |
| 1949 | .u = { |
| 1950 | .bulk = { |
| 1951 | .buffersize = 8192, |
| 1952 | } |
| 1953 | } |
| 1954 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1955 | }}, |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 1956 | }, |
| 1957 | }, |
| 1958 | |
| 1959 | .power_ctrl = cxusb_nano2_power_ctrl, |
| 1960 | |
| 1961 | .i2c_algo = &cxusb_i2c_algo, |
| 1962 | |
| 1963 | .generic_bulk_ctrl_endpoint = 0x01, |
| 1964 | |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1965 | .rc.legacy = { |
| 1966 | .rc_interval = 100, |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 1967 | .rc_map_table = rc_map_dvico_portable_table, |
| 1968 | .rc_map_size = ARRAY_SIZE(rc_map_dvico_portable_table), |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 1969 | .rc_query = cxusb_rc_query, |
| 1970 | }, |
Chris Pascoe | 702a676 | 2007-11-20 03:34:11 -0300 | [diff] [blame] | 1971 | |
| 1972 | .num_device_descs = 1, |
| 1973 | .devices = { |
| 1974 | { "DViCO FusionHDTV DVB-T NANO2 w/o firmware", |
| 1975 | { &cxusb_table[14], NULL }, |
| 1976 | { &cxusb_table[15], NULL }, |
| 1977 | }, |
| 1978 | } |
| 1979 | }; |
| 1980 | |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 1981 | static struct dvb_usb_device_properties cxusb_aver_a868r_properties = { |
| 1982 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
| 1983 | |
| 1984 | .usb_ctrl = CYPRESS_FX2, |
| 1985 | |
| 1986 | .size_of_priv = sizeof(struct cxusb_state), |
| 1987 | |
| 1988 | .num_adapters = 1, |
| 1989 | .adapter = { |
| 1990 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 1991 | .num_frontends = 1, |
| 1992 | .fe = {{ |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 1993 | .streaming_ctrl = cxusb_aver_streaming_ctrl, |
| 1994 | .frontend_attach = cxusb_aver_lgdt3303_frontend_attach, |
| 1995 | .tuner_attach = cxusb_mxl5003s_tuner_attach, |
| 1996 | /* parameter for the MPEG2-data transfer */ |
| 1997 | .stream = { |
| 1998 | .type = USB_BULK, |
| 1999 | .count = 5, |
| 2000 | .endpoint = 0x04, |
| 2001 | .u = { |
| 2002 | .bulk = { |
| 2003 | .buffersize = 8192, |
| 2004 | } |
| 2005 | } |
| 2006 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 2007 | }}, |
Daniel Gimpelevich | f5376ad | 2008-06-28 05:01:30 -0300 | [diff] [blame] | 2008 | }, |
| 2009 | }, |
| 2010 | .power_ctrl = cxusb_aver_power_ctrl, |
| 2011 | |
| 2012 | .i2c_algo = &cxusb_i2c_algo, |
| 2013 | |
| 2014 | .generic_bulk_ctrl_endpoint = 0x01, |
| 2015 | |
| 2016 | .num_device_descs = 1, |
| 2017 | .devices = { |
| 2018 | { "AVerMedia AVerTVHD Volar (A868R)", |
| 2019 | { NULL }, |
| 2020 | { &cxusb_table[16], NULL }, |
| 2021 | }, |
| 2022 | } |
| 2023 | }; |
| 2024 | |
Michael Krufky | a2dc86b | 2008-08-09 13:06:26 -0300 | [diff] [blame] | 2025 | static |
| 2026 | struct dvb_usb_device_properties cxusb_bluebird_dualdig4_rev2_properties = { |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 2027 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
| 2028 | |
| 2029 | .usb_ctrl = CYPRESS_FX2, |
| 2030 | |
| 2031 | .size_of_priv = sizeof(struct cxusb_state), |
| 2032 | |
| 2033 | .num_adapters = 1, |
| 2034 | .adapter = { |
| 2035 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 2036 | .size_of_priv = sizeof(struct dib0700_adapter_state), |
| 2037 | .num_frontends = 1, |
| 2038 | .fe = {{ |
Michael Krufky | a2dc86b | 2008-08-09 13:06:26 -0300 | [diff] [blame] | 2039 | .streaming_ctrl = cxusb_streaming_ctrl, |
| 2040 | .frontend_attach = cxusb_dualdig4_rev2_frontend_attach, |
| 2041 | .tuner_attach = cxusb_dualdig4_rev2_tuner_attach, |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 2042 | /* parameter for the MPEG2-data transfer */ |
| 2043 | .stream = { |
| 2044 | .type = USB_BULK, |
| 2045 | .count = 7, |
| 2046 | .endpoint = 0x02, |
| 2047 | .u = { |
| 2048 | .bulk = { |
| 2049 | .buffersize = 4096, |
| 2050 | } |
| 2051 | } |
| 2052 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 2053 | }}, |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 2054 | }, |
| 2055 | }, |
| 2056 | |
| 2057 | .power_ctrl = cxusb_bluebird_power_ctrl, |
| 2058 | |
| 2059 | .i2c_algo = &cxusb_i2c_algo, |
| 2060 | |
| 2061 | .generic_bulk_ctrl_endpoint = 0x01, |
| 2062 | |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2063 | .rc.legacy = { |
| 2064 | .rc_interval = 100, |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 2065 | .rc_map_table = rc_map_dvico_mce_table, |
| 2066 | .rc_map_size = ARRAY_SIZE(rc_map_dvico_mce_table), |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2067 | .rc_query = cxusb_rc_query, |
| 2068 | }, |
Anton Blanchard | 8d79898 | 2008-08-09 12:23:15 -0300 | [diff] [blame] | 2069 | |
| 2070 | .num_device_descs = 1, |
| 2071 | .devices = { |
| 2072 | { "DViCO FusionHDTV DVB-T Dual Digital 4 (rev 2)", |
| 2073 | { NULL }, |
| 2074 | { &cxusb_table[17], NULL }, |
| 2075 | }, |
| 2076 | } |
| 2077 | }; |
| 2078 | |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 2079 | static struct dvb_usb_device_properties cxusb_d680_dmb_properties = { |
| 2080 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
| 2081 | |
| 2082 | .usb_ctrl = CYPRESS_FX2, |
| 2083 | |
| 2084 | .size_of_priv = sizeof(struct cxusb_state), |
| 2085 | |
| 2086 | .num_adapters = 1, |
| 2087 | .adapter = { |
| 2088 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 2089 | .num_frontends = 1, |
| 2090 | .fe = {{ |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 2091 | .streaming_ctrl = cxusb_d680_dmb_streaming_ctrl, |
| 2092 | .frontend_attach = cxusb_d680_dmb_frontend_attach, |
| 2093 | .tuner_attach = cxusb_d680_dmb_tuner_attach, |
| 2094 | |
| 2095 | /* parameter for the MPEG2-data transfer */ |
| 2096 | .stream = { |
| 2097 | .type = USB_BULK, |
| 2098 | .count = 5, |
| 2099 | .endpoint = 0x02, |
| 2100 | .u = { |
| 2101 | .bulk = { |
| 2102 | .buffersize = 8192, |
| 2103 | } |
| 2104 | } |
| 2105 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 2106 | }}, |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 2107 | }, |
| 2108 | }, |
| 2109 | |
| 2110 | .power_ctrl = cxusb_d680_dmb_power_ctrl, |
| 2111 | |
| 2112 | .i2c_algo = &cxusb_i2c_algo, |
| 2113 | |
| 2114 | .generic_bulk_ctrl_endpoint = 0x01, |
| 2115 | |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2116 | .rc.legacy = { |
| 2117 | .rc_interval = 100, |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 2118 | .rc_map_table = rc_map_d680_dmb_table, |
| 2119 | .rc_map_size = ARRAY_SIZE(rc_map_d680_dmb_table), |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2120 | .rc_query = cxusb_d680_dmb_rc_query, |
| 2121 | }, |
Timothy Lee | dfbdce0 | 2008-08-09 13:36:51 -0300 | [diff] [blame] | 2122 | |
| 2123 | .num_device_descs = 1, |
| 2124 | .devices = { |
| 2125 | { |
| 2126 | "Conexant DMB-TH Stick", |
| 2127 | { NULL }, |
| 2128 | { &cxusb_table[18], NULL }, |
| 2129 | }, |
| 2130 | } |
| 2131 | }; |
| 2132 | |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 2133 | static struct dvb_usb_device_properties cxusb_mygica_d689_properties = { |
| 2134 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
| 2135 | |
| 2136 | .usb_ctrl = CYPRESS_FX2, |
| 2137 | |
| 2138 | .size_of_priv = sizeof(struct cxusb_state), |
| 2139 | |
| 2140 | .num_adapters = 1, |
| 2141 | .adapter = { |
| 2142 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 2143 | .num_frontends = 1, |
| 2144 | .fe = {{ |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 2145 | .streaming_ctrl = cxusb_d680_dmb_streaming_ctrl, |
| 2146 | .frontend_attach = cxusb_mygica_d689_frontend_attach, |
| 2147 | .tuner_attach = cxusb_mygica_d689_tuner_attach, |
| 2148 | |
| 2149 | /* parameter for the MPEG2-data transfer */ |
| 2150 | .stream = { |
| 2151 | .type = USB_BULK, |
| 2152 | .count = 5, |
| 2153 | .endpoint = 0x02, |
| 2154 | .u = { |
| 2155 | .bulk = { |
| 2156 | .buffersize = 8192, |
| 2157 | } |
| 2158 | } |
| 2159 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 2160 | }}, |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 2161 | }, |
| 2162 | }, |
| 2163 | |
| 2164 | .power_ctrl = cxusb_d680_dmb_power_ctrl, |
| 2165 | |
| 2166 | .i2c_algo = &cxusb_i2c_algo, |
| 2167 | |
| 2168 | .generic_bulk_ctrl_endpoint = 0x01, |
| 2169 | |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2170 | .rc.legacy = { |
| 2171 | .rc_interval = 100, |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 2172 | .rc_map_table = rc_map_d680_dmb_table, |
| 2173 | .rc_map_size = ARRAY_SIZE(rc_map_d680_dmb_table), |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 2174 | .rc_query = cxusb_d680_dmb_rc_query, |
| 2175 | }, |
David Wong | b18bd1d | 2009-10-26 09:41:22 -0300 | [diff] [blame] | 2176 | |
| 2177 | .num_device_descs = 1, |
| 2178 | .devices = { |
| 2179 | { |
| 2180 | "Mygica D689 DMB-TH", |
| 2181 | { NULL }, |
| 2182 | { &cxusb_table[19], NULL }, |
| 2183 | }, |
| 2184 | } |
| 2185 | }; |
| 2186 | |
CrazyCat | a0f629b | 2014-11-14 18:24:28 -0300 | [diff] [blame] | 2187 | static struct dvb_usb_device_properties cxusb_mygica_t230_properties = { |
| 2188 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
| 2189 | |
| 2190 | .usb_ctrl = CYPRESS_FX2, |
| 2191 | |
| 2192 | .size_of_priv = sizeof(struct cxusb_state), |
| 2193 | |
| 2194 | .num_adapters = 1, |
| 2195 | .adapter = { |
| 2196 | { |
| 2197 | .num_frontends = 1, |
| 2198 | .fe = {{ |
| 2199 | .streaming_ctrl = cxusb_streaming_ctrl, |
| 2200 | .frontend_attach = cxusb_mygica_t230_frontend_attach, |
| 2201 | |
| 2202 | /* parameter for the MPEG2-data transfer */ |
| 2203 | .stream = { |
| 2204 | .type = USB_BULK, |
| 2205 | .count = 5, |
| 2206 | .endpoint = 0x02, |
| 2207 | .u = { |
| 2208 | .bulk = { |
| 2209 | .buffersize = 8192, |
| 2210 | } |
| 2211 | } |
| 2212 | }, |
| 2213 | } }, |
| 2214 | }, |
| 2215 | }, |
| 2216 | |
| 2217 | .power_ctrl = cxusb_d680_dmb_power_ctrl, |
| 2218 | |
| 2219 | .i2c_algo = &cxusb_i2c_algo, |
| 2220 | |
| 2221 | .generic_bulk_ctrl_endpoint = 0x01, |
| 2222 | |
| 2223 | .rc.legacy = { |
| 2224 | .rc_interval = 100, |
| 2225 | .rc_map_table = rc_map_d680_dmb_table, |
| 2226 | .rc_map_size = ARRAY_SIZE(rc_map_d680_dmb_table), |
| 2227 | .rc_query = cxusb_d680_dmb_rc_query, |
| 2228 | }, |
| 2229 | |
| 2230 | .num_device_descs = 1, |
| 2231 | .devices = { |
| 2232 | { |
| 2233 | "Mygica T230 DVB-T/T2/C", |
| 2234 | { NULL }, |
Jonathan McDowell | d0bb12c | 2015-01-02 14:55:17 -0300 | [diff] [blame] | 2235 | { &cxusb_table[20], NULL }, |
CrazyCat | a0f629b | 2014-11-14 18:24:28 -0300 | [diff] [blame] | 2236 | }, |
| 2237 | } |
| 2238 | }; |
| 2239 | |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 2240 | static struct usb_driver cxusb_driver = { |
Patrick Boettcher | 63b5c1c | 2005-07-07 17:58:30 -0700 | [diff] [blame] | 2241 | .name = "dvb_usb_cxusb", |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 2242 | .probe = cxusb_probe, |
Olli Salonen | 26c42b0 | 2014-07-13 10:52:22 -0300 | [diff] [blame] | 2243 | .disconnect = cxusb_disconnect, |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 2244 | .id_table = cxusb_table, |
| 2245 | }; |
| 2246 | |
Greg Kroah-Hartman | ecb3b2b | 2011-11-18 09:46:12 -0800 | [diff] [blame] | 2247 | module_usb_driver(cxusb_driver); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 2248 | |
| 2249 | MODULE_AUTHOR("Patrick Boettcher <patrick.boettcher@desy.de>"); |
Michael Krufky | 5b9ed28 | 2006-10-15 14:51:08 -0300 | [diff] [blame] | 2250 | MODULE_AUTHOR("Michael Krufky <mkrufky@linuxtv.org>"); |
Michael Krufky | f4efb4d | 2006-01-13 14:10:25 -0200 | [diff] [blame] | 2251 | MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); |
Patrick Boettcher | 22c6d93 | 2005-07-07 17:58:10 -0700 | [diff] [blame] | 2252 | MODULE_DESCRIPTION("Driver for Conexant USB2.0 hybrid reference design"); |
| 2253 | MODULE_VERSION("1.0-alpha"); |
| 2254 | MODULE_LICENSE("GPL"); |