/* * budget.c: driver for the SAA7146 based Budget DVB cards * * Compiled from various sources by Michael Hunold * * Copyright (C) 2002 Ralph Metzler * * Copyright (C) 1999-2002 Ralph Metzler * & Marcus Metzler for convergence integrated media GmbH * * 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; either version 2 * of the License, or (at your option) any later version. * * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Or, point your browser to http://www.gnu.org/copyleft/gpl.html * * * the project's page is at http://www.linuxtv.org/dvb/ */ #include "budget.h" #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) #define KBUILD_MODNAME budget #endif static struct saa7146_extension budget_extension; MAKE_BUDGET_INFO(ttbs, "TT-Budget/WinTV-NOVA-S PCI", BUDGET_TT); MAKE_BUDGET_INFO(ttbc, "TT-Budget/WinTV-NOVA-C PCI", BUDGET_TT); MAKE_BUDGET_INFO(ttbt, "TT-Budget/WinTV-NOVA-T PCI", BUDGET_TT); MAKE_BUDGET_INFO(ttbci, "TT-Budget/WinTV-NOVA-CI PCI", BUDGET_TT_HW_DISEQC); MAKE_BUDGET_INFO(satel, "SATELCO Multimedia PCI", BUDGET_TT_HW_DISEQC); MAKE_BUDGET_INFO(fs_1_3,"Siemens/Technotrend/Hauppauge PCI rev1.3+Budget_Patch", BUDGET_PATCH); static struct pci_device_id pci_tbl[] = { // MAKE_EXTENSION_PCI(fs_1_3,0x13c2, 0x0000), /* Uncomment for Budget Patch */ MAKE_EXTENSION_PCI(ttbs, 0x13c2, 0x1003), MAKE_EXTENSION_PCI(ttbc, 0x13c2, 0x1004), MAKE_EXTENSION_PCI(ttbt, 0x13c2, 0x1005), MAKE_EXTENSION_PCI(ttbci, 0x13c2, 0x100c), MAKE_EXTENSION_PCI(ttbci, 0x13c2, 0x100f), MAKE_EXTENSION_PCI(satel, 0x13c2, 0x1013), { .vendor = 0, } }; static int this_budget_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *info) { struct budget_s *budget = NULL; DEB_EE(("budget: %p\n",budget)); if( 0 != budget_attach(dev,info)) { return -1; } budget = (struct budget_s*)dev->ext_priv; // FIXME: cope with error here! budget_register(budget); printk(KERN_INFO "budget: found budget card '%s'.\n",budget->card->name); return 0; } static struct saa7146_extension budget_extension = { .name = "budget dvb\0", .flags = 0, .ext_vv_data = NULL, .module = THIS_MODULE, .pci_tbl = &pci_tbl[0], .attach = this_budget_attach, .detach = budget_detach, .irq_mask = MASK_10, .irq_func = budget_irq, }; static int __init budget_init(void) { if (saa7146_register_extension(&budget_extension)) return -ENODEV; return 0; } static void __exit budget_exit(void) { DEB_EE((".\n")); saa7146_unregister_extension(&budget_extension); } module_init(budget_init); module_exit(budget_exit); MODULE_DESCRIPTION("driver for the SAA7146 based so-called budget PCI DVB cards by " "Siemens, Technotrend, Hauppauge"); MODULE_AUTHOR("Ralph Metzler, Marcus Metzler, others"); MODULE_LICENSE("GPL");