2 * Abilis Systems Single DVB-T Receiver
3 * Copyright (C) 2008 Pierrick Hascoet <pierrick.hascoet@abilis.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
18 #include <linux/usb.h>
19 #include <dvb_demux.h>
20 #include <dvb_frontend.h>
22 #include "as10x_handle.h"
23 #include "as10x_cmd.h"
24 #include "as102_usb_drv.h"
26 #define DRIVER_FULL_NAME "Abilis Systems as10x usb driver"
27 #define DRIVER_NAME "as10x_usb"
29 #define debug as102_debug
30 extern struct usb_driver as102_usb_driver;
31 extern int elna_enable;
33 #define AS102_DEVICE_MAJOR 192
35 #define AS102_USB_BUF_SIZE 512
36 #define MAX_STREAM_URB 32
38 struct as10x_bus_adapter_t {
39 struct usb_device *usb_dev;
42 /* low level interface for bus adapter */
43 union as10x_bus_token_t {
45 struct as10x_usb_token_cmd_t usb;
48 /* token cmd xfer id */
51 /* as10x command and response for dvb interface*/
52 struct as10x_cmd_t *cmd, *rsp;
54 /* bus adapter private ops callback */
55 struct as102_priv_ops_t *ops;
60 struct as10x_bus_adapter_t bus_adap;
61 struct list_head device_entry;
65 struct dvb_adapter dvb_adap;
66 struct dvb_frontend *dvb_fe;
67 struct dvb_demux dvb_dmx;
68 struct dmxdev dvb_dmxdev;
70 /* timer handle to trig ts stream download */
71 struct timer_list timer_handle;
77 struct urb *stream_urb[MAX_STREAM_URB];
80 int as102_dvb_register(struct as102_dev_t *dev);
81 void as102_dvb_unregister(struct as102_dev_t *dev);