obj-$(CONFIG_DVB_BT8XX) += bt878.o dvb-bt8xx.o
-EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -Idrivers/media/video
+EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -Idrivers/media/video -Idrivers/media/dvb/frontends
#include "dmxdev.h"
#include "dvbdev.h"
#include "bt878.h"
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
#include "dst-bt878.h"
-#else
-#include "../frontends/dst-bt878.h"
-#endif
#include "dvb_functions.h"
return 0;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-/* with 2.6.x not needed thanks to the driver model + sysfs */
-
-extern struct i2c_adapter *bttv_get_i2c_adap(unsigned int card);
-
-static void __init dvb_bt8xx_get_adaps(void)
-{
- struct dvb_bt8xx_card *card;
- struct list_head *entry, *entry_safe;
-
- list_for_each_safe(entry, entry_safe, &card_list) {
- card = list_entry(entry, struct dvb_bt8xx_card, list);
- card->i2c_adapter = bttv_get_i2c_adap(card->bttv_nr);
- if (!card->i2c_adapter) {
- printk("dvb_bt8xx: unable to determine i2c adaptor of card %d, deleting\n", card->bttv_nr);
-
- list_del(&card->list);
- kfree(card);
- }
- }
-}
-
-static void dvb_bt8xx_i2c_adap_free(struct i2c_adapter *adap)
-{
-}
-
-static void __exit dvb_bt8xx_exit_adaps(void)
-{
-}
-
-#else
-
-/* More complicated. but cleaner better */
-
static struct dvb_bt8xx_card *dvb_bt8xx_find_by_i2c_adap(struct i2c_adapter *adap)
{
struct dvb_bt8xx_card *card;
{
i2c_del_driver(&dvb_bt8xx_driver);
}
-#endif
static int __init dvb_bt8xx_load_card( struct dvb_bt8xx_card *card)
{
+/*
+ * dst-bt878.h: part of the DST driver for the TwinHan DST Frontend
+ *
+ * Copyright (C) 2003 Jamie Honan
+ */
struct dst_gpio_enable {
u32 mask;
struct bt878 ;
-int
-bt878_device_control(struct bt878 *bt, unsigned int cmd, union dst_gpio_packet *mp);
+int bt878_device_control(struct bt878 *bt, unsigned int cmd, union dst_gpio_packet *mp);
struct bt878 *bt878_find_by_dvb_adap(struct dvb_adapter *adap);
#include <linux/interrupt.h>
#include <linux/input.h>
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-#include "input_fake.h"
-#endif
-
-
-
struct budget_ci {
struct budget budget;
struct input_dev input_dev;
}
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void ttusb_iso_irq(struct urb *urb)
-#else
static void ttusb_iso_irq(struct urb *urb, struct pt_regs *ptregs)
-#endif
{
struct ttusb *ttusb = urb->context;
ttusb_process_frame(ttusb, data, len);
}
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
usb_submit_urb(urb, GFP_ATOMIC);
-#endif
}
static void ttusb_free_iso_urbs(struct ttusb *ttusb)
}
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- for (i = 0; i < ISO_BUF_COUNT; i++) {
- int next = (i + 1) % ISO_BUF_COUNT;
- ttusb->iso_urb[i]->next = ttusb->iso_urb[next];
- }
-#endif
-
for (i = 0; i < ISO_BUF_COUNT; i++) {
if ((err = usb_submit_urb(ttusb->iso_urb[i], GFP_KERNEL))) {
ttusb_stop_iso_xfer(ttusb);
};
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void *ttusb_probe(struct usb_device *udev, unsigned int ifnum,
- const struct usb_device_id *id)
-{
- struct ttusb *ttusb;
- int result, channel;
-
- if (ifnum != 0)
- return NULL;
-
- dprintk("%s: TTUSB DVB connected\n", __FUNCTION__);
-
- if (!(ttusb = kmalloc(sizeof(struct ttusb), GFP_KERNEL)))
- return NULL;
-
-#else
static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
{
struct usb_device *udev;
if (!(ttusb = kmalloc(sizeof(struct ttusb), GFP_KERNEL)))
return -ENOMEM;
-#endif
-
memset(ttusb, 0, sizeof(struct ttusb));
for (channel = 0; channel < TTUSB_MAXCHANNEL; ++channel) {
S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP
| S_IROTH | S_IWOTH, &stc_fops, ttusb);
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- return (void *) ttusb;
-#else
+
usb_set_intfdata(intf, (void *) ttusb);
return 0;
-#endif
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void ttusb_disconnect(struct usb_device *udev, void *data)
-{
- struct ttusb *ttusb = data;
-#else
static void ttusb_disconnect(struct usb_interface *intf)
{
struct ttusb *ttusb = usb_get_intfdata(intf);
usb_set_intfdata(intf, NULL);
-#endif
ttusb->disconnecting = 1;
ttusb_stop_iso_xfer(ttusb);
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69))
-#undef devfs_remove
-#define devfs_remove(x) devfs_unregister(ttusb->stc_devfs_handle);
-#endif
#if 0
devfs_remove(TTUSB_BUDGET_NAME);
#endif
--- /dev/null
+#include <linux/module.h>
+#include <linux/vermagic.h>
+#include <linux/compiler.h>
+
+MODULE_INFO(vermagic, VERMAGIC_STRING);
+
+static const struct modversion_info ____versions[]
+__attribute__((section("__versions"))) = {
+ { 0x98a034c6, "struct_module" },
+ { 0x1b636da2, "usb_deregister" },
+ { 0x9c655b4f, "usb_register" },
+ { 0x37a0cba, "kfree" },
+ { 0xc490b263, "dvb_unregister_adapter" },
+ { 0xf0ca7c9b, "dvb_unregister_i2c_bus" },
+ { 0x213a4973, "dvb_dmxdev_release" },
+ { 0x12014018, "dvb_net_release" },
+ { 0x616af636, "dvb_net_init" },
+ { 0x6a8b7cf7, "dvb_dmx_release" },
+ { 0x107a341d, "dvb_dmxdev_init" },
+ { 0x8fa22872, "dvb_dmx_init" },
+ { 0x5117ed38, "dvb_add_frontend_ioctls" },
+ { 0xfc17c7e7, "dvb_register_i2c_bus" },
+ { 0x3ad6f025, "dvb_register_adapter" },
+ { 0x7ac96080, "kmem_cache_alloc" },
+ { 0xa73704a, "malloc_sizes" },
+ { 0xdfcbe89f, "usb_set_interface" },
+ { 0x4f0eac15, "usb_reset_configuration" },
+ { 0x1b49153f, "usb_unlink_urb" },
+ { 0xf136026d, "usb_alloc_urb" },
+ { 0xe6f8a15d, "dma_alloc_coherent" },
+ { 0xe8d874ea, "dma_free_coherent" },
+ { 0x8ee31378, "usb_free_urb" },
+ { 0x53e02b2e, "usb_submit_urb" },
+ { 0xda02d67, "jiffies" },
+ { 0x4f7c0ba8, "dvb_dmx_swfilter_packets" },
+ { 0x9d669763, "memcpy" },
+ { 0xd22b546, "__up_wakeup" },
+ { 0x1b7d4074, "printk" },
+ { 0x85eee601, "usb_bulk_msg" },
+ { 0x28c3bbf5, "__down_failed_interruptible" },
+ { 0xd533bec7, "__might_sleep" },
+};
+
+static const char __module_depends[]
+__attribute_used__
+__attribute__((section(".modinfo"))) =
+"depends=usbcore,dvb-core";
+
+MODULE_ALIAS("usb:v0B48p1003dl*dh*dc*dsc*dp*ic*isc*ip*");
+MODULE_ALIAS("usb:v0B48p1004dl*dh*dc*dsc*dp*ic*isc*ip*");
+MODULE_ALIAS("usb:v0B48p1005dl*dh*dc*dsc*dp*ic*isc*ip*");
#include <linux/usb.h>
#include <linux/version.h>
#include <linux/interrupt.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#include <linux/firmware.h>
-#endif
#include "dmxdev.h"
#include "dvb_demux.h"
}
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void ttusb_dec_process_urb(struct urb *urb)
-#else
static void ttusb_dec_process_urb(struct urb *urb, struct pt_regs *ptregs)
-#endif
{
struct ttusb_dec *dec = urb->context;
int i;
for (i = 0; i < FRAMES_PER_ISO_BUF; i++) {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- struct iso_packet_descriptor *d;
-#else
struct usb_iso_packet_descriptor *d;
-#endif
+
u8 *b;
int length;
struct urb_frame *frame;
urb->status);
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
if (dec->iso_stream_count)
usb_submit_urb(urb, GFP_ATOMIC);
-#endif
}
static void ttusb_dec_setup_urbs(struct ttusb_dec *dec)
urb->context = dec;
urb->complete = ttusb_dec_process_urb;
urb->pipe = dec->stream_pipe;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
urb->transfer_flags = URB_ISO_ASAP;
urb->interval = 1;
-#else
- urb->transfer_flags = USB_ISO_ASAP;
-#endif
+
urb->number_of_packets = FRAMES_PER_ISO_BUF;
urb->transfer_buffer_length = ISO_FRAME_SIZE *
FRAMES_PER_ISO_BUF;
ttusb_dec_setup_urbs(dec);
for (i = 0; i < ISO_BUF_COUNT; i++) {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
if ((result = usb_submit_urb(dec->iso_urb[i],
GFP_ATOMIC))) {
-#else
- if ((result = usb_submit_urb(dec->iso_urb[i]))) {
-#endif
printk("%s: failed urb submission %d: "
"error %d\n", __FUNCTION__, i, result);
up(&dec->iso_sem);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- ttusb_dec_set_streaming_interface(dec);
-#endif
-
return 0;
}
for (i = 0; i < ISO_BUF_COUNT; i++) {
struct urb *urb;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
if (!(urb = usb_alloc_urb(FRAMES_PER_ISO_BUF, GFP_ATOMIC))) {
-#else
- if (!(urb = usb_alloc_urb(FRAMES_PER_ISO_BUF))) {
-#endif
ttusb_dec_free_iso_urbs(dec);
return -ENOMEM;
}
ttusb_dec_setup_urbs(dec);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- for (i = 0; i < ISO_BUF_COUNT; i++) {
- int next = (i + 1) % ISO_BUF_COUNT;
- dec->iso_urb[i]->next = dec->iso_urb[next];
- }
-#endif
-
return 0;
}
ttusb_dec_alloc_iso_urbs(dec);
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-#include "dsp_dec2000t.h"
-#include "dsp_dec3000s.h"
-#endif
-
static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)
{
int i, j, actual_len, result, size, trans_count;
u32 firmware_csum = 0;
u32 firmware_size_nl;
u32 firmware_csum_nl;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
const struct firmware *fw_entry = NULL;
-#endif
dprintk("%s\n", __FUNCTION__);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
if (request_firmware(&fw_entry, dec->firmware_name, &dec->udev->dev)) {
printk(KERN_ERR "%s: Firmware (%s) unavailable.\n",
__FUNCTION__, dec->firmware_name);
firmware = fw_entry->data;
firmware_size = fw_entry->size;
-#endif
+
switch (dec->model) {
case TTUSB_DEC2000T:
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- firmware = &dsp_dec2000t[0];
- firmware_size = sizeof(dsp_dec2000t);
-#endif
firmware_csum = 0x1bc86100;
break;
case TTUSB_DEC3000S:
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- firmware = &dsp_dec3000s[0];
- firmware_size = sizeof(dsp_dec3000s);
-#endif
firmware_csum = 0x00000000;
break;
}
dvb_unregister_frontend(dec->frontend_ioctl, &dec->i2c_bus);
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void *ttusb_dec_probe(struct usb_device *udev, unsigned int ifnum,
- const struct usb_device_id *id)
-{
- struct ttusb_dec *dec;
-
- dprintk("%s\n", __FUNCTION__);
-
- if (ifnum != 0)
- return NULL;
-
- if (!(dec = kmalloc(sizeof(struct ttusb_dec), GFP_KERNEL))) {
- printk("%s: couldn't allocate memory.\n", __FUNCTION__);
- return NULL;
- }
-#else
static int ttusb_dec_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
}
usb_set_intfdata(intf, (void *)dec);
-#endif
memset(dec, 0, sizeof(struct ttusb_dec));
dec->active = 1;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- return (void *)dec;
-#else
ttusb_dec_set_streaming_interface(dec);
return 0;
-#endif
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void ttusb_dec_disconnect(struct usb_device *udev, void *data)
-{
- struct ttusb_dec *dec = data;
-#else
static void ttusb_dec_disconnect(struct usb_interface *intf)
{
struct ttusb_dec *dec = usb_get_intfdata(intf);
usb_set_intfdata(intf, NULL);
-#endif
dprintk("%s\n", __FUNCTION__);
--- /dev/null
+#include <linux/module.h>
+#include <linux/vermagic.h>
+#include <linux/compiler.h>
+
+MODULE_INFO(vermagic, VERMAGIC_STRING);
+
+static const char __module_depends[]
+__attribute_used__
+__attribute__((section(".modinfo"))) =
+"depends=dvb-core";
+
+MODULE_ALIAS("usb:v0B48p1006dl*dh*dc*dsc*dp*ic*isc*ip*");
+MODULE_ALIAS("usb:v0B48p1008dl*dh*dc*dsc*dp*ic*isc*ip*");