Lines Matching refs:dvb
217 dvb_dmx_swfilter(&dev->dvb->demux, in dvb_isoc_copy()
241 dvb_dmx_swfilter(&dev->dvb->demux, in dvb_bulk_copy()
247 static int start_streaming(struct cx231xx_dvb *dvb) in start_streaming() argument
250 struct cx231xx *dev = dvb->adapter.priv; in start_streaming()
282 static int stop_streaming(struct cx231xx_dvb *dvb) in stop_streaming() argument
284 struct cx231xx *dev = dvb->adapter.priv; in stop_streaming()
299 struct cx231xx_dvb *dvb = demux->priv; in start_feed() local
305 mutex_lock(&dvb->lock); in start_feed()
306 dvb->nfeeds++; in start_feed()
307 rc = dvb->nfeeds; in start_feed()
309 if (dvb->nfeeds == 1) { in start_feed()
310 ret = start_streaming(dvb); in start_feed()
315 mutex_unlock(&dvb->lock); in start_feed()
322 struct cx231xx_dvb *dvb = demux->priv; in stop_feed() local
325 mutex_lock(&dvb->lock); in stop_feed()
326 dvb->nfeeds--; in stop_feed()
328 if (0 == dvb->nfeeds) in stop_feed()
329 err = stop_streaming(dvb); in stop_feed()
331 mutex_unlock(&dvb->lock); in stop_feed()
338 struct cx231xx *dev = fe->dvb->priv; in cx231xx_dvb_bus_ctrl()
369 if (!dev->dvb->frontend) {
375 fe = dvb_attach(xc5000_attach, dev->dvb->frontend, &cfg);
378 dvb_frontend_detach(dev->dvb->frontend);
379 dev->dvb->frontend = NULL;
393 if ((dev->dvb != NULL) && (dev->dvb->frontend != NULL)) { in cx231xx_set_analog_freq()
395 struct dvb_tuner_ops *dops = &dev->dvb->frontend->ops.tuner_ops; in cx231xx_set_analog_freq()
406 dops->set_analog_params(dev->dvb->frontend, ¶ms); in cx231xx_set_analog_freq()
418 if ((dev->dvb != NULL) && (dev->dvb->frontend != NULL)) { in cx231xx_reset_analog_tuner()
420 struct dvb_tuner_ops *dops = &dev->dvb->frontend->ops.tuner_ops; in cx231xx_reset_analog_tuner()
425 status = dops->init(dev->dvb->frontend); in cx231xx_reset_analog_tuner()
444 static int register_dvb(struct cx231xx_dvb *dvb, in register_dvb() argument
450 mutex_init(&dvb->lock); in register_dvb()
453 result = dvb_register_adapter(&dvb->adapter, dev->name, module, device, in register_dvb()
463 dvb->frontend->ops.ts_bus_ctrl = cx231xx_dvb_bus_ctrl; in register_dvb()
465 dvb->adapter.priv = dev; in register_dvb()
468 result = dvb_register_frontend(&dvb->adapter, dvb->frontend); in register_dvb()
477 dvb->demux.dmx.capabilities = in register_dvb()
480 dvb->demux.priv = dvb; in register_dvb()
481 dvb->demux.filternum = 256; in register_dvb()
482 dvb->demux.feednum = 256; in register_dvb()
483 dvb->demux.start_feed = start_feed; in register_dvb()
484 dvb->demux.stop_feed = stop_feed; in register_dvb()
486 result = dvb_dmx_init(&dvb->demux); in register_dvb()
493 dvb->dmxdev.filternum = 256; in register_dvb()
494 dvb->dmxdev.demux = &dvb->demux.dmx; in register_dvb()
495 dvb->dmxdev.capabilities = 0; in register_dvb()
496 result = dvb_dmxdev_init(&dvb->dmxdev, &dvb->adapter); in register_dvb()
503 dvb->fe_hw.source = DMX_FRONTEND_0; in register_dvb()
504 result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_hw); in register_dvb()
512 dvb->fe_mem.source = DMX_MEMORY_FE; in register_dvb()
513 result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_mem); in register_dvb()
521 result = dvb->demux.dmx.connect_frontend(&dvb->demux.dmx, &dvb->fe_hw); in register_dvb()
530 dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx); in register_dvb()
534 dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem); in register_dvb()
536 dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw); in register_dvb()
538 dvb_dmxdev_release(&dvb->dmxdev); in register_dvb()
540 dvb_dmx_release(&dvb->demux); in register_dvb()
542 dvb_unregister_frontend(dvb->frontend); in register_dvb()
544 dvb_frontend_detach(dvb->frontend); in register_dvb()
545 dvb_unregister_adapter(&dvb->adapter); in register_dvb()
550 static void unregister_dvb(struct cx231xx_dvb *dvb) in unregister_dvb() argument
552 dvb_net_release(&dvb->net); in unregister_dvb()
553 dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem); in unregister_dvb()
554 dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw); in unregister_dvb()
555 dvb_dmxdev_release(&dvb->dmxdev); in unregister_dvb()
556 dvb_dmx_release(&dvb->demux); in unregister_dvb()
557 dvb_unregister_frontend(dvb->frontend); in unregister_dvb()
558 dvb_frontend_detach(dvb->frontend); in unregister_dvb()
559 dvb_unregister_adapter(&dvb->adapter); in unregister_dvb()
565 struct cx231xx_dvb *dvb; in dvb_init() local
572 dvb = kzalloc(sizeof(struct cx231xx_dvb), GFP_KERNEL); in dvb_init()
574 if (dvb == NULL) { in dvb_init()
578 dev->dvb = dvb; in dvb_init()
590 dev->dvb->frontend = dvb_attach(s5h1432_attach, in dvb_init()
594 if (dev->dvb->frontend == NULL) { in dvb_init()
602 dvb->frontend->callback = cx231xx_tuner_callback; in dvb_init()
604 if (!dvb_attach(xc5000_attach, dev->dvb->frontend, in dvb_init()
615 dev->dvb->frontend = dvb_attach(s5h1411_attach, in dvb_init()
619 if (dev->dvb->frontend == NULL) { in dvb_init()
627 dvb->frontend->callback = cx231xx_tuner_callback; in dvb_init()
629 if (!dvb_attach(xc5000_attach, dev->dvb->frontend, in dvb_init()
638 dev->dvb->frontend = dvb_attach(s5h1432_attach, in dvb_init()
642 if (dev->dvb->frontend == NULL) { in dvb_init()
650 dvb->frontend->callback = cx231xx_tuner_callback; in dvb_init()
652 if (!dvb_attach(tda18271_attach, dev->dvb->frontend, in dvb_init()
661 dev->dvb->frontend = dvb_attach(s5h1411_attach, in dvb_init()
665 if (dev->dvb->frontend == NULL) { in dvb_init()
673 dvb->frontend->callback = cx231xx_tuner_callback; in dvb_init()
675 if (!dvb_attach(tda18271_attach, dev->dvb->frontend, in dvb_init()
687 dev->dvb->frontend = dvb_attach(lgdt3305_attach, in dvb_init()
691 if (dev->dvb->frontend == NULL) { in dvb_init()
699 dvb->frontend->callback = cx231xx_tuner_callback; in dvb_init()
701 dvb_attach(tda18271_attach, dev->dvb->frontend, in dvb_init()
712 dev->dvb->frontend = dvb_attach(mb86a20s_attach, in dvb_init()
716 if (dev->dvb->frontend == NULL) { in dvb_init()
724 dvb->frontend->callback = cx231xx_tuner_callback; in dvb_init()
726 dvb_attach(tda18271_attach, dev->dvb->frontend, in dvb_init()
736 if (NULL == dvb->frontend) { in dvb_init()
744 result = register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev); in dvb_init()
758 kfree(dvb); in dvb_init()
759 dev->dvb = NULL; in dvb_init()
770 if (dev->dvb) { in dvb_fini()
771 unregister_dvb(dev->dvb); in dvb_fini()
772 dev->dvb = NULL; in dvb_fini()