1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Abilis Systems Single DVB-T Receiver
4 * Copyright (C) 2008 Pierrick Hascoet <pierrick.hascoet@abilis.com>
10 #include <media/dvb_demux.h>
11 #include <media/dvb_frontend.h>
12 #include <media/dmxdev.h>
13 #include "as10x_handle.h"
14 #include "as10x_cmd.h"
15 #include "as102_usb_drv.h"
17 #define DRIVER_FULL_NAME "Abilis Systems as10x usb driver"
18 #define DRIVER_NAME "as10x_usb"
20 #define debug as102_debug
21 extern struct usb_driver as102_usb_driver
;
22 extern int elna_enable
;
24 #define AS102_DEVICE_MAJOR 192
26 #define AS102_USB_BUF_SIZE 512
27 #define MAX_STREAM_URB 32
29 struct as10x_bus_adapter_t
{
30 struct usb_device
*usb_dev
;
33 /* low level interface for bus adapter */
34 union as10x_bus_token_t
{
36 struct as10x_usb_token_cmd_t usb
;
39 /* token cmd xfer id */
42 /* as10x command and response for dvb interface*/
43 struct as10x_cmd_t
*cmd
, *rsp
;
45 /* bus adapter private ops callback */
46 const struct as102_priv_ops_t
*ops
;
51 struct as10x_bus_adapter_t bus_adap
;
52 struct list_head device_entry
;
56 struct dvb_adapter dvb_adap
;
57 struct dvb_frontend
*dvb_fe
;
58 struct dvb_demux dvb_dmx
;
59 struct dmxdev dvb_dmxdev
;
61 /* timer handle to trig ts stream download */
62 struct timer_list timer_handle
;
68 struct urb
*stream_urb
[MAX_STREAM_URB
];
71 int as102_dvb_register(struct as102_dev_t
*dev
);
72 void as102_dvb_unregister(struct as102_dev_t
*dev
);