diff options
author | Michael Krufky <mkrufky@m1k.net> | 2006-01-09 12:25:47 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-09 12:25:47 -0500 |
commit | effee0333b6090ff4ff0463e8fb6084cf4406bbd (patch) | |
tree | 111ffec9662e88267fabe7cd0ce020673bc01650 | |
parent | af36c82c97ff68e03837ed47991de0494007612b (diff) |
V4L/DVB (3266): Add support for DViCO FusionHDTV5 USB Gold
- Adds Bluebird ATSC support to the cxusb driver,
using dvb-usb-bluebird-atsc-01.fw firmware.
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
-rw-r--r-- | drivers/media/dvb/dvb-usb/cxusb.c | 92 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-ids.h | 2 |
2 files changed, 86 insertions, 8 deletions
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c index d05fab01cccd..8ca07fdab03d 100644 --- a/drivers/media/dvb/dvb-usb/cxusb.c +++ b/drivers/media/dvb/dvb-usb/cxusb.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "cxusb.h" | 25 | #include "cxusb.h" |
26 | 26 | ||
27 | #include "cx22702.h" | 27 | #include "cx22702.h" |
28 | #include "lgdt330x.h" | ||
28 | 29 | ||
29 | /* debug */ | 30 | /* debug */ |
30 | int dvb_usb_cxusb_debug; | 31 | int dvb_usb_cxusb_debug; |
@@ -165,17 +166,34 @@ struct cx22702_config cxusb_cx22702_config = { | |||
165 | .pll_set = dvb_usb_pll_set_i2c, | 166 | .pll_set = dvb_usb_pll_set_i2c, |
166 | }; | 167 | }; |
167 | 168 | ||
169 | struct lgdt330x_config cxusb_lgdt330x_config = { | ||
170 | .demod_address = 0x0e, | ||
171 | .demod_chip = LGDT3303, | ||
172 | .pll_set = dvb_usb_pll_set_i2c, | ||
173 | }; | ||
174 | |||
168 | /* Callbacks for DVB USB */ | 175 | /* Callbacks for DVB USB */ |
169 | static int cxusb_tuner_attach(struct dvb_usb_device *d) | 176 | static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_device *d) |
170 | { | 177 | { |
171 | u8 bpll[4] = { 0x0b, 0xdc, 0x9c, 0xa0 }; | 178 | u8 bpll[4] = { 0x0b, 0xdc, 0x9c, 0xa0 }; |
172 | d->pll_addr = 0x61; | 179 | d->pll_addr = 0x61; |
173 | memcpy(d->pll_init,bpll,4); | 180 | memcpy(d->pll_init, bpll, 4); |
174 | d->pll_desc = &dvb_pll_fmd1216me; | 181 | d->pll_desc = &dvb_pll_fmd1216me; |
175 | return 0; | 182 | return 0; |
176 | } | 183 | } |
177 | 184 | ||
178 | static int cxusb_frontend_attach(struct dvb_usb_device *d) | 185 | static int cxusb_lgh064f_tuner_attach(struct dvb_usb_device *d) |
186 | { | ||
187 | u8 bpll[4] = { 0x00, 0x00, 0x18, 0x50 }; | ||
188 | /* bpll[2] : unset bit 3, set bits 4&5 | ||
189 | bpll[3] : 0x50 - digital, 0x20 - analog */ | ||
190 | d->pll_addr = 0x61; | ||
191 | memcpy(d->pll_init, bpll, 4); | ||
192 | d->pll_desc = &dvb_pll_tdvs_tua6034; | ||
193 | return 0; | ||
194 | } | ||
195 | |||
196 | static int cxusb_cx22702_frontend_attach(struct dvb_usb_device *d) | ||
179 | { | 197 | { |
180 | u8 b; | 198 | u8 b; |
181 | if (usb_set_interface(d->udev,0,6) < 0) | 199 | if (usb_set_interface(d->udev,0,6) < 0) |
@@ -189,22 +207,43 @@ static int cxusb_frontend_attach(struct dvb_usb_device *d) | |||
189 | return -EIO; | 207 | return -EIO; |
190 | } | 208 | } |
191 | 209 | ||
210 | static int cxusb_lgdt330x_frontend_attach(struct dvb_usb_device *d) | ||
211 | { | ||
212 | if (usb_set_interface(d->udev,0,0) < 0) | ||
213 | err("set interface failed"); | ||
214 | |||
215 | cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); | ||
216 | |||
217 | if ((d->fe = lgdt330x_attach(&cxusb_lgdt330x_config, &d->i2c_adap)) != NULL) | ||
218 | return 0; | ||
219 | |||
220 | return -EIO; | ||
221 | } | ||
222 | |||
192 | /* DVB USB Driver stuff */ | 223 | /* DVB USB Driver stuff */ |
193 | static struct dvb_usb_properties cxusb_properties; | 224 | static struct dvb_usb_properties cxusb_medion_properties; |
225 | static struct dvb_usb_properties cxusb_bluebird_atsc_properties; | ||
194 | 226 | ||
195 | static int cxusb_probe(struct usb_interface *intf, | 227 | static int cxusb_probe(struct usb_interface *intf, |
196 | const struct usb_device_id *id) | 228 | const struct usb_device_id *id) |
197 | { | 229 | { |
198 | return dvb_usb_device_init(intf,&cxusb_properties,THIS_MODULE,NULL); | 230 | if (dvb_usb_device_init(intf,&cxusb_medion_properties,THIS_MODULE,NULL) == 0 || |
231 | dvb_usb_device_init(intf,&cxusb_bluebird_atsc_properties,THIS_MODULE,NULL) == 0) { | ||
232 | return 0; | ||
233 | } | ||
234 | |||
235 | return -EINVAL; | ||
199 | } | 236 | } |
200 | 237 | ||
201 | static struct usb_device_id cxusb_table [] = { | 238 | static struct usb_device_id cxusb_table [] = { |
202 | { USB_DEVICE(USB_VID_MEDION, USB_PID_MEDION_MD95700) }, | 239 | { USB_DEVICE(USB_VID_MEDION, USB_PID_MEDION_MD95700) }, |
240 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_LG064F_COLD) }, | ||
241 | { USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_LG064F_WARM) }, | ||
203 | {} /* Terminating entry */ | 242 | {} /* Terminating entry */ |
204 | }; | 243 | }; |
205 | MODULE_DEVICE_TABLE (usb, cxusb_table); | 244 | MODULE_DEVICE_TABLE (usb, cxusb_table); |
206 | 245 | ||
207 | static struct dvb_usb_properties cxusb_properties = { | 246 | static struct dvb_usb_properties cxusb_medion_properties = { |
208 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, | 247 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
209 | 248 | ||
210 | .usb_ctrl = CYPRESS_FX2, | 249 | .usb_ctrl = CYPRESS_FX2, |
@@ -213,8 +252,8 @@ static struct dvb_usb_properties cxusb_properties = { | |||
213 | 252 | ||
214 | .streaming_ctrl = cxusb_streaming_ctrl, | 253 | .streaming_ctrl = cxusb_streaming_ctrl, |
215 | .power_ctrl = cxusb_power_ctrl, | 254 | .power_ctrl = cxusb_power_ctrl, |
216 | .frontend_attach = cxusb_frontend_attach, | 255 | .frontend_attach = cxusb_cx22702_frontend_attach, |
217 | .tuner_attach = cxusb_tuner_attach, | 256 | .tuner_attach = cxusb_fmd1216me_tuner_attach, |
218 | 257 | ||
219 | .i2c_algo = &cxusb_i2c_algo, | 258 | .i2c_algo = &cxusb_i2c_algo, |
220 | 259 | ||
@@ -240,6 +279,43 @@ static struct dvb_usb_properties cxusb_properties = { | |||
240 | } | 279 | } |
241 | }; | 280 | }; |
242 | 281 | ||
282 | static struct dvb_usb_properties cxusb_bluebird_atsc_properties = { | ||
283 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, | ||
284 | |||
285 | .usb_ctrl = CYPRESS_FX2, | ||
286 | .firmware = "dvb-usb-bluebird-atsc-01.fw", | ||
287 | |||
288 | .size_of_priv = sizeof(struct cxusb_state), | ||
289 | |||
290 | .streaming_ctrl = cxusb_streaming_ctrl, | ||
291 | .power_ctrl = cxusb_power_ctrl, | ||
292 | .frontend_attach = cxusb_lgdt330x_frontend_attach, | ||
293 | .tuner_attach = cxusb_lgh064f_tuner_attach, | ||
294 | |||
295 | .i2c_algo = &cxusb_i2c_algo, | ||
296 | |||
297 | .generic_bulk_ctrl_endpoint = 0x01, | ||
298 | /* parameter for the MPEG2-data transfer */ | ||
299 | .urb = { | ||
300 | .type = DVB_USB_BULK, | ||
301 | .count = 5, | ||
302 | .endpoint = 0x02, | ||
303 | .u = { | ||
304 | .bulk = { | ||
305 | .buffersize = 8192, | ||
306 | } | ||
307 | } | ||
308 | }, | ||
309 | |||
310 | .num_device_descs = 1, | ||
311 | .devices = { | ||
312 | { "DViCO FusionHDTV5 USB Gold", | ||
313 | { &cxusb_table[1], NULL }, | ||
314 | { &cxusb_table[2], NULL }, | ||
315 | }, | ||
316 | } | ||
317 | }; | ||
318 | |||
243 | static struct usb_driver cxusb_driver = { | 319 | static struct usb_driver cxusb_driver = { |
244 | .name = "dvb_usb_cxusb", | 320 | .name = "dvb_usb_cxusb", |
245 | .probe = cxusb_probe, | 321 | .probe = cxusb_probe, |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h index 6be99e537e12..784adfe1c070 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h | |||
@@ -91,6 +91,8 @@ | |||
91 | #define USB_PID_DVICO_BLUEBIRD_LGDT 0xd820 | 91 | #define USB_PID_DVICO_BLUEBIRD_LGDT 0xd820 |
92 | #define USB_PID_DVICO_BLUEBIRD_LGZ201_1 0xdb01 | 92 | #define USB_PID_DVICO_BLUEBIRD_LGZ201_1 0xdb01 |
93 | #define USB_PID_DVICO_BLUEBIRD_TH7579_2 0xdb11 | 93 | #define USB_PID_DVICO_BLUEBIRD_TH7579_2 0xdb11 |
94 | #define USB_PID_DVICO_BLUEBIRD_LG064F_COLD 0xd500 | ||
95 | #define USB_PID_DVICO_BLUEBIRD_LG064F_WARM 0xd700 | ||
94 | #define USB_PID_MEDION_MD95700 0x0932 | 96 | #define USB_PID_MEDION_MD95700 0x0932 |
95 | #define USB_PID_KYE_DVB_T_COLD 0x701e | 97 | #define USB_PID_KYE_DVB_T_COLD 0x701e |
96 | #define USB_PID_KYE_DVB_T_WARM 0x701f | 98 | #define USB_PID_KYE_DVB_T_WARM 0x701f |