• Home
  • Raw
  • Download

Lines Matching refs:dvb

159 			dvb_dmx_swfilter(&dev->dvb->demux, urb->transfer_buffer,  in em28xx_dvb_urb_data_copy()
168 dvb_dmx_swfilter(&dev->dvb->demux, in em28xx_dvb_urb_data_copy()
178 static int em28xx_start_streaming(struct em28xx_dvb *dvb) in em28xx_start_streaming() argument
181 struct em28xx_i2c_bus *i2c_bus = dvb->adapter.priv; in em28xx_start_streaming()
219 static int em28xx_stop_streaming(struct em28xx_dvb *dvb) in em28xx_stop_streaming() argument
221 struct em28xx_i2c_bus *i2c_bus = dvb->adapter.priv; in em28xx_stop_streaming()
232 struct em28xx_dvb *dvb = demux->priv; in em28xx_start_feed() local
238 mutex_lock(&dvb->lock); in em28xx_start_feed()
239 dvb->nfeeds++; in em28xx_start_feed()
240 rc = dvb->nfeeds; in em28xx_start_feed()
242 if (dvb->nfeeds == 1) { in em28xx_start_feed()
243 ret = em28xx_start_streaming(dvb); in em28xx_start_feed()
248 mutex_unlock(&dvb->lock); in em28xx_start_feed()
255 struct em28xx_dvb *dvb = demux->priv; in em28xx_stop_feed() local
258 mutex_lock(&dvb->lock); in em28xx_stop_feed()
259 dvb->nfeeds--; in em28xx_stop_feed()
261 if (0 == dvb->nfeeds) in em28xx_stop_feed()
262 err = em28xx_stop_streaming(dvb); in em28xx_stop_feed()
264 mutex_unlock(&dvb->lock); in em28xx_stop_feed()
273 struct em28xx_i2c_bus *i2c_bus = fe->dvb->priv; in em28xx_dvb_bus_ctrl()
403 struct em28xx_dvb *dvb = fe->sec_priv; in drxk_gate_ctrl() local
406 if (!dvb) in drxk_gate_ctrl()
410 down(&dvb->pll_mutex); in drxk_gate_ctrl()
411 status = dvb->gate_ctrl(fe, 1); in drxk_gate_ctrl()
413 status = dvb->gate_ctrl(fe, 0); in drxk_gate_ctrl()
414 up(&dvb->pll_mutex); in drxk_gate_ctrl()
676 struct em28xx *dev = fe->dvb->priv; in em28xx_pctv_290e_set_lna()
678 struct em28xx_dvb *dvb = dev->dvb; in em28xx_pctv_290e_set_lna() local
687 ret = gpio_request_one(dvb->lna_gpio, flags, NULL); in em28xx_pctv_290e_set_lna()
691 gpio_free(dvb->lna_gpio); in em28xx_pctv_290e_set_lna()
803 if (!dev->dvb->fe[0]) { in em28xx_attach_xc3028()
809 fe = dvb_attach(xc2028_attach, dev->dvb->fe[0], &cfg); in em28xx_attach_xc3028()
812 dvb_frontend_detach(dev->dvb->fe[0]); in em28xx_attach_xc3028()
813 dev->dvb->fe[0] = NULL; in em28xx_attach_xc3028()
824 static int em28xx_register_dvb(struct em28xx_dvb *dvb, struct module *module, in em28xx_register_dvb() argument
829 mutex_init(&dvb->lock); in em28xx_register_dvb()
832 result = dvb_register_adapter(&dvb->adapter, dev->name, module, device, in em28xx_register_dvb()
841 dvb->fe[0]->ops.ts_bus_ctrl = em28xx_dvb_bus_ctrl; in em28xx_register_dvb()
842 if (dvb->fe[1]) in em28xx_register_dvb()
843 dvb->fe[1]->ops.ts_bus_ctrl = em28xx_dvb_bus_ctrl; in em28xx_register_dvb()
845 dvb->adapter.priv = &dev->i2c_bus[dev->def_i2c_bus]; in em28xx_register_dvb()
848 result = dvb_register_frontend(&dvb->adapter, dvb->fe[0]); in em28xx_register_dvb()
856 if (dvb->fe[1]) { in em28xx_register_dvb()
857 result = dvb_register_frontend(&dvb->adapter, dvb->fe[1]); in em28xx_register_dvb()
866 dvb->demux.dmx.capabilities = in em28xx_register_dvb()
869 dvb->demux.priv = dvb; in em28xx_register_dvb()
870 dvb->demux.filternum = 256; in em28xx_register_dvb()
871 dvb->demux.feednum = 256; in em28xx_register_dvb()
872 dvb->demux.start_feed = em28xx_start_feed; in em28xx_register_dvb()
873 dvb->demux.stop_feed = em28xx_stop_feed; in em28xx_register_dvb()
875 result = dvb_dmx_init(&dvb->demux); in em28xx_register_dvb()
882 dvb->dmxdev.filternum = 256; in em28xx_register_dvb()
883 dvb->dmxdev.demux = &dvb->demux.dmx; in em28xx_register_dvb()
884 dvb->dmxdev.capabilities = 0; in em28xx_register_dvb()
885 result = dvb_dmxdev_init(&dvb->dmxdev, &dvb->adapter); in em28xx_register_dvb()
892 dvb->fe_hw.source = DMX_FRONTEND_0; in em28xx_register_dvb()
893 result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_hw); in em28xx_register_dvb()
900 dvb->fe_mem.source = DMX_MEMORY_FE; in em28xx_register_dvb()
901 result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_mem); in em28xx_register_dvb()
908 result = dvb->demux.dmx.connect_frontend(&dvb->demux.dmx, &dvb->fe_hw); in em28xx_register_dvb()
916 dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx); in em28xx_register_dvb()
920 dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem); in em28xx_register_dvb()
922 dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw); in em28xx_register_dvb()
924 dvb_dmxdev_release(&dvb->dmxdev); in em28xx_register_dvb()
926 dvb_dmx_release(&dvb->demux); in em28xx_register_dvb()
928 if (dvb->fe[1]) in em28xx_register_dvb()
929 dvb_unregister_frontend(dvb->fe[1]); in em28xx_register_dvb()
930 dvb_unregister_frontend(dvb->fe[0]); in em28xx_register_dvb()
932 if (dvb->fe[1]) in em28xx_register_dvb()
933 dvb_frontend_detach(dvb->fe[1]); in em28xx_register_dvb()
935 dvb_frontend_detach(dvb->fe[0]); in em28xx_register_dvb()
936 dvb_unregister_adapter(&dvb->adapter); in em28xx_register_dvb()
941 static void em28xx_unregister_dvb(struct em28xx_dvb *dvb) in em28xx_unregister_dvb() argument
943 dvb_net_release(&dvb->net); in em28xx_unregister_dvb()
944 dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem); in em28xx_unregister_dvb()
945 dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw); in em28xx_unregister_dvb()
946 dvb_dmxdev_release(&dvb->dmxdev); in em28xx_unregister_dvb()
947 dvb_dmx_release(&dvb->demux); in em28xx_unregister_dvb()
948 if (dvb->fe[1]) in em28xx_unregister_dvb()
949 dvb_unregister_frontend(dvb->fe[1]); in em28xx_unregister_dvb()
950 dvb_unregister_frontend(dvb->fe[0]); in em28xx_unregister_dvb()
951 if (dvb->fe[1] && !dvb->dont_attach_fe1) in em28xx_unregister_dvb()
952 dvb_frontend_detach(dvb->fe[1]); in em28xx_unregister_dvb()
953 dvb_frontend_detach(dvb->fe[0]); in em28xx_unregister_dvb()
954 dvb_unregister_adapter(&dvb->adapter); in em28xx_unregister_dvb()
960 struct em28xx_dvb *dvb; in em28xx_dvb_init() local
968 dvb = kzalloc(sizeof(struct em28xx_dvb), GFP_KERNEL); in em28xx_dvb_init()
970 if (dvb == NULL) { in em28xx_dvb_init()
974 dev->dvb = dvb; in em28xx_dvb_init()
975 dvb->fe[0] = dvb->fe[1] = NULL; in em28xx_dvb_init()
982 dvb->fe[0] = dvb_attach(s921_attach, in em28xx_dvb_init()
985 if (!dvb->fe[0]) { in em28xx_dvb_init()
995 dvb->fe[0] = dvb_attach(lgdt330x_attach, in em28xx_dvb_init()
1004 dvb->fe[0] = dvb_attach(zl10353_attach, in em28xx_dvb_init()
1015 dvb->fe[0] = dvb_attach(zl10353_attach, in em28xx_dvb_init()
1028 dvb->fe[0] = dvb_attach(zl10353_attach, in em28xx_dvb_init()
1031 if (dvb->fe[0] == NULL) { in em28xx_dvb_init()
1034 dvb->fe[0] = dvb_attach(mt352_attach, in em28xx_dvb_init()
1045 dvb->fe[0] = dvb_attach(zl10353_attach, in em28xx_dvb_init()
1048 if (dvb->fe[0] != NULL) in em28xx_dvb_init()
1049 dvb_attach(qt1010_attach, dvb->fe[0], in em28xx_dvb_init()
1054 dvb->fe[0] = dvb_attach(s5h1409_attach, in em28xx_dvb_init()
1063 dvb->fe[0] = dvb_attach(lgdt330x_attach, in em28xx_dvb_init()
1066 if (dvb->fe[0] != NULL) { in em28xx_dvb_init()
1067 if (!dvb_attach(simple_tuner_attach, dvb->fe[0], in em28xx_dvb_init()
1076 dvb->fe[0] = dvb_attach(drxd_attach, &em28xx_drxd, NULL, in em28xx_dvb_init()
1085 dvb->fe[0] = dvb_attach(tda10023_attach, in em28xx_dvb_init()
1088 if (dvb->fe[0]) { in em28xx_dvb_init()
1089 if (!dvb_attach(simple_tuner_attach, dvb->fe[0], in em28xx_dvb_init()
1097 dvb->fe[0] = dvb_attach(lgdt3305_attach, in em28xx_dvb_init()
1100 if (dvb->fe[0] != NULL) in em28xx_dvb_init()
1101 dvb_attach(tda18271_attach, dvb->fe[0], 0x60, in em28xx_dvb_init()
1106 dvb->lna_gpio = CXD2820R_GPIO_E | CXD2820R_GPIO_O | in em28xx_dvb_init()
1108 dvb->fe[0] = dvb_attach(cxd2820r_attach, in em28xx_dvb_init()
1111 &dvb->lna_gpio); in em28xx_dvb_init()
1112 if (dvb->fe[0]) { in em28xx_dvb_init()
1115 dvb->fe[0], in em28xx_dvb_init()
1120 dvb_frontend_detach(dvb->fe[0]); in em28xx_dvb_init()
1127 result = gpio_request_one(dvb->lna_gpio, in em28xx_dvb_init()
1133 gpio_free(dvb->lna_gpio); in em28xx_dvb_init()
1137 dvb->fe[0]->ops.set_lna = em28xx_pctv_290e_set_lna; in em28xx_dvb_init()
1146 dvb->fe[0] = dvb_attach(drxk_attach, in em28xx_dvb_init()
1148 if (!dvb->fe[0]) { in em28xx_dvb_init()
1153 dvb->fe[0]->sec_priv = dvb; in em28xx_dvb_init()
1154 sema_init(&dvb->pll_mutex, 1); in em28xx_dvb_init()
1155 dvb->gate_ctrl = dvb->fe[0]->ops.i2c_gate_ctrl; in em28xx_dvb_init()
1156 dvb->fe[0]->ops.i2c_gate_ctrl = drxk_gate_ctrl; in em28xx_dvb_init()
1163 if (dvb->fe[0]->ops.i2c_gate_ctrl) in em28xx_dvb_init()
1164 dvb->fe[0]->ops.i2c_gate_ctrl(dvb->fe[0], 1); in em28xx_dvb_init()
1165 if (!dvb_attach(xc5000_attach, dvb->fe[0], &dev->i2c_adap[dev->def_i2c_bus], in em28xx_dvb_init()
1170 if (dvb->fe[0]->ops.i2c_gate_ctrl) in em28xx_dvb_init()
1171 dvb->fe[0]->ops.i2c_gate_ctrl(dvb->fe[0], 0); in em28xx_dvb_init()
1178 dvb->fe[0] = dvb_attach(drxk_attach, &terratec_h5_drxk, &dev->i2c_adap[dev->def_i2c_bus]); in em28xx_dvb_init()
1179 if (!dvb->fe[0]) { in em28xx_dvb_init()
1184 dvb->fe[0]->sec_priv = dvb; in em28xx_dvb_init()
1185 sema_init(&dvb->pll_mutex, 1); in em28xx_dvb_init()
1186 dvb->gate_ctrl = dvb->fe[0]->ops.i2c_gate_ctrl; in em28xx_dvb_init()
1187 dvb->fe[0]->ops.i2c_gate_ctrl = drxk_gate_ctrl; in em28xx_dvb_init()
1190 if (dvb->fe[0]->ops.i2c_gate_ctrl) in em28xx_dvb_init()
1191 dvb->fe[0]->ops.i2c_gate_ctrl(dvb->fe[0], 1); in em28xx_dvb_init()
1192 if (!dvb_attach(tda18271c2dd_attach, dvb->fe[0], &dev->i2c_adap[dev->def_i2c_bus], 0x60)) { in em28xx_dvb_init()
1196 if (dvb->fe[0]->ops.i2c_gate_ctrl) in em28xx_dvb_init()
1197 dvb->fe[0]->ops.i2c_gate_ctrl(dvb->fe[0], 0); in em28xx_dvb_init()
1201 dvb->fe[0] = dvb_attach(mb86a20s_attach, in em28xx_dvb_init()
1204 if (dvb->fe[0] != NULL) in em28xx_dvb_init()
1205 dvb_attach(tda18271_attach, dvb->fe[0], 0x60, in em28xx_dvb_init()
1211 dvb->fe[0] = dvb_attach(tda10071_attach, in em28xx_dvb_init()
1215 if (dvb->fe[0]) in em28xx_dvb_init()
1216 dvb_attach(a8293_attach, dvb->fe[0], &dev->i2c_adap[dev->def_i2c_bus], in em28xx_dvb_init()
1221 dvb->fe[0] = dvb_attach(drxk_attach, &maxmedia_ub425_tc_drxk, in em28xx_dvb_init()
1224 if (dvb->fe[0]) { in em28xx_dvb_init()
1226 dvb->fe[0]->ops.i2c_gate_ctrl = NULL; in em28xx_dvb_init()
1229 if (!dvb_attach(tda18271c2dd_attach, dvb->fe[0], in em28xx_dvb_init()
1231 dvb_frontend_detach(dvb->fe[0]); in em28xx_dvb_init()
1247 dvb->fe[0] = dvb_attach(drxk_attach, &pctv_520e_drxk, in em28xx_dvb_init()
1250 if (dvb->fe[0]) { in em28xx_dvb_init()
1252 if (!dvb_attach(tda18271_attach, dvb->fe[0], 0x60, in em28xx_dvb_init()
1255 dvb_frontend_detach(dvb->fe[0]); in em28xx_dvb_init()
1265 dvb->fe[0] = dvb_attach(drxk_attach, &terratec_htc_stick_drxk, in em28xx_dvb_init()
1267 if (!dvb->fe[0]) { in em28xx_dvb_init()
1273 if (!dvb_attach(tda18271_attach, dvb->fe[0], 0x60, in em28xx_dvb_init()
1284 dvb->fe[0] = dvb_attach(drxk_attach, &terratec_htc_stick_drxk, in em28xx_dvb_init()
1286 if (!dvb->fe[0]) { in em28xx_dvb_init()
1292 if (!dvb_attach(tda18271_attach, dvb->fe[0], 0x60, in em28xx_dvb_init()
1304 if (NULL == dvb->fe[0]) { in em28xx_dvb_init()
1310 dvb->fe[0]->callback = em28xx_tuner_callback; in em28xx_dvb_init()
1311 if (dvb->fe[1]) in em28xx_dvb_init()
1312 dvb->fe[1]->callback = em28xx_tuner_callback; in em28xx_dvb_init()
1315 result = em28xx_register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev); in em28xx_dvb_init()
1321 dvb->adapter.mfe_shared = mfe_shared; in em28xx_dvb_init()
1330 kfree(dvb); in em28xx_dvb_init()
1331 dev->dvb = NULL; in em28xx_dvb_init()
1349 if (dev->dvb) { in em28xx_dvb_fini()
1350 struct em28xx_dvb *dvb = dev->dvb; in em28xx_dvb_fini() local
1355 if (dvb->fe[0]) in em28xx_dvb_fini()
1356 prevent_sleep(&dvb->fe[0]->ops); in em28xx_dvb_fini()
1357 if (dvb->fe[1]) in em28xx_dvb_fini()
1358 prevent_sleep(&dvb->fe[1]->ops); in em28xx_dvb_fini()
1361 em28xx_unregister_dvb(dvb); in em28xx_dvb_fini()
1362 kfree(dvb); in em28xx_dvb_fini()
1363 dev->dvb = NULL; in em28xx_dvb_fini()