Lines Matching defs:value

372  * the V4L2 control value, to the corresponding UVC control value used by the
377 * For controls of type UVC_CTRL_DATA_TYPE_BITMASK, the UVC control value is
427 s32 value, u8 *data)
429 data[0] = value == 0 ? 0 : (value > 0) ? 1 : 0xff;
430 data[2] = min((int)abs(value), 0xff);
454 s32 value, u8 *data)
458 data[first] = value == 0 ? 0 : (value > 0) ? 1 : 0xff;
459 data[first+1] = min_t(int, abs(value), 0xff);
829 s32 value = 0;
838 value |= offset > 0 ? (byte >> offset) : (byte << (-offset));
848 /* Sign-extend the value if needed. */
850 value |= -(value & (1 << (mapping->size - 1)));
852 return value;
857 * in the little-endian data stored at 'data' to the value 'value'.
860 s32 value, u8 *data)
867 * According to the v4l2 spec, writing any value to a button control
870 * value.
873 value = -1;
880 *data = (*data & ~mask) | ((value << offset) & mask);
881 value >>= offset ? offset : 8;
1002 * resolution value to zero.
1019 s32 value = mapping->get(mapping, UVC_GET_CUR, data);
1032 if (menu_value == value) {
1033 value = i;
1039 return value;
1081 s32 *value)
1092 *value = __uvc_ctrl_get_value(mapping,
1145 * For set operations on slave controls, check if the master's value is set to
1147 * the master's current value. This catches VIDIOC_S_EXT_CTRLS calls that set
1182 * multiple times in the same ioctl. We want the last value.
1186 return ctrls->controls[i].value ==
1465 s32 value, u32 changes)
1474 ev->u.ctrl.value = value;
1493 struct uvc_control_mapping *mapping, s32 value, u32 changes)
1502 uvc_ctrl_fill_event(chain, &ev, ctrl, mapping, value, changes);
1548 s32 value = __uvc_ctrl_get_value(mapping, data);
1562 uvc_ctrl_send_event(chain, handle, ctrl, mapping, value,
1668 xctrls[i].value, changes);
1746 * When setting a control, the new value is stored in the control data field
1749 * value is loaded from the hardware before storing the new value in the data
1757 * UVC_CTRL_DATA_CURRENT is reverted to its previous value
1784 * uvc_ctrl_get from using the cached value, and for write-only
1880 return __uvc_ctrl_get(chain, ctrl, mapping, &xctrl->value);
1889 s32 value;
1922 xctrl->value = min + DIV_ROUND_CLOSEST((u32)(xctrl->value - min),
1925 xctrl->value = clamp(xctrl->value, min, max);
1927 xctrl->value = clamp_t(u32, xctrl->value, min, max);
1928 value = xctrl->value;
1938 xctrl->value &= uvc_get_ctrl_bitmap(ctrl, mapping);
1939 value = xctrl->value;
1943 xctrl->value = clamp(xctrl->value, 0, 1);
1944 value = xctrl->value;
1948 if (xctrl->value < (ffs(mapping->menu_mask) - 1) ||
1949 xctrl->value > (fls(mapping->menu_mask) - 1))
1952 if (!test_bit(xctrl->value, &mapping->menu_mask))
1955 value = uvc_mapping_get_menu_value(mapping, xctrl->value);
1968 if (!(uvc_get_ctrl_bitmap(ctrl, mapping) & value))
1975 value = xctrl->value;
1980 * If the mapping doesn't span the whole UVC control, the current value
1990 /* Backup the current value in case we need to rollback later. */
1997 mapping->set(mapping, value,
2297 * - Don't restore modified controls that are back to their default value.