/* DVB USB framework compliant Linux driver for the AVerMedia AverTV DVB-T USB 2.0 (A800) * DVB-T receiver. * * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@desy.de) * * Thanks to AVerMedia who kindly provided information. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation, version 2. * * see Documentation/dvb/README.dvb-usb for more information */ #include "dibusb.h" static int a800_power_ctrl(struct dvb_usb_device *d, int onoff) { return 0; } /* USB Driver stuff */ static struct dvb_usb_properties a800_properties; static int a800_probe(struct usb_interface *intf, const struct usb_device_id *id) { return dvb_usb_device_init(intf,&a800_properties,THIS_MODULE); } /* do not change the order of the ID table */ static struct usb_device_id a800_table [] = { /* 00 */ { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_DVBT_USB2_COLD) }, /* 01 */ { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_DVBT_USB2_WARM) }, { } /* Terminating entry */ }; MODULE_DEVICE_TABLE (usb, a800_table); static struct dvb_usb_properties a800_properties = { .caps = DVB_USB_HAS_PID_FILTER | DVB_USB_PID_FILTER_CAN_BE_TURNED_OFF | DVB_USB_IS_AN_I2C_ADAPTER, .usb_ctrl = CYPRESS_FX2, .firmware = "dvb-usb-avertv-a800-01.fw", .size_of_priv = sizeof(struct dibusb_state), .streaming_ctrl = dibusb2_0_streaming_ctrl, .pid_filter = dibusb_pid_filter, .pid_filter_ctrl = dibusb_pid_filter_ctrl, .power_ctrl = a800_power_ctrl, .frontend_attach = dibusb_dib3000mc_frontend_attach, .tuner_attach = dibusb_dib3000mc_tuner_attach, .read_mac_address = NULL, .rc_interval = DEFAULT_RC_INTERVAL, .init_rc = NULL, /* TODO */ .query_rc = NULL, .i2c_algo = &dibusb_i2c_algo, .generic_bulk_ctrl_endpoint = 0x01, /* parameter for the MPEG2-data transfer */ .urb = { .type = DVB_USB_BULK, .count = 7, .endpoint = 0x06, .u { .bulk = { .buffersize = 4096, } } }, .num_device_descs = 1, .devices = { { "AVerMedia AverTV DVB-T USB 2.0 (A800)", { &a800_table[0], NULL }, { &a800_table[1], NULL }, }, } }; static struct usb_driver a800_driver = { .owner = THIS_MODULE, .name = "AVerMedia AverTV DVB-T USB 2.0 (A800)", .probe = a800_probe, .disconnect = dvb_usb_device_exit, .id_table = a800_table, }; /* module stuff */ static int __init a800_module_init(void) { int result; if ((result = usb_register(&a800_driver))) { err("usb_register failed. Error number %d",result); return result; } return 0; } static void __exit a800_module_exit(void) { /* deregister this driver from the USB subsystem */ usb_deregister(&a800_driver); } module_init (a800_module_init); module_exit (a800_module_exit); MODULE_AUTHOR("Patrick Boettcher "); MODULE_DESCRIPTION("AVerMedia AverTV DVB-T USB 2.0 (A800)"); MODULE_VERSION("1.0"); MODULE_LICENSE("GPL");