Lines Matching refs:val

136 	const u8 (*val)[2];  member
610 static void ov534_reg_write(struct gspca_dev *gspca_dev, u16 reg, u8 val) in ov534_reg_write() argument
618 PDEBUG(D_USBO, "SET 01 0000 %04x %02x", reg, val); in ov534_reg_write()
619 gspca_dev->usb_buf[0] = val; in ov534_reg_write()
702 static void sccb_reg_write(struct gspca_dev *gspca_dev, u8 reg, u8 val) in sccb_reg_write() argument
704 PDEBUG(D_USBO, "sccb write: %02x %02x", reg, val); in sccb_reg_write()
706 ov534_reg_write(gspca_dev, OV534_REG_WRITE, val); in sccb_reg_write()
809 static void sethue(struct gspca_dev *gspca_dev, s32 val) in sethue() argument
827 huesin = fixp_sin16(val) * 0x80 / 0x7fff; in sethue()
828 huecos = fixp_cos16(val) * 0x80 / 0x7fff; in sethue()
844 static void setsaturation(struct gspca_dev *gspca_dev, s32 val) in setsaturation() argument
861 sccb_reg_write(gspca_dev, 0x4f + i, color_tb[val][i]); in setsaturation()
863 sccb_reg_write(gspca_dev, 0xa7, val); /* U saturation */ in setsaturation()
864 sccb_reg_write(gspca_dev, 0xa8, val); /* V saturation */ in setsaturation()
868 static void setbrightness(struct gspca_dev *gspca_dev, s32 val) in setbrightness() argument
873 if (val < 0) in setbrightness()
874 val = 0x80 - val; in setbrightness()
875 sccb_reg_write(gspca_dev, 0x55, val); /* bright */ in setbrightness()
877 sccb_reg_write(gspca_dev, 0x9b, val); in setbrightness()
881 static void setcontrast(struct gspca_dev *gspca_dev, s32 val) in setcontrast() argument
886 sccb_reg_write(gspca_dev, 0x56, val); /* contras */ in setcontrast()
888 sccb_reg_write(gspca_dev, 0x9c, val); in setcontrast()
891 static void setgain(struct gspca_dev *gspca_dev, s32 val) in setgain() argument
893 switch (val & 0x30) { in setgain()
895 val &= 0x0f; in setgain()
898 val &= 0x0f; in setgain()
899 val |= 0x30; in setgain()
902 val &= 0x0f; in setgain()
903 val |= 0x70; in setgain()
907 val &= 0x0f; in setgain()
908 val |= 0xf0; in setgain()
911 sccb_reg_write(gspca_dev, 0x00, val); in setgain()
919 static void setexposure(struct gspca_dev *gspca_dev, s32 val) in setexposure() argument
926 sccb_reg_write(gspca_dev, 0x10, val); /* aech */ in setexposure()
935 sccb_reg_write(gspca_dev, 0x08, val >> 7); in setexposure()
936 sccb_reg_write(gspca_dev, 0x10, val << 1); in setexposure()
954 static void setagc(struct gspca_dev *gspca_dev, s32 val) in setagc() argument
956 if (val) { in setagc()
969 static void setawb(struct gspca_dev *gspca_dev, s32 val) in setawb() argument
973 if (val) { in setawb()
988 static void setaec(struct gspca_dev *gspca_dev, s32 val) in setaec() argument
996 switch (val) { in setaec()
1008 static void setsharpness(struct gspca_dev *gspca_dev, s32 val) in setsharpness() argument
1010 sccb_reg_write(gspca_dev, 0x91, val); /* Auto de-noise threshold */ in setsharpness()
1011 sccb_reg_write(gspca_dev, 0x8e, val); /* De-noise threshold */ in setsharpness()
1017 u8 val; in sethvflip() local
1020 val = sccb_reg_read(gspca_dev, 0x1e); /* mvfp */ in sethvflip()
1021 val &= ~0x30; in sethvflip()
1023 val |= 0x20; in sethvflip()
1025 val |= 0x10; in sethvflip()
1026 sccb_reg_write(gspca_dev, 0x1e, val); in sethvflip()
1028 val = sccb_reg_read(gspca_dev, 0x0c); in sethvflip()
1029 val &= ~0xc0; in sethvflip()
1031 val |= 0x40; in sethvflip()
1033 val |= 0x80; in sethvflip()
1034 sccb_reg_write(gspca_dev, 0x0c, val); in sethvflip()
1038 static void setlightfreq(struct gspca_dev *gspca_dev, s32 val) in setlightfreq() argument
1042 val = val ? 0x9e : 0x00; in setlightfreq()
1045 if (val) in setlightfreq()
1046 val = 0x9d; /* insert dummy to 25fps for 50Hz */ in setlightfreq()
1048 sccb_reg_write(gspca_dev, 0x2b, val); in setlightfreq()
1077 if (ctrl->val && sd->gain && gspca_dev->streaming) in ov534_g_volatile_ctrl()
1078 sd->gain->val = getgain(gspca_dev); in ov534_g_volatile_ctrl()
1083 if (ctrl->val == V4L2_EXPOSURE_AUTO && sd->exposure && in ov534_g_volatile_ctrl()
1085 sd->exposure->val = getexposure(gspca_dev); in ov534_g_volatile_ctrl()
1102 sethue(gspca_dev, ctrl->val); in ov534_s_ctrl()
1105 setsaturation(gspca_dev, ctrl->val); in ov534_s_ctrl()
1108 setbrightness(gspca_dev, ctrl->val); in ov534_s_ctrl()
1111 setcontrast(gspca_dev, ctrl->val); in ov534_s_ctrl()
1115 setagc(gspca_dev, ctrl->val); in ov534_s_ctrl()
1116 if (!gspca_dev->usb_err && !ctrl->val && sd->gain) in ov534_s_ctrl()
1117 setgain(gspca_dev, sd->gain->val); in ov534_s_ctrl()
1120 setawb(gspca_dev, ctrl->val); in ov534_s_ctrl()
1124 setaec(gspca_dev, ctrl->val); in ov534_s_ctrl()
1125 if (!gspca_dev->usb_err && ctrl->val == V4L2_EXPOSURE_MANUAL && in ov534_s_ctrl()
1127 setexposure(gspca_dev, sd->exposure->val); in ov534_s_ctrl()
1130 setsharpness(gspca_dev, ctrl->val); in ov534_s_ctrl()
1133 sethvflip(gspca_dev, ctrl->val, sd->vflip->val); in ov534_s_ctrl()
1136 sethvflip(gspca_dev, sd->hflip->val, ctrl->val); in ov534_s_ctrl()
1139 setlightfreq(gspca_dev, ctrl->val); in ov534_s_ctrl()
1304 reg_w_array(gspca_dev, bridge_init[sd->sensor].val, in sd_init()
1307 sccb_w_array(gspca_dev, sensor_init[sd->sensor].val, in sd_init()
1347 reg_w_array(gspca_dev, bridge_start[sd->sensor][mode].val, in sd_start()
1349 sccb_w_array(gspca_dev, sensor_start[sd->sensor][mode].val, in sd_start()