20 #include <linux/kernel.h>
21 #include <linux/bitops.h>
23 #include <linux/signal.h>
24 #include <linux/sched.h>
26 #include <linux/pci.h>
27 #include <linux/i2c.h>
89 static int mantis_frontend_shutdown(
struct mantis_pci *mantis)
103 static int mantis_dvb_start_feed(
struct dvb_demux_feed *dvbdmxfeed)
109 if (!dvbdmx->
dmx.frontend) {
117 if (mantis->
feeds == 1) {
120 tasklet_enable(&mantis->
tasklet);
123 return mantis->
feeds;
126 static int mantis_dvb_stop_feed(
struct dvb_demux_feed *dvbdmxfeed)
132 if (!dvbdmx->
dmx.frontend) {
138 if (mantis->
feeds == 0) {
140 tasklet_disable(&mantis->
tasklet);
155 "Mantis DVB adapter",
171 mantis->
demux.priv = mantis;
172 mantis->
demux.filternum = 256;
173 mantis->
demux.feednum = 256;
174 mantis->
demux.start_feed = mantis_dvb_start_feed;
175 mantis->
demux.stop_feed = mantis_dvb_stop_feed;
186 mantis->
dmxdev.filternum = 256;
188 mantis->
dmxdev.capabilities = 0;
199 result = mantis->
demux.dmx.add_frontend(&mantis->
demux.dmx, &mantis->
fe_hw);
207 result = mantis->
demux.dmx.add_frontend(&mantis->
demux.dmx, &mantis->
fe_mem);
213 result = mantis->
demux.dmx.connect_frontend(&mantis->
demux.dmx, &mantis->
fe_hw);
221 tasklet_disable(&mantis->tasklet);
222 if (mantis->hwconfig) {
228 if (mantis->fe ==
NULL) {
236 if (mantis->fe->ops.release)
237 mantis->fe->ops.release(mantis->fe);
256 mantis->demux.dmx.remove_frontend(&mantis->demux.dmx, &mantis->fe_mem);
259 mantis->demux.dmx.remove_frontend(&mantis->demux.dmx, &mantis->fe_hw);
280 err = mantis_frontend_shutdown(mantis);