Lines Matching refs:dvbdev
45 struct dvb_usb_device *dvbdev = vb2_get_drv_priv(q); in cxusb_medion_v_queue_setup() local
46 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_v_queue_setup()
65 struct dvb_usb_device *dvbdev = vb2_get_drv_priv(vb->vb2_queue); in cxusb_medion_v_buf_init() local
66 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_v_buf_init()
68 cxusb_vprintk(dvbdev, OPS, "buffer init\n"); in cxusb_medion_v_buf_init()
73 cxusb_vprintk(dvbdev, OPS, "buffer OK\n"); in cxusb_medion_v_buf_init()
78 static void cxusb_auxbuf_init(struct dvb_usb_device *dvbdev, in cxusb_auxbuf_init() argument
82 cxusb_vprintk(dvbdev, AUXB, "initializing auxbuf of len %u\n", len); in cxusb_auxbuf_init()
89 static void cxusb_auxbuf_head_trim(struct dvb_usb_device *dvbdev, in cxusb_auxbuf_head_trim() argument
99 cxusb_vprintk(dvbdev, AUXB, in cxusb_auxbuf_head_trim()
112 static bool cxusb_auxbuf_make_space(struct dvb_usb_device *dvbdev, in cxusb_auxbuf_make_space() argument
123 cxusb_vprintk(dvbdev, AUXB, "freespace is %u\n", freespace); in cxusb_auxbuf_make_space()
130 cxusb_vprintk(dvbdev, AUXB, "will overwrite %u bytes of buffer\n", in cxusb_auxbuf_make_space()
133 cxusb_auxbuf_head_trim(dvbdev, auxbuf, howmuch); in cxusb_auxbuf_make_space()
139 static bool cxusb_auxbuf_append_urb(struct dvb_usb_device *dvbdev, in cxusb_auxbuf_append_urb() argument
150 ret = cxusb_auxbuf_make_space(dvbdev, auxbuf, len); in cxusb_auxbuf_append_urb()
178 static bool cxusb_medion_cf_refc_fld_chg(struct dvb_usb_device *dvbdev, in cxusb_medion_cf_refc_fld_chg() argument
196 cxusb_vprintk(dvbdev, BT656, in cxusb_medion_cf_refc_fld_chg()
204 cxusb_vprintk(dvbdev, BT656, in cxusb_medion_cf_refc_fld_chg()
219 cxusb_vprintk(dvbdev, BT656, in cxusb_medion_cf_refc_fld_chg()
228 static void cxusb_medion_cf_refc_start_sch(struct dvb_usb_device *dvbdev, in cxusb_medion_cf_refc_start_sch() argument
244 cxusb_vprintk(dvbdev, BT656, "line start @ pos %u\n", in cxusb_medion_cf_refc_start_sch()
250 cxusb_vprintk(dvbdev, BT656, "VBI start @ pos %u\n", in cxusb_medion_cf_refc_start_sch()
257 static void cxusb_medion_cf_refc_line_smpl(struct dvb_usb_device *dvbdev, in cxusb_medion_cf_refc_line_smpl() argument
268 cxusb_vprintk(dvbdev, BT656, in cxusb_medion_cf_refc_line_smpl()
277 cxusb_vprintk(dvbdev, BT656, in cxusb_medion_cf_refc_line_smpl()
287 static void cxusb_medion_cf_refc_vbi_smpl(struct dvb_usb_device *dvbdev, in cxusb_medion_cf_refc_vbi_smpl() argument
295 cxusb_vprintk(dvbdev, BT656, "SAV in VBI samples @ pos %u\n", in cxusb_medion_cf_refc_vbi_smpl()
302 static bool cxusb_medion_cf_ref_code(struct dvb_usb_device *dvbdev, in cxusb_medion_cf_ref_code() argument
310 cxusb_medion_cf_refc_start_sch(dvbdev, bt656, firstfield, buf); in cxusb_medion_cf_ref_code()
312 cxusb_medion_cf_refc_line_smpl(dvbdev, bt656, firstfield, in cxusb_medion_cf_ref_code()
316 cxusb_medion_cf_refc_vbi_smpl(dvbdev, bt656, buf); in cxusb_medion_cf_ref_code()
323 static bool cxusb_medion_cs_start_sch(struct dvb_usb_device *dvbdev, in cxusb_medion_cs_start_sch() argument
342 cxusb_vprintk(dvbdev, BT656, "line %u early start, pos %u\n", in cxusb_medion_cs_start_sch()
367 static bool cxusb_medion_copy_samples(struct dvb_usb_device *dvbdev, in cxusb_medion_copy_samples() argument
374 return cxusb_medion_cs_start_sch(dvbdev, auxbuf, bt656, in cxusb_medion_copy_samples()
384 static bool cxusb_medion_copy_field(struct dvb_usb_device *dvbdev, in cxusb_medion_copy_field() argument
411 if (cxusb_medion_cf_refc_fld_chg(dvbdev, in cxusb_medion_copy_field()
419 if (cxusb_medion_cf_ref_code(dvbdev, bt656, in cxusb_medion_copy_field()
430 if (!cxusb_medion_copy_samples(dvbdev, auxbuf, bt656, in cxusb_medion_copy_field()
436 cxusb_vprintk(dvbdev, BT656, in cxusb_medion_copy_field()
448 struct dvb_usb_device *dvbdev = cxdev->dvbdev; in cxusb_medion_v_process_auxbuf() local
463 dev_warn(&dvbdev->udev->dev, "no free buffers\n"); in cxusb_medion_v_process_auxbuf()
468 cxusb_vprintk(dvbdev, URB, "will copy field 1\n"); in cxusb_medion_v_process_auxbuf()
482 if (!cxusb_medion_copy_field(dvbdev, &cxdev->auxbuf, bt656, in cxusb_medion_v_process_auxbuf()
492 cxusb_vprintk(dvbdev, URB, "will copy field 2\n"); in cxusb_medion_v_process_auxbuf()
499 if (!cxusb_medion_copy_field(dvbdev, &cxdev->auxbuf, bt656, in cxusb_medion_v_process_auxbuf()
504 cxusb_auxbuf_head_trim(dvbdev, &cxdev->auxbuf, bt656->pos); in cxusb_medion_v_process_auxbuf()
521 cxusb_vprintk(dvbdev, URB, "frame done\n"); in cxusb_medion_v_process_auxbuf()
523 cxusb_vprintk(dvbdev, URB, "frame skipped\n"); in cxusb_medion_v_process_auxbuf()
534 struct dvb_usb_device *dvbdev = cxdev->dvbdev; in cxusb_medion_v_complete_handle_urb() local
554 cxusb_vprintk(dvbdev, URB, "URB %u status = %d\n", urbn, urb->status); in cxusb_medion_v_complete_handle_urb()
563 cxusb_vprintk(dvbdev, URB, "URB %u data len = %lu\n", urbn, in cxusb_medion_v_complete_handle_urb()
567 cxusb_vprintk(dvbdev, URB, "appending URB\n"); in cxusb_medion_v_complete_handle_urb()
580 !cxusb_auxbuf_append_urb(dvbdev, in cxusb_medion_v_complete_handle_urb()
586 cxusb_vprintk(dvbdev, URB, "URB %u resubmit\n", urbn); in cxusb_medion_v_complete_handle_urb()
590 dev_err(&dvbdev->udev->dev, in cxusb_medion_v_complete_handle_urb()
603 struct dvb_usb_device *dvbdev = cxdev->dvbdev; in cxusb_medion_v_complete_work() local
609 cxusb_vprintk(dvbdev, URB, "worker called, stop_streaming = %d\n", in cxusb_medion_v_complete_work()
622 cxusb_vprintk(dvbdev, URB, "rescheduling worker\n"); in cxusb_medion_v_complete_work()
632 struct dvb_usb_device *dvbdev = u->context; in cxusb_medion_v_complete() local
633 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_v_complete()
641 dev_err(&dvbdev->udev->dev, in cxusb_medion_v_complete()
646 cxusb_vprintk(dvbdev, URB, "URB %u complete\n", i); in cxusb_medion_v_complete()
690 struct dvb_usb_device *dvbdev = cxdev->dvbdev; in cxusb_medion_v_ss_auxbuf_alloc() local
708 cxusb_vprintk(dvbdev, URB, in cxusb_medion_v_ss_auxbuf_alloc()
719 cxusb_auxbuf_init(dvbdev, &cxdev->auxbuf, buf, auxbuflen); in cxusb_medion_v_ss_auxbuf_alloc()
743 struct dvb_usb_device *dvbdev = cxdev->dvbdev; in cxusb_medion_field_order() local
758 cxusb_vprintk(dvbdev, OPS, in cxusb_medion_field_order()
767 dev_warn(&dvbdev->udev->dev, in cxusb_medion_field_order()
775 struct dvb_usb_device *dvbdev = vb2_get_drv_priv(q); in cxusb_medion_v_start_streaming() local
776 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_v_start_streaming()
781 cxusb_vprintk(dvbdev, OPS, "should start streaming\n"); in cxusb_medion_v_start_streaming()
793 dev_err(&dvbdev->udev->dev, in cxusb_medion_v_start_streaming()
798 ret = cxusb_ctrl_msg(dvbdev, CMD_STREAMING_ON, streamon_params, 2, in cxusb_medion_v_start_streaming()
801 dev_err(&dvbdev->udev->dev, in cxusb_medion_v_start_streaming()
838 surb->dev = dvbdev->udev; in cxusb_medion_v_start_streaming()
839 surb->context = dvbdev; in cxusb_medion_v_start_streaming()
840 surb->pipe = usb_rcvisocpipe(dvbdev->udev, 2); in cxusb_medion_v_start_streaming()
873 dev_err(&dvbdev->udev->dev, in cxusb_medion_v_start_streaming()
887 cxusb_ctrl_msg(dvbdev, CMD_STREAMING_OFF, NULL, 0, NULL, 0); in cxusb_medion_v_start_streaming()
900 struct dvb_usb_device *dvbdev = vb2_get_drv_priv(q); in cxusb_medion_v_stop_streaming() local
901 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_v_stop_streaming()
905 cxusb_vprintk(dvbdev, OPS, "should stop streaming\n"); in cxusb_medion_v_stop_streaming()
912 cxusb_ctrl_msg(dvbdev, CMD_STREAMING_OFF, NULL, 0, NULL, 0); in cxusb_medion_v_stop_streaming()
916 dev_err(&dvbdev->udev->dev, "unable to stop stream (%d)\n", in cxusb_medion_v_stop_streaming()
945 struct dvb_usb_device *dvbdev = vb2_get_drv_priv(vb->vb2_queue); in cxusub_medion_v_buf_queue() local
946 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusub_medion_v_buf_queue()
970 struct dvb_usb_device *dvbdev = video_drvdata(file); in cxusb_medion_v_querycap() local
972 strscpy(cap->driver, dvbdev->udev->dev.driver->name, in cxusb_medion_v_querycap()
975 usb_make_path(dvbdev->udev, cap->bus_info, sizeof(cap->bus_info)); in cxusb_medion_v_querycap()
996 struct dvb_usb_device *dvbdev = video_drvdata(file); in cxusb_medion_g_fmt_vid_cap() local
997 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_g_fmt_vid_cap()
1015 struct dvb_usb_device *dvbdev = video_drvdata(file); in cxusb_medion_try_s_fmt_vid_cap() local
1016 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_try_s_fmt_vid_cap()
1090 struct dvb_usb_device *dvbdev = video_drvdata(file); in cxusb_medion_enum_input() local
1091 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_enum_input()
1108 dev_warn(&dvbdev->udev->dev, in cxusb_medion_enum_input()
1121 struct dvb_usb_device *dvbdev = video_drvdata(file); in cxusb_medion_g_input() local
1122 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_g_input()
1132 struct dvb_usb_device *dvbdev = cxdev->dvbdev; in cxusb_medion_set_norm() local
1135 cxusb_vprintk(dvbdev, OPS, in cxusb_medion_set_norm()
1159 dev_err(&dvbdev->udev->dev, in cxusb_medion_set_norm()
1167 dev_err(&dvbdev->udev->dev, in cxusb_medion_set_norm()
1175 dev_err(&dvbdev->udev->dev, in cxusb_medion_set_norm()
1190 struct dvb_usb_device *dvbdev = video_drvdata(file); in cxusb_medion_s_input() local
1191 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_s_input()
1218 struct dvb_usb_device *dvbdev = video_drvdata(file); in cxusb_medion_g_tuner() local
1219 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_g_tuner()
1275 struct dvb_usb_device *dvbdev = video_drvdata(file); in cxusb_medion_s_tuner() local
1276 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_s_tuner()
1306 struct dvb_usb_device *dvbdev = video_drvdata(file); in cxusb_medion_g_frequency() local
1307 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_g_frequency()
1318 struct dvb_usb_device *dvbdev = video_drvdata(file); in cxusb_medion_s_frequency() local
1319 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_s_frequency()
1349 struct dvb_usb_device *dvbdev = video_drvdata(file); in cxusb_medion_g_std() local
1350 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_g_std()
1363 struct dvb_usb_device *dvbdev = video_drvdata(file); in cxusb_medion_s_std() local
1364 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_s_std()
1372 struct dvb_usb_device *dvbdev = video_drvdata(file); in cxusb_medion_querystd() local
1373 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_querystd()
1388 cxusb_vprintk(dvbdev, OPS, in cxusb_medion_querystd()
1394 cxusb_vprintk(dvbdev, OPS, "input %u detected standard is %lx\n", in cxusb_medion_querystd()
1403 struct dvb_usb_device *dvbdev = video_drvdata(file); in cxusb_medion_log_status() local
1404 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_log_status()
1459 int cxusb_medion_analog_init(struct dvb_usb_device *dvbdev) in cxusb_medion_analog_init() argument
1461 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_analog_init()
1473 ret = i2c_transfer(&dvbdev->i2c_adap, &tuner_analog_msg, 1); in cxusb_medion_analog_init()
1475 dev_warn(&dvbdev->udev->dev, in cxusb_medion_analog_init()
1484 dev_warn(&dvbdev->udev->dev, in cxusb_medion_analog_init()
1490 dev_warn(&dvbdev->udev->dev, in cxusb_medion_analog_init()
1504 dev_warn(&dvbdev->udev->dev, in cxusb_medion_analog_init()
1520 dev_warn(&dvbdev->udev->dev, in cxusb_medion_analog_init()
1533 struct dvb_usb_device *dvbdev = video_drvdata(f); in cxusb_videoradio_open() local
1541 ret = cxusb_medion_get(dvbdev, CXUSB_OPEN_ANALOG); in cxusb_videoradio_open()
1549 cxusb_vprintk(dvbdev, OPS, "got open\n"); in cxusb_videoradio_open()
1554 cxusb_medion_put(dvbdev); in cxusb_videoradio_open()
1562 struct dvb_usb_device *dvbdev = video_drvdata(f); in cxusb_videoradio_release() local
1565 cxusb_vprintk(dvbdev, OPS, "got release\n"); in cxusb_videoradio_release()
1572 cxusb_medion_put(dvbdev); in cxusb_videoradio_release()
1598 struct dvb_usb_device *dvbdev = cxdev->dvbdev; in cxusb_medion_v4l2_release() local
1600 cxusb_vprintk(dvbdev, OPS, "v4l2 device release\n"); in cxusb_medion_v4l2_release()
1614 struct dvb_usb_device *dvbdev = video_get_drvdata(vdev); in cxusb_medion_videodev_release() local
1616 cxusb_vprintk(dvbdev, OPS, "video device release\n"); in cxusb_medion_videodev_release()
1621 static int cxusb_medion_register_analog_video(struct dvb_usb_device *dvbdev) in cxusb_medion_register_analog_video() argument
1623 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_register_analog_video()
1631 cxdev->videoqueue.drv_priv = dvbdev; in cxusb_medion_register_analog_video()
1640 dev_err(&dvbdev->udev->dev, in cxusb_medion_register_analog_video()
1647 dev_err(&dvbdev->udev->dev, "video device alloc failed\n"); in cxusb_medion_register_analog_video()
1661 video_set_drvdata(cxdev->videodev, dvbdev); in cxusb_medion_register_analog_video()
1665 dev_err(&dvbdev->udev->dev, in cxusb_medion_register_analog_video()
1677 static int cxusb_medion_register_analog_radio(struct dvb_usb_device *dvbdev) in cxusb_medion_register_analog_radio() argument
1679 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_register_analog_radio()
1684 dev_err(&dvbdev->udev->dev, "radio device alloc failed\n"); in cxusb_medion_register_analog_radio()
1696 video_set_drvdata(cxdev->radiodev, dvbdev); in cxusb_medion_register_analog_radio()
1700 dev_err(&dvbdev->udev->dev, in cxusb_medion_register_analog_radio()
1709 static int cxusb_medion_register_analog_subdevs(struct dvb_usb_device *dvbdev) in cxusb_medion_register_analog_subdevs() argument
1711 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_register_analog_subdevs()
1717 &dvbdev->i2c_adap, in cxusb_medion_register_analog_subdevs()
1720 dev_err(&dvbdev->udev->dev, "cx25840 not found\n"); in cxusb_medion_register_analog_subdevs()
1743 dev_err(&dvbdev->udev->dev, in cxusb_medion_register_analog_subdevs()
1750 &dvbdev->i2c_adap, in cxusb_medion_register_analog_subdevs()
1753 dev_err(&dvbdev->udev->dev, "tuner not found\n"); in cxusb_medion_register_analog_subdevs()
1766 &dvbdev->i2c_adap, in cxusb_medion_register_analog_subdevs()
1769 dev_err(&dvbdev->udev->dev, "tda9887 not found\n"); in cxusb_medion_register_analog_subdevs()
1776 int cxusb_medion_register_analog(struct dvb_usb_device *dvbdev) in cxusb_medion_register_analog() argument
1778 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_register_analog()
1787 ret = v4l2_device_register(&dvbdev->udev->dev, &cxdev->v4l2dev); in cxusb_medion_register_analog()
1789 dev_err(&dvbdev->udev->dev, in cxusb_medion_register_analog()
1795 ret = cxusb_medion_register_analog_subdevs(dvbdev); in cxusb_medion_register_analog()
1805 ret = cxusb_medion_register_analog_video(dvbdev); in cxusb_medion_register_analog()
1809 ret = cxusb_medion_register_analog_radio(dvbdev); in cxusb_medion_register_analog()
1825 void cxusb_medion_unregister_analog(struct dvb_usb_device *dvbdev) in cxusb_medion_unregister_analog() argument
1827 struct cxusb_medion_dev *cxdev = dvbdev->priv; in cxusb_medion_unregister_analog()
1829 cxusb_vprintk(dvbdev, OPS, "unregistering analog\n"); in cxusb_medion_unregister_analog()
1837 cxusb_vprintk(dvbdev, OPS, "analog unregistered\n"); in cxusb_medion_unregister_analog()