summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c
diff options
context:
space:
mode:
authorPatrick Boettcher <devnull@localhost>2005-04-17 14:37:15 +0000
committerPatrick Boettcher <devnull@localhost>2005-04-17 14:37:15 +0000
commit4e4da24aa36487071bd874fc63d387258299ceb0 (patch)
treeb048f438139994b1842b269838bc85d2eebf2d63 /linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c
parentb5833bcf1184221ce9ff84d4787d77ce1cbacafa (diff)
downloadmediapointer-dvb-s2-4e4da24aa36487071bd874fc63d387258299ceb0.tar.gz
mediapointer-dvb-s2-4e4da24aa36487071bd874fc63d387258299ceb0.tar.bz2
- ported all dibusb drivers to fit into the dvb-usb-frameword
- created dvb-pll-entries for the tuner used with the dibusb-drivers - removed all traces of the dibusb driver - adapted the dib3000-frontends to get along with the dvb-pll-changes
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c')
-rw-r--r--linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c107
1 files changed, 107 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c b/linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c
new file mode 100644
index 000000000..7e15ab82a
--- /dev/null
+++ b/linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c
@@ -0,0 +1,107 @@
+/* DVB USB framework compliant Linux driver for the Hauppauge WinTV-NOVA-T usb2
+ * DVB-T receiver.
+ *
+ * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@desy.de)
+ *
+ * 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"
+
+/* USB Driver stuff */
+static struct dvb_usb_properties nova_t_properties;
+
+static int nova_t_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ return dvb_usb_device_init(intf,&nova_t_properties,THIS_MODULE);
+}
+
+/* do not change the order of the ID table */
+static struct usb_device_id nova_t_table [] = {
+/* 00 */ { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_WINTV_NOVA_T_USB2_COLD) },
+/* 01 */ { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_WINTV_NOVA_T_USB2_WARM) },
+ { } /* Terminating entry */
+};
+MODULE_DEVICE_TABLE (usb, nova_t_table);
+
+static struct dvb_usb_properties nova_t_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-nova-t-usb2-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 = dibusb2_0_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 = {
+ { "Hauppauge WinTV-NOVA-T usb2",
+ { &nova_t_table[0], NULL },
+ { &nova_t_table[1], NULL },
+ },
+ }
+};
+
+static struct usb_driver nova_t_driver = {
+ .owner = THIS_MODULE,
+ .name = "Hauppauge WinTV-NOVA-T usb2",
+ .probe = nova_t_probe,
+ .disconnect = dvb_usb_device_exit,
+ .id_table = nova_t_table,
+};
+
+/* module stuff */
+static int __init nova_t_module_init(void)
+{
+ int result;
+ if ((result = usb_register(&nova_t_driver))) {
+ err("usb_register failed. Error number %d",result);
+ return result;
+ }
+
+ return 0;
+}
+
+static void __exit nova_t_module_exit(void)
+{
+ /* deregister this driver from the USB subsystem */
+ usb_deregister(&nova_t_driver);
+}
+
+module_init (nova_t_module_init);
+module_exit (nova_t_module_exit);
+
+MODULE_AUTHOR("Patrick Boettcher <patrick.boettcher@desy.de>");
+MODULE_DESCRIPTION("Hauppauge WinTV-NOVA-T usb2");
+MODULE_VERSION("1.0");
+MODULE_LICENSE("GPL");