Lines Matching refs:qctrl
537 static int cx2341x_ctrl_query_fill(struct v4l2_queryctrl *qctrl, in cx2341x_ctrl_query_fill() argument
542 switch (qctrl->id) { in cx2341x_ctrl_query_fill()
556 cx2341x_ctrl_fill(qctrl->id, &name, &qctrl->type, in cx2341x_ctrl_query_fill()
557 &min, &max, &step, &def, &qctrl->flags); in cx2341x_ctrl_query_fill()
558 qctrl->minimum = min; in cx2341x_ctrl_query_fill()
559 qctrl->maximum = max; in cx2341x_ctrl_query_fill()
560 qctrl->step = step; in cx2341x_ctrl_query_fill()
561 qctrl->default_value = def; in cx2341x_ctrl_query_fill()
562 qctrl->reserved[0] = qctrl->reserved[1] = 0; in cx2341x_ctrl_query_fill()
563 strscpy(qctrl->name, name, sizeof(qctrl->name)); in cx2341x_ctrl_query_fill()
567 return v4l2_ctrl_query_fill(qctrl, min, max, step, def); in cx2341x_ctrl_query_fill()
572 struct v4l2_queryctrl *qctrl) in cx2341x_ctrl_query() argument
576 switch (qctrl->id) { in cx2341x_ctrl_query()
578 return v4l2_ctrl_query_fill(qctrl, 0, 0, 0, 0); in cx2341x_ctrl_query()
580 return v4l2_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
587 return v4l2_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
591 return cx2341x_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
597 return v4l2_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
610 return v4l2_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
616 return v4l2_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
622 err = v4l2_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
630 qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; in cx2341x_ctrl_query()
634 return v4l2_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
640 err = v4l2_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
646 qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; in cx2341x_ctrl_query()
650 return v4l2_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
656 return v4l2_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
662 return v4l2_ctrl_query_fill(qctrl, 0, 1, 1, 0); in cx2341x_ctrl_query()
665 err = v4l2_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
674 qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; in cx2341x_ctrl_query()
676 qctrl->flags |= V4L2_CTRL_FLAG_DISABLED; in cx2341x_ctrl_query()
683 err = v4l2_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
688 qctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY; in cx2341x_ctrl_query()
692 return v4l2_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
698 return v4l2_ctrl_query_fill(qctrl, 0, 33, 1, 2); in cx2341x_ctrl_query()
701 return v4l2_ctrl_query_fill(qctrl, 1, 34, 1, in cx2341x_ctrl_query()
705 return v4l2_ctrl_query_fill(qctrl, 0, 1, 1, 1); in cx2341x_ctrl_query()
708 err = v4l2_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
714 qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; in cx2341x_ctrl_query()
718 return v4l2_ctrl_query_fill(qctrl, 0, 27000000, 1, 6000000); in cx2341x_ctrl_query()
721 err = v4l2_ctrl_query_fill(qctrl, 0, 27000000, 1, 8000000); in cx2341x_ctrl_query()
725 qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; in cx2341x_ctrl_query()
729 return v4l2_ctrl_query_fill(qctrl, 0, 255, 1, 0); in cx2341x_ctrl_query()
732 return v4l2_ctrl_query_fill(qctrl, 0, 1, 1, 0); in cx2341x_ctrl_query()
735 return v4l2_ctrl_query_fill(qctrl, 0, 0xffffff, 1, 0x008080); in cx2341x_ctrl_query()
739 return cx2341x_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
745 cx2341x_ctrl_query_fill(qctrl, 0, 15, 1, in cx2341x_ctrl_query()
747 qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; in cx2341x_ctrl_query()
750 qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; in cx2341x_ctrl_query()
754 cx2341x_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
761 qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; in cx2341x_ctrl_query()
765 cx2341x_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
772 qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; in cx2341x_ctrl_query()
776 return cx2341x_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
782 cx2341x_ctrl_query_fill(qctrl, 0, 31, 1, in cx2341x_ctrl_query()
784 qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; in cx2341x_ctrl_query()
787 qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; in cx2341x_ctrl_query()
791 return cx2341x_ctrl_query_fill(qctrl, in cx2341x_ctrl_query()
797 cx2341x_ctrl_query_fill(qctrl, 0, 255, 1, in cx2341x_ctrl_query()
799 qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; in cx2341x_ctrl_query()
802 qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; in cx2341x_ctrl_query()
806 cx2341x_ctrl_query_fill(qctrl, 0, 255, 1, in cx2341x_ctrl_query()
808 qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; in cx2341x_ctrl_query()
811 qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; in cx2341x_ctrl_query()
815 cx2341x_ctrl_query_fill(qctrl, 0, 255, 1, in cx2341x_ctrl_query()
817 qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; in cx2341x_ctrl_query()
820 qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; in cx2341x_ctrl_query()
824 cx2341x_ctrl_query_fill(qctrl, 0, 255, 1, in cx2341x_ctrl_query()
826 qctrl->flags |= V4L2_CTRL_FLAG_SLIDER; in cx2341x_ctrl_query()
829 qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE; in cx2341x_ctrl_query()
833 return cx2341x_ctrl_query_fill(qctrl, 0, 1, 1, in cx2341x_ctrl_query()
924 static int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl, in v4l2_ctrl_check() argument
927 if (qctrl->flags & V4L2_CTRL_FLAG_DISABLED) in v4l2_ctrl_check()
929 if (qctrl->flags & V4L2_CTRL_FLAG_GRABBED) in v4l2_ctrl_check()
931 if (qctrl->type == V4L2_CTRL_TYPE_STRING) in v4l2_ctrl_check()
933 if (qctrl->type == V4L2_CTRL_TYPE_BUTTON || in v4l2_ctrl_check()
934 qctrl->type == V4L2_CTRL_TYPE_INTEGER64 || in v4l2_ctrl_check()
935 qctrl->type == V4L2_CTRL_TYPE_CTRL_CLASS) in v4l2_ctrl_check()
937 if (ctrl->value < qctrl->minimum || ctrl->value > qctrl->maximum) in v4l2_ctrl_check()
939 if (qctrl->type == V4L2_CTRL_TYPE_MENU && menu_items != NULL) { in v4l2_ctrl_check()
944 if (qctrl->type == V4L2_CTRL_TYPE_BITMASK && in v4l2_ctrl_check()
945 (ctrl->value & ~qctrl->maximum)) in v4l2_ctrl_check()
970 struct v4l2_queryctrl qctrl; in cx2341x_ext_ctrls() local
973 qctrl.id = ctrl->id; in cx2341x_ext_ctrls()
974 err = cx2341x_ctrl_query(params, &qctrl); in cx2341x_ext_ctrls()
977 if (qctrl.type == V4L2_CTRL_TYPE_MENU) in cx2341x_ext_ctrls()
978 menu_items = cx2341x_ctrl_get_menu(params, qctrl.id); in cx2341x_ext_ctrls()
979 err = v4l2_ctrl_check(ctrl, &qctrl, menu_items); in cx2341x_ext_ctrls()