• Home
  • Raw
  • Download

Lines Matching refs:opts

595 	struct f_uvc_opts *opts;  in uvc_function_bind()  local
600 opts = fi_to_f_uvc_opts(f->fi); in uvc_function_bind()
603 opts->streaming_interval = clamp(opts->streaming_interval, 1U, 16U); in uvc_function_bind()
604 opts->streaming_maxpacket = clamp(opts->streaming_maxpacket, 1U, 3072U); in uvc_function_bind()
605 opts->streaming_maxburst = min(opts->streaming_maxburst, 15U); in uvc_function_bind()
608 if (opts->streaming_maxburst && in uvc_function_bind()
609 (opts->streaming_maxpacket % 1024) != 0) { in uvc_function_bind()
610 opts->streaming_maxpacket = roundup(opts->streaming_maxpacket, 1024); in uvc_function_bind()
612 opts->streaming_maxpacket); in uvc_function_bind()
621 if (opts->streaming_maxpacket <= 1024) { in uvc_function_bind()
623 max_packet_size = opts->streaming_maxpacket; in uvc_function_bind()
624 } else if (opts->streaming_maxpacket <= 2048) { in uvc_function_bind()
626 max_packet_size = opts->streaming_maxpacket / 2; in uvc_function_bind()
629 max_packet_size = opts->streaming_maxpacket / 3; in uvc_function_bind()
633 cpu_to_le16(min(opts->streaming_maxpacket, 1023U)); in uvc_function_bind()
634 uvc_fs_streaming_ep.bInterval = opts->streaming_interval; in uvc_function_bind()
643 uvc_hs_streaming_ep.bInterval = opts->streaming_interval; in uvc_function_bind()
646 uvc_ss_streaming_ep.bInterval = opts->streaming_interval; in uvc_function_bind()
648 uvc_ss_streaming_comp.bMaxBurst = opts->streaming_maxburst; in uvc_function_bind()
651 (opts->streaming_maxburst + 1)); in uvc_function_bind()
679 uvc_en_us_strings[UVC_STRING_CONTROL_IDX].s = opts->function_name; in uvc_function_bind()
698 opts->control_interface = ret; in uvc_function_bind()
705 opts->streaming_interface = ret; in uvc_function_bind()
779 struct f_uvc_opts *opts = fi_to_f_uvc_opts(f); in uvc_free_inst() local
781 mutex_destroy(&opts->lock); in uvc_free_inst()
782 kfree(opts); in uvc_free_inst()
787 struct f_uvc_opts *opts; in uvc_alloc_inst() local
795 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in uvc_alloc_inst()
796 if (!opts) in uvc_alloc_inst()
798 opts->func_inst.free_func_inst = uvc_free_inst; in uvc_alloc_inst()
799 mutex_init(&opts->lock); in uvc_alloc_inst()
801 cd = &opts->uvc_camera_terminal; in uvc_alloc_inst()
817 pd = &opts->uvc_processing; in uvc_alloc_inst()
830 od = &opts->uvc_output_terminal; in uvc_alloc_inst()
840 md = &opts->uvc_color_matching; in uvc_alloc_inst()
849 ctl_cls = opts->uvc_fs_control_cls; in uvc_alloc_inst()
855 opts->fs_control = in uvc_alloc_inst()
859 ctl_cls = opts->uvc_ss_control_cls; in uvc_alloc_inst()
865 opts->ss_control = in uvc_alloc_inst()
868 opts->streaming_interval = 1; in uvc_alloc_inst()
869 opts->streaming_maxpacket = 1024; in uvc_alloc_inst()
870 snprintf(opts->function_name, sizeof(opts->function_name), "UVC Camera"); in uvc_alloc_inst()
872 ret = uvcg_attach_configfs(opts); in uvc_alloc_inst()
874 kfree(opts); in uvc_alloc_inst()
878 return &opts->func_inst; in uvc_alloc_inst()
884 struct f_uvc_opts *opts = container_of(f->fi, struct f_uvc_opts, in uvc_free() local
886 --opts->refcnt; in uvc_free()
935 struct f_uvc_opts *opts; in uvc_alloc() local
945 opts = fi_to_f_uvc_opts(fi); in uvc_alloc()
947 mutex_lock(&opts->lock); in uvc_alloc()
948 if (opts->uvc_fs_streaming_cls) { in uvc_alloc()
949 strm_cls = opts->uvc_fs_streaming_cls; in uvc_alloc()
950 opts->fs_streaming = in uvc_alloc()
953 if (opts->uvc_hs_streaming_cls) { in uvc_alloc()
954 strm_cls = opts->uvc_hs_streaming_cls; in uvc_alloc()
955 opts->hs_streaming = in uvc_alloc()
958 if (opts->uvc_ss_streaming_cls) { in uvc_alloc()
959 strm_cls = opts->uvc_ss_streaming_cls; in uvc_alloc()
960 opts->ss_streaming = in uvc_alloc()
964 uvc->desc.fs_control = opts->fs_control; in uvc_alloc()
965 uvc->desc.ss_control = opts->ss_control; in uvc_alloc()
966 uvc->desc.fs_streaming = opts->fs_streaming; in uvc_alloc()
967 uvc->desc.hs_streaming = opts->hs_streaming; in uvc_alloc()
968 uvc->desc.ss_streaming = opts->ss_streaming; in uvc_alloc()
969 ++opts->refcnt; in uvc_alloc()
970 mutex_unlock(&opts->lock); in uvc_alloc()