Lines Matching full:fc
47 struct flexcop_device *fc = dvbdmxfeed->demux->priv; in flexcop_dvb_start_feed() local
48 return flexcop_pid_feed_control(fc, dvbdmxfeed, 1); in flexcop_dvb_start_feed()
53 struct flexcop_device *fc = dvbdmxfeed->demux->priv; in flexcop_dvb_stop_feed() local
54 return flexcop_pid_feed_control(fc, dvbdmxfeed, 0); in flexcop_dvb_stop_feed()
57 static int flexcop_dvb_init(struct flexcop_device *fc) in flexcop_dvb_init() argument
59 int ret = dvb_register_adapter(&fc->dvb_adapter, in flexcop_dvb_init()
60 "FlexCop Digital TV device", fc->owner, in flexcop_dvb_init()
61 fc->dev, adapter_nr); in flexcop_dvb_init()
66 fc->dvb_adapter.priv = fc; in flexcop_dvb_init()
68 fc->demux.dmx.capabilities = (DMX_TS_FILTERING | DMX_SECTION_FILTERING in flexcop_dvb_init()
70 fc->demux.priv = fc; in flexcop_dvb_init()
71 fc->demux.filternum = fc->demux.feednum = FC_MAX_FEED; in flexcop_dvb_init()
72 fc->demux.start_feed = flexcop_dvb_start_feed; in flexcop_dvb_init()
73 fc->demux.stop_feed = flexcop_dvb_stop_feed; in flexcop_dvb_init()
74 fc->demux.write_to_decoder = NULL; in flexcop_dvb_init()
76 ret = dvb_dmx_init(&fc->demux); in flexcop_dvb_init()
82 fc->hw_frontend.source = DMX_FRONTEND_0; in flexcop_dvb_init()
84 fc->dmxdev.filternum = fc->demux.feednum; in flexcop_dvb_init()
85 fc->dmxdev.demux = &fc->demux.dmx; in flexcop_dvb_init()
86 fc->dmxdev.capabilities = 0; in flexcop_dvb_init()
87 ret = dvb_dmxdev_init(&fc->dmxdev, &fc->dvb_adapter); in flexcop_dvb_init()
93 ret = fc->demux.dmx.add_frontend(&fc->demux.dmx, &fc->hw_frontend); in flexcop_dvb_init()
99 fc->mem_frontend.source = DMX_MEMORY_FE; in flexcop_dvb_init()
100 ret = fc->demux.dmx.add_frontend(&fc->demux.dmx, &fc->mem_frontend); in flexcop_dvb_init()
106 ret = fc->demux.dmx.connect_frontend(&fc->demux.dmx, &fc->hw_frontend); in flexcop_dvb_init()
112 ret = dvb_net_init(&fc->dvb_adapter, &fc->dvbnet, &fc->demux.dmx); in flexcop_dvb_init()
118 fc->init_state |= FC_STATE_DVB_INIT; in flexcop_dvb_init()
122 fc->demux.dmx.disconnect_frontend(&fc->demux.dmx); in flexcop_dvb_init()
124 fc->demux.dmx.remove_frontend(&fc->demux.dmx, &fc->mem_frontend); in flexcop_dvb_init()
126 fc->demux.dmx.remove_frontend(&fc->demux.dmx, &fc->hw_frontend); in flexcop_dvb_init()
128 dvb_dmxdev_release(&fc->dmxdev); in flexcop_dvb_init()
130 dvb_dmx_release(&fc->demux); in flexcop_dvb_init()
132 dvb_unregister_adapter(&fc->dvb_adapter); in flexcop_dvb_init()
136 static void flexcop_dvb_exit(struct flexcop_device *fc) in flexcop_dvb_exit() argument
138 if (fc->init_state & FC_STATE_DVB_INIT) { in flexcop_dvb_exit()
139 dvb_net_release(&fc->dvbnet); in flexcop_dvb_exit()
141 fc->demux.dmx.close(&fc->demux.dmx); in flexcop_dvb_exit()
142 fc->demux.dmx.remove_frontend(&fc->demux.dmx, in flexcop_dvb_exit()
143 &fc->mem_frontend); in flexcop_dvb_exit()
144 fc->demux.dmx.remove_frontend(&fc->demux.dmx, in flexcop_dvb_exit()
145 &fc->hw_frontend); in flexcop_dvb_exit()
146 dvb_dmxdev_release(&fc->dmxdev); in flexcop_dvb_exit()
147 dvb_dmx_release(&fc->demux); in flexcop_dvb_exit()
148 dvb_unregister_adapter(&fc->dvb_adapter); in flexcop_dvb_exit()
151 fc->init_state &= ~FC_STATE_DVB_INIT; in flexcop_dvb_exit()
156 void flexcop_pass_dmx_data(struct flexcop_device *fc, u8 *buf, u32 len) in flexcop_pass_dmx_data() argument
158 dvb_dmx_swfilter(&fc->demux, buf, len); in flexcop_pass_dmx_data()
162 void flexcop_pass_dmx_packets(struct flexcop_device *fc, u8 *buf, u32 no) in flexcop_pass_dmx_packets() argument
164 dvb_dmx_swfilter_packets(&fc->demux, buf, no); in flexcop_pass_dmx_packets()
168 static void flexcop_reset(struct flexcop_device *fc) in flexcop_reset() argument
173 fc->write_ibi_reg(fc,ctrl_208,ibi_zero); in flexcop_reset()
186 fc->write_ibi_reg(fc,sw_reset_210,v210); in flexcop_reset()
191 v204 = fc->read_ibi_reg(fc,misc_204); in flexcop_reset()
193 fc->write_ibi_reg(fc,misc_204,v204); in flexcop_reset()
196 fc->write_ibi_reg(fc,misc_204,v204); in flexcop_reset()
199 void flexcop_reset_block_300(struct flexcop_device *fc) in flexcop_reset_block_300() argument
201 flexcop_ibi_value v208_save = fc->read_ibi_reg(fc, ctrl_208), in flexcop_reset_block_300()
202 v210 = fc->read_ibi_reg(fc, sw_reset_210); in flexcop_reset_block_300()
205 fc->write_ibi_reg(fc,ctrl_208,ibi_zero); in flexcop_reset_block_300()
210 fc->write_ibi_reg(fc,sw_reset_210,v210); in flexcop_reset_block_300()
211 fc->write_ibi_reg(fc,ctrl_208,v208_save); in flexcop_reset_block_300()
217 struct flexcop_device *fc = kzalloc(sizeof(struct flexcop_device), in flexcop_device_kmalloc() local
219 if (!fc) { in flexcop_device_kmalloc()
227 kfree(fc); in flexcop_device_kmalloc()
231 fc->bus_specific = bus; in flexcop_device_kmalloc()
233 return fc; in flexcop_device_kmalloc()
237 void flexcop_device_kfree(struct flexcop_device *fc) in flexcop_device_kfree() argument
239 kfree(fc->bus_specific); in flexcop_device_kfree()
240 kfree(fc); in flexcop_device_kfree()
244 int flexcop_device_initialize(struct flexcop_device *fc) in flexcop_device_initialize() argument
249 flexcop_reset(fc); in flexcop_device_initialize()
250 flexcop_determine_revision(fc); in flexcop_device_initialize()
251 flexcop_sram_init(fc); in flexcop_device_initialize()
252 flexcop_hw_filter_init(fc); in flexcop_device_initialize()
253 flexcop_smc_ctrl(fc, 0); in flexcop_device_initialize()
255 ret = flexcop_dvb_init(fc); in flexcop_device_initialize()
261 ret = flexcop_i2c_init(fc); in flexcop_device_initialize()
266 if (fc->get_mac_addr(fc, 0) == 0) { in flexcop_device_initialize()
267 u8 *b = fc->dvb_adapter.proposed_mac; in flexcop_device_initialize()
269 flexcop_set_mac_filter(fc,b); in flexcop_device_initialize()
270 flexcop_mac_filter_ctrl(fc,1); in flexcop_device_initialize()
274 ret = flexcop_frontend_init(fc); in flexcop_device_initialize()
278 flexcop_device_name(fc,"initialization of","complete"); in flexcop_device_initialize()
282 flexcop_device_exit(fc); in flexcop_device_initialize()
287 void flexcop_device_exit(struct flexcop_device *fc) in flexcop_device_exit() argument
289 flexcop_frontend_exit(fc); in flexcop_device_exit()
290 flexcop_i2c_exit(fc); in flexcop_device_exit()
291 flexcop_dvb_exit(fc); in flexcop_device_exit()