summaryrefslogtreecommitdiffstats
path: root/src/af903x-devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/af903x-devices.c')
-rw-r--r--src/af903x-devices.c141
1 files changed, 91 insertions, 50 deletions
diff --git a/src/af903x-devices.c b/src/af903x-devices.c
index e7ecfd4..3df9fde 100644
--- a/src/af903x-devices.c
+++ b/src/af903x-devices.c
@@ -1,5 +1,9 @@
#include "af903x.h"
+static int dvb_usb_af903x_disable_rc = 1;
+module_param_named(disable_rc, dvb_usb_af903x_disable_rc, int, 0644);
+MODULE_PARM_DESC(disable_rc, "disable rc");
+
bool DevicePower;
static int af903x_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff)
{
@@ -75,7 +79,7 @@ static int af903x_identify_state(struct usb_device *udev, struct dvb_usb_device_
static int af903x_frontend_attach(struct dvb_usb_adapter *adap)
{
deb_data("- Enter %s Function - chip=%d\n", __FUNCTION__, adap->id);
- adap->fe_adap[0].fe = af903x_attach(1);
+ adap->fe_adap[0].fe = af903x_attach(1);
return adap->fe_adap[0].fe == NULL ? -ENODEV : 0;
}
@@ -98,35 +102,40 @@ static int af903x_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
struct usb_device_id af903x_usb_id_table[] = {
- { USB_DEVICE(0x15A4,0x1000) },
- { USB_DEVICE(0x15A4,0x1001) },
- { USB_DEVICE(0x15A4,0x1002) },
- { USB_DEVICE(0x15A4,0x1003) },
- { USB_DEVICE(0x15A4,0x9035) },
- { USB_DEVICE(USB_VID_ASUS, USB_PID_ASUS_U3100MINI_PLUS) },
- { 0}, /* Terminating entry */
+ { USB_DEVICE(0x15A4,0x1000) },
+ { USB_DEVICE(0x15A4,0x1001) },
+ { USB_DEVICE(0x15A4,0x1002) },
+ { USB_DEVICE(0x15A4,0x1003) },
+ { USB_DEVICE(0x15A4,0x9035) },
+ { USB_DEVICE(USB_VID_ASUS, USB_PID_ASUS_U3100MINI) },
+ { 0}, /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, af903x_usb_id_table);
-struct dvb_usb_device_properties af903x_properties[] = {
- {
- .usb_ctrl = DEVICE_SPECIFIC,
- .download_firmware = af903x_download_firmware,
- .no_reconnect = 1,
- .power_ctrl = af903x_powerctrl,
- .identify_state = af903x_identify_state,
- .num_adapters = 1,
+struct dvb_usb_device_properties af903x_properties[] = {{
+ .usb_ctrl = DEVICE_SPECIFIC,
+ .download_firmware = af903x_download_firmware,
+ .no_reconnect = 1,
+ .power_ctrl = af903x_powerctrl,
+ .identify_state = af903x_identify_state,
+ .num_adapters = 2,
.adapter = {
{
- .fe[0].caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
- .fe[0].pid_filter_count = 32,
- .fe[0].pid_filter = af903x_pid_filter,
- .fe[0].pid_filter_ctrl = af903x_pid_filter_ctrl,
- .fe[0].frontend_attach = af903x_frontend_attach,
- .fe[0].tuner_attach = af903x_tuner_attach,
- .fe[0].streaming_ctrl = af903x_streaming_ctrl,
- .fe[0].stream = {
+
+ .num_frontends = 1,
+ .fe = {{
+
+ .caps = DVB_USB_ADAP_HAS_PID_FILTER |
+ DVB_USB_ADAP_NEED_PID_FILTERING |
+ DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
+ .pid_filter_count = 32,
+ .pid_filter = af903x_pid_filter,
+ .pid_filter_ctrl = af903x_pid_filter_ctrl,
+ .frontend_attach = af903x_frontend_attach,
+ .tuner_attach = af903x_tuner_attach,
+ .streaming_ctrl = af903x_streaming_ctrl,
+ .stream = {
.type = USB_BULK,
.count = 4,
.endpoint = 0x84,
@@ -136,33 +145,65 @@ struct dvb_usb_device_properties af903x_properties[] = {
}
}
}
- }
- },
- .num_device_descs = 2,
- .devices = {
+
+ }},
+
+ },
{
- "ITEtech USB2.0 DVB-T Receiver", {
- &af903x_usb_id_table[0],
- &af903x_usb_id_table[1],
- &af903x_usb_id_table[2],
- &af903x_usb_id_table[3],
- &af903x_usb_id_table[4],
- NULL
- }, {
- NULL
- }
- }, {
- "Asus U3100MINI_PLUS/T/RC Receiver", {
- &af903x_usb_id_table[5],
- NULL
- }, {
- NULL
+
+ .num_frontends = 1,
+ .fe = {{
+
+ .caps = DVB_USB_ADAP_HAS_PID_FILTER |
+ DVB_USB_ADAP_NEED_PID_FILTERING |
+ DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
+ .pid_filter_count = 32,
+ .pid_filter = af903x_pid_filter,
+ .pid_filter_ctrl = af903x_pid_filter_ctrl,
+ .frontend_attach = af903x_frontend_attach,
+ .tuner_attach = af903x_tuner_attach,
+ .streaming_ctrl = af903x_streaming_ctrl,
+ .stream = {
+ .type = USB_BULK,
+ .count = 4,
+ .endpoint = 0x85,
+ .u = {
+ .bulk = {
+ .buffersize = 65424,
+ }
+ }
}
- }, {
- NULL
- }
- }
- }
-};
+
+ }},
+
+ },
+ },
+// .rc.core = {
+// .protocol = RC_TYPE_NEC,
+// .module_name = "af903x",
+// .rc_query = af903x_rc_query,
+// .rc_interval = AF903X_POLL,
+// .allowed_protos = RC_TYPE_NEC,
+// .rc_codes = NULL, /* will be set in
+// af903x_identify_state */
+// },
+ .num_device_descs = 2,
+ .devices = {
+ {"ITEtech USB2.0 DVB-T Receiver",
+ {&af903x_usb_id_table[0],
+ &af903x_usb_id_table[1],
+ &af903x_usb_id_table[2],
+ &af903x_usb_id_table[3],
+ &af903x_usb_id_table[4],
+ NULL},
+ {NULL},
+ }, {"Asus U3100MINI_PLUS/T/RC Receiver",
+ {&af903x_usb_id_table[5],
+ NULL},
+ {NULL},
+ }, {NULL},
+ }
+
+}};
int af903x_device_count = ARRAY_SIZE(af903x_properties);