Lines Matching refs:video_mode
456 int errCode, prev_alt = dev->video_mode.alt; in cx231xx_set_video_alternate()
469 dev->video_mode.alt = 3; in cx231xx_set_video_alternate()
472 dev->video_mode.alt = 2; in cx231xx_set_video_alternate()
475 dev->video_mode.alt = 1; in cx231xx_set_video_alternate()
478 dev->video_mode.alt = 0; in cx231xx_set_video_alternate()
482 dev->video_mode.alt = 0; in cx231xx_set_video_alternate()
484 cx231xx_coredbg("dev->video_mode.alt= %d\n", dev->video_mode.alt); in cx231xx_set_video_alternate()
491 if (dev->video_mode.alt != prev_alt) { in cx231xx_set_video_alternate()
493 min_pkt_size, dev->video_mode.alt); in cx231xx_set_video_alternate()
495 if (dev->video_mode.alt_max_pkt_size != NULL) in cx231xx_set_video_alternate()
496 dev->video_mode.max_pkt_size = in cx231xx_set_video_alternate()
497 dev->video_mode.alt_max_pkt_size[dev->video_mode.alt]; in cx231xx_set_video_alternate()
499 dev->video_mode.alt, in cx231xx_set_video_alternate()
500 dev->video_mode.max_pkt_size); in cx231xx_set_video_alternate()
503 dev->video_mode.alt); in cx231xx_set_video_alternate()
507 dev->video_mode.alt, errCode); in cx231xx_set_video_alternate()
548 dev->video_mode.alt = alt; in cx231xx_set_alt_setting()
549 if (dev->video_mode.alt_max_pkt_size != NULL) in cx231xx_set_alt_setting()
550 max_pkt_size = dev->video_mode.max_pkt_size = in cx231xx_set_alt_setting()
551 dev->video_mode.alt_max_pkt_size[dev->video_mode. in cx231xx_set_alt_setting()
785 struct cx231xx *dev = container_of(vmode, struct cx231xx, video_mode); in cx231xx_isoc_irq_callback()
803 spin_lock_irqsave(&dev->video_mode.slock, flags); in cx231xx_isoc_irq_callback()
804 dev->video_mode.isoc_ctl.isoc_copy(dev, urb); in cx231xx_isoc_irq_callback()
805 spin_unlock_irqrestore(&dev->video_mode.slock, flags); in cx231xx_isoc_irq_callback()
831 struct cx231xx *dev = container_of(vmode, struct cx231xx, video_mode); in cx231xx_bulk_irq_callback()
851 spin_lock_irqsave(&dev->video_mode.slock, flags); in cx231xx_bulk_irq_callback()
852 dev->video_mode.bulk_ctl.bulk_copy(dev, urb); in cx231xx_bulk_irq_callback()
853 spin_unlock_irqrestore(&dev->video_mode.slock, flags); in cx231xx_bulk_irq_callback()
867 struct cx231xx_dmaqueue *dma_q = &dev->video_mode.vidq; in cx231xx_uninit_isoc()
874 dev->video_mode.isoc_ctl.nfields = -1; in cx231xx_uninit_isoc()
875 for (i = 0; i < dev->video_mode.isoc_ctl.num_bufs; i++) { in cx231xx_uninit_isoc()
876 urb = dev->video_mode.isoc_ctl.urb[i]; in cx231xx_uninit_isoc()
883 if (dev->video_mode.isoc_ctl.transfer_buffer[i]) { in cx231xx_uninit_isoc()
886 dev->video_mode.isoc_ctl. in cx231xx_uninit_isoc()
894 dev->video_mode.isoc_ctl.urb[i] = NULL; in cx231xx_uninit_isoc()
896 dev->video_mode.isoc_ctl.transfer_buffer[i] = NULL; in cx231xx_uninit_isoc()
901 usb_reset_endpoint(dev->udev, dev->video_mode.end_point_addr); in cx231xx_uninit_isoc()
903 kfree(dev->video_mode.isoc_ctl.urb); in cx231xx_uninit_isoc()
904 kfree(dev->video_mode.isoc_ctl.transfer_buffer); in cx231xx_uninit_isoc()
907 dev->video_mode.isoc_ctl.urb = NULL; in cx231xx_uninit_isoc()
908 dev->video_mode.isoc_ctl.transfer_buffer = NULL; in cx231xx_uninit_isoc()
909 dev->video_mode.isoc_ctl.num_bufs = 0; in cx231xx_uninit_isoc()
926 struct cx231xx_dmaqueue *dma_q = &dev->video_mode.vidq; in cx231xx_uninit_bulk()
933 dev->video_mode.bulk_ctl.nfields = -1; in cx231xx_uninit_bulk()
934 for (i = 0; i < dev->video_mode.bulk_ctl.num_bufs; i++) { in cx231xx_uninit_bulk()
935 urb = dev->video_mode.bulk_ctl.urb[i]; in cx231xx_uninit_bulk()
942 if (dev->video_mode.bulk_ctl.transfer_buffer[i]) { in cx231xx_uninit_bulk()
945 dev->video_mode.bulk_ctl. in cx231xx_uninit_bulk()
953 dev->video_mode.bulk_ctl.urb[i] = NULL; in cx231xx_uninit_bulk()
955 dev->video_mode.bulk_ctl.transfer_buffer[i] = NULL; in cx231xx_uninit_bulk()
960 usb_reset_endpoint(dev->udev, dev->video_mode.end_point_addr); in cx231xx_uninit_bulk()
962 kfree(dev->video_mode.bulk_ctl.urb); in cx231xx_uninit_bulk()
963 kfree(dev->video_mode.bulk_ctl.transfer_buffer); in cx231xx_uninit_bulk()
966 dev->video_mode.bulk_ctl.urb = NULL; in cx231xx_uninit_bulk()
967 dev->video_mode.bulk_ctl.transfer_buffer = NULL; in cx231xx_uninit_bulk()
968 dev->video_mode.bulk_ctl.num_bufs = 0; in cx231xx_uninit_bulk()
987 struct cx231xx_dmaqueue *dma_q = &dev->video_mode.vidq; in cx231xx_init_isoc()
1001 dev->video_mode.isoc_ctl.isoc_copy = isoc_copy; in cx231xx_init_isoc()
1002 dev->video_mode.isoc_ctl.num_bufs = num_bufs; in cx231xx_init_isoc()
1022 dev->video_mode.isoc_ctl.urb = in cx231xx_init_isoc()
1024 if (!dev->video_mode.isoc_ctl.urb) { in cx231xx_init_isoc()
1031 dev->video_mode.isoc_ctl.transfer_buffer = in cx231xx_init_isoc()
1033 if (!dev->video_mode.isoc_ctl.transfer_buffer) { in cx231xx_init_isoc()
1036 kfree(dev->video_mode.isoc_ctl.urb); in cx231xx_init_isoc()
1041 dev->video_mode.isoc_ctl.max_pkt_size = max_pkt_size; in cx231xx_init_isoc()
1042 dev->video_mode.isoc_ctl.buf = NULL; in cx231xx_init_isoc()
1044 sb_size = max_packets * dev->video_mode.isoc_ctl.max_pkt_size; in cx231xx_init_isoc()
1047 dev->video_mode.end_point_addr = 0x81; in cx231xx_init_isoc()
1049 dev->video_mode.end_point_addr = 0x84; in cx231xx_init_isoc()
1053 for (i = 0; i < dev->video_mode.isoc_ctl.num_bufs; i++) { in cx231xx_init_isoc()
1059 dev->video_mode.isoc_ctl.urb[i] = urb; in cx231xx_init_isoc()
1061 dev->video_mode.isoc_ctl.transfer_buffer[i] = in cx231xx_init_isoc()
1064 if (!dev->video_mode.isoc_ctl.transfer_buffer[i]) { in cx231xx_init_isoc()
1071 memset(dev->video_mode.isoc_ctl.transfer_buffer[i], 0, sb_size); in cx231xx_init_isoc()
1074 usb_rcvisocpipe(dev->udev, dev->video_mode.end_point_addr); in cx231xx_init_isoc()
1077 dev->video_mode.isoc_ctl.transfer_buffer[i], in cx231xx_init_isoc()
1087 dev->video_mode.isoc_ctl.max_pkt_size; in cx231xx_init_isoc()
1088 k += dev->video_mode.isoc_ctl.max_pkt_size; in cx231xx_init_isoc()
1095 for (i = 0; i < dev->video_mode.isoc_ctl.num_bufs; i++) { in cx231xx_init_isoc()
1096 rc = usb_submit_urb(dev->video_mode.isoc_ctl.urb[i], in cx231xx_init_isoc()
1123 struct cx231xx_dmaqueue *dma_q = &dev->video_mode.vidq; in cx231xx_init_bulk()
1138 dev->video_mode.bulk_ctl.bulk_copy = bulk_copy; in cx231xx_init_bulk()
1139 dev->video_mode.bulk_ctl.num_bufs = num_bufs; in cx231xx_init_bulk()
1158 dev->video_mode.bulk_ctl.urb = in cx231xx_init_bulk()
1160 if (!dev->video_mode.bulk_ctl.urb) { in cx231xx_init_bulk()
1166 dev->video_mode.bulk_ctl.transfer_buffer = in cx231xx_init_bulk()
1168 if (!dev->video_mode.bulk_ctl.transfer_buffer) { in cx231xx_init_bulk()
1171 kfree(dev->video_mode.bulk_ctl.urb); in cx231xx_init_bulk()
1175 dev->video_mode.bulk_ctl.max_pkt_size = max_pkt_size; in cx231xx_init_bulk()
1176 dev->video_mode.bulk_ctl.buf = NULL; in cx231xx_init_bulk()
1178 sb_size = max_packets * dev->video_mode.bulk_ctl.max_pkt_size; in cx231xx_init_bulk()
1181 dev->video_mode.end_point_addr = 0x81; in cx231xx_init_bulk()
1183 dev->video_mode.end_point_addr = 0x84; in cx231xx_init_bulk()
1187 for (i = 0; i < dev->video_mode.bulk_ctl.num_bufs; i++) { in cx231xx_init_bulk()
1193 dev->video_mode.bulk_ctl.urb[i] = urb; in cx231xx_init_bulk()
1196 dev->video_mode.bulk_ctl.transfer_buffer[i] = in cx231xx_init_bulk()
1199 if (!dev->video_mode.bulk_ctl.transfer_buffer[i]) { in cx231xx_init_bulk()
1206 memset(dev->video_mode.bulk_ctl.transfer_buffer[i], 0, sb_size); in cx231xx_init_bulk()
1209 dev->video_mode.end_point_addr); in cx231xx_init_bulk()
1211 dev->video_mode.bulk_ctl.transfer_buffer[i], in cx231xx_init_bulk()
1216 rc = usb_clear_halt(dev->udev, dev->video_mode.bulk_ctl.urb[0]->pipe); in cx231xx_init_bulk()
1228 for (i = 0; i < dev->video_mode.bulk_ctl.num_bufs; i++) { in cx231xx_init_bulk()
1229 rc = usb_submit_urb(dev->video_mode.bulk_ctl.urb[i], in cx231xx_init_bulk()