20 #include <linux/kernel.h>
21 #include <linux/errno.h>
23 #include <linux/slab.h>
24 #include <linux/module.h>
43 static int fw_upload = 1;
47 static int pid_filtering;
51 static int ts_auto_disable;
53 MODULE_PARM_DESC(ts_auto_disable,
"Stream Auto Enable on FW (default: off)");
70 if (bus_adap->
ops->stop_stream !=
NULL)
71 bus_adap->
ops->stop_stream(dev);
73 if (ts_auto_disable) {
84 static int as102_start_stream(
struct as102_dev_t *dev)
94 if (bus_adap->
ops->start_stream !=
NULL)
95 ret = bus_adap->
ops->start_stream(dev);
97 if (ts_auto_disable) {
109 static int as10x_pid_filter(
struct as102_dev_t *dev,
118 dprintk(
debug,
"mutex_lock_interruptible(lock) failed !\n");
125 dprintk(
debug,
"DEL_PID_FILTER([%02d] 0x%04x) ret = %d\n",
137 dprintk(
debug,
"ADD_PID_FILTER([%02d -> %02d], 0x%04x) ret = %d\n",
149 static int as102_dvb_dmx_start_feed(
struct dvb_demux_feed *dvbdmxfeed)
161 as10x_pid_filter(as102_dev, dvbdmxfeed->
index,
165 ret = as102_start_stream(as102_dev);
172 static int as102_dvb_dmx_stop_feed(
struct dvb_demux_feed *dvbdmxfeed)
183 as102_stop_stream(as102_dev);
186 as10x_pid_filter(as102_dev, dvbdmxfeed->
index,
203 dev_err(dev,
"%s: dvb_register_adapter() failed: %d\n",
208 as102_dev->
dvb_dmx.priv = as102_dev;
209 as102_dev->
dvb_dmx.filternum = pid_filtering ? 16 : 256;
210 as102_dev->
dvb_dmx.feednum = 256;
211 as102_dev->
dvb_dmx.start_feed = as102_dvb_dmx_start_feed;
212 as102_dev->
dvb_dmx.stop_feed = as102_dvb_dmx_stop_feed;
223 dev_err(dev,
"%s: dvb_dmx_init() failed: %d\n", __func__, ret);
229 dev_err(dev,
"%s: dvb_dmxdev_init() failed: %d\n",
236 dev_err(dev,
"%s: as102_dvb_register_frontend() failed: %d",
279 pr_info(
"Unregistered device %s", as102_dev->
name);