diff pwc-v4l2-20051228-042701/pwc-ctrl.c pwc-mine/pwc-ctrl.c 1002c1002 < static inline int pwc_set_contour(struct pwc_device *pdev, int contour) --- > inline int pwc_set_contour(struct pwc_device *pdev, int contour) 1027c1027 < static inline int pwc_get_contour(struct pwc_device *pdev, int *contour) --- > inline int pwc_get_contour(struct pwc_device *pdev, int *contour) 1049c1049 < static inline int pwc_set_backlight(struct pwc_device *pdev, int backlight) --- > inline int pwc_set_backlight(struct pwc_device *pdev, int backlight) 1060c1060 < static inline int pwc_get_backlight(struct pwc_device *pdev, int *backlight) --- > inline int pwc_get_backlight(struct pwc_device *pdev, int *backlight) 1071a1072,1094 > int pwc_set_colour_mode(struct pwc_device *pdev, int colour) > { > unsigned char buf; > > if (colour) > buf = 0xff; > else > buf = 0x0; > return SendControlMsg(SET_CHROM_CTL, COLOUR_MODE_FORMATTER, 1); > } > > int pwc_get_colour_mode(struct pwc_device *pdev, int *colour) > { > int ret; > unsigned char buf; > > ret = RecvControlMsg(GET_CHROM_CTL, COLOUR_MODE_FORMATTER, 1); > if (ret < 0) > return ret; > *colour = buf; > return 0; > } > 1073c1096 < static inline int pwc_set_flicker(struct pwc_device *pdev, int flicker) --- > inline int pwc_set_flicker(struct pwc_device *pdev, int flicker) 1084c1107 < static inline int pwc_get_flicker(struct pwc_device *pdev, int *flicker) --- > inline int pwc_get_flicker(struct pwc_device *pdev, int *flicker) 1097c1120 < static inline int pwc_set_dynamic_noise(struct pwc_device *pdev, int noise) --- > inline int pwc_set_dynamic_noise(struct pwc_device *pdev, int noise) 1109c1132 < static inline int pwc_get_dynamic_noise(struct pwc_device *pdev, int *noise) --- > inline int pwc_get_dynamic_noise(struct pwc_device *pdev, int *noise) diff pwc-v4l2-20051228-042701/pwc.h pwc-mine/pwc.h 290a291,301 > extern int pwc_set_colour_mode(struct pwc_device *pdev, int colour); > extern int pwc_get_colour_mode(struct pwc_device *pdev, int *colour); > extern int pwc_set_contour(struct pwc_device *pdev, int contour); > extern int pwc_get_contour(struct pwc_device *pdev, int *contour); > extern int pwc_set_backlight(struct pwc_device *pdev, int backlight); > extern int pwc_get_backlight(struct pwc_device *pdev, int *backlight); > extern int pwc_set_flicker(struct pwc_device *pdev, int flicker); > extern int pwc_get_flicker(struct pwc_device *pdev, int *flicker); > extern int pwc_set_dynamic_noise(struct pwc_device *pdev, int noise); > extern int pwc_get_dynamic_noise(struct pwc_device *pdev, int *noise); > diff pwc-v4l2-20051228-042701/pwc-ioctl.h pwc-mine/pwc-ioctl.h 304a305,310 > #define V4L2_CID_PRIVATE_COLOUR_MODE (V4L2_CID_PRIVATE_BASE + 3) > #define V4L2_CID_PRIVATE_AUTOCONTOUR (V4L2_CID_PRIVATE_BASE + 4) > #define V4L2_CID_PRIVATE_CONTOUR (V4L2_CID_PRIVATE_BASE + 5) > #define V4L2_CID_PRIVATE_BACKLIGHT (V4L2_CID_PRIVATE_BASE + 6) > #define V4L2_CID_PRIVATE_FLICKERLESS (V4L2_CID_PRIVATE_BASE + 7) > #define V4L2_CID_PRIVATE_NOISE_REDUCTION (V4L2_CID_PRIVATE_BASE + 8) diff pwc-v4l2-20051228-042701/pwc-v4l.c pwc-mine/pwc-v4l.c 130a131 > #define XAWTV_HAS_BEEN_FIXED 1 158c159,213 < }, --- > }, > { > .id = V4L2_CID_PRIVATE_COLOUR_MODE, > .type = V4L2_CTRL_TYPE_BOOLEAN, > .name = "Colour mode", > .minimum = 0, > .maximum = 1, > .step = 1, > .default_value = 0, > }, > { > .id = V4L2_CID_PRIVATE_AUTOCONTOUR, > .type = V4L2_CTRL_TYPE_BOOLEAN, > .name = "Auto contour", > .minimum = 0, > .maximum = 1, > .step = 1, > .default_value = 0, > }, > { > .id = V4L2_CID_PRIVATE_CONTOUR, > .type = V4L2_CTRL_TYPE_INTEGER, > .name = "Contour", > .minimum = 0, > .maximum = 63, > .step = 1, > .default_value = 0, > }, > { > .id = V4L2_CID_PRIVATE_BACKLIGHT, > .type = V4L2_CTRL_TYPE_BOOLEAN, > .name = "Backlight compensation", > .minimum = 0, > .maximum = 1, > .step = 1, > .default_value = 0, > }, > { > .id = V4L2_CID_PRIVATE_FLICKERLESS, > .type = V4L2_CTRL_TYPE_BOOLEAN, > .name = "Flickerless", > .minimum = 0, > .maximum = 1, > .step = 1, > .default_value = 0, > }, > { > .id = V4L2_CID_PRIVATE_NOISE_REDUCTION, > .type = V4L2_CTRL_TYPE_INTEGER, > .name = "Noise reduction", > .minimum = 0, > .maximum = 3, > .step = 1, > .default_value = 0, > }, 660c715,751 < case V4L2_CID_PRIVATE_SAVE_USER: --- > case V4L2_CID_PRIVATE_COLOUR_MODE: > ret = pwc_get_colour_mode(pdev, &c->value); > if (ret < 0) > return -EINVAL; > c->value=(c->value?1:0); > return 0; > > case V4L2_CID_PRIVATE_AUTOCONTOUR: > ret = pwc_get_contour(pdev, &c->value); > if (ret < 0) > return -EINVAL; > c->value=(c->value == -1?1:0); > return 0; > case V4L2_CID_PRIVATE_CONTOUR: > ret = pwc_get_contour(pdev, &c->value); > if (ret < 0) > return -EINVAL; > c->value >>= 10; > return 0; > case V4L2_CID_PRIVATE_BACKLIGHT: > ret = pwc_get_backlight(pdev, &c->value); > if (ret < 0) > return -EINVAL; > c->value=(c->value?1:0); > return 0; > case V4L2_CID_PRIVATE_FLICKERLESS: > ret = pwc_get_flicker(pdev, &c->value); > if (ret < 0) > return -EINVAL; > c->value=(c->value?1:0); > case V4L2_CID_PRIVATE_NOISE_REDUCTION: > ret = pwc_get_dynamic_noise(pdev, &c->value); > if (ret < 0) > return -EINVAL; > return 0; > > case V4L2_CID_PRIVATE_SAVE_USER: 675c766 < c->value <<= 8; --- > c->value <<= 9; 681c772 < c->value <<= 8; --- > c->value <<= 10; 685a777,782 > case V4L2_CID_SATURATION: > c->value = 32768 + c->value * 327; > ret = pwc_set_saturation(pdev, c->value); > if (ret<0) > return -EINVAL; > return 0; 687c784 < c->value <<= 8; --- > c->value <<= 11; 741a839,869 > case V4L2_CID_PRIVATE_COLOUR_MODE: > ret = pwc_set_colour_mode(pdev, c->value); > if (ret < 0) > return -EINVAL; > return 0; > case V4L2_CID_PRIVATE_AUTOCONTOUR: > c->value=(c->value == 1)?-1:0; > ret = pwc_set_contour(pdev, c->value); > if (ret < 0) > return -EINVAL; > return 0; > case V4L2_CID_PRIVATE_CONTOUR: > c->value <<= 10; > ret = pwc_set_contour(pdev, c->value); > if (ret < 0) > return -EINVAL; > return 0; > case V4L2_CID_PRIVATE_BACKLIGHT: > ret = pwc_set_backlight(pdev, c->value); > if (ret < 0) > return -EINVAL; > return 0; > case V4L2_CID_PRIVATE_FLICKERLESS: > ret = pwc_set_flicker(pdev, c->value); > if (ret < 0) > return -EINVAL; > case V4L2_CID_PRIVATE_NOISE_REDUCTION: > ret = pwc_set_dynamic_noise(pdev, c->value); > if (ret < 0) > return -EINVAL; > return 0;