Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261563
b: refs/heads/master
c: eea16e3
h: refs/heads/master
i:
  261561: fd0cbad
  261559: 967944e
v: v3
  • Loading branch information
istvan_v@mailbox.hu authored and Mauro Carvalho Chehab committed Jul 27, 2011
1 parent 669ac9a commit aa3d63c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fef1c8d01847f05f01bf04dbae4409d72ed9a2cd
refs/heads/master: eea16e3661f7177ba106780a2f6cbf373d73bab1
4 changes: 2 additions & 2 deletions trunk/drivers/media/video/cx88/cx88-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,8 @@ int cx88_set_scale(struct cx88_core *core, unsigned int width, unsigned int heig
if (nocomb)
value |= (3 << 5); // disable comb filter

cx_write(MO_FILTER_EVEN, value);
cx_write(MO_FILTER_ODD, value);
cx_andor(MO_FILTER_EVEN, 0x7ffc7f, value); /* preserve PEAKEN, PSEL */
cx_andor(MO_FILTER_ODD, 0x7ffc7f, value);
dprintk(1,"set_scale: filter 0x%04x\n", value);

return 0;
Expand Down
29 changes: 28 additions & 1 deletion trunk/drivers/media/video/cx88/cx88-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,23 @@ static const struct cx88_ctrl cx8800_ctls[] = {
.reg = MO_UV_SATURATION,
.mask = 0x00ff,
.shift = 0,
},{
}, {
.v = {
.id = V4L2_CID_SHARPNESS,
.name = "Sharpness",
.minimum = 0,
.maximum = 4,
.step = 1,
.default_value = 0x0,
.type = V4L2_CTRL_TYPE_INTEGER,
},
.off = 0,
/* NOTE: the value is converted and written to both even
and odd registers in the code */
.reg = MO_FILTER_ODD,
.mask = 7 << 7,
.shift = 7,
}, {
.v = {
.id = V4L2_CID_CHROMA_AGC,
.name = "Chroma AGC",
Expand Down Expand Up @@ -301,6 +317,7 @@ const u32 cx88_user_ctrls[] = {
V4L2_CID_AUDIO_VOLUME,
V4L2_CID_AUDIO_BALANCE,
V4L2_CID_AUDIO_MUTE,
V4L2_CID_SHARPNESS,
V4L2_CID_CHROMA_AGC,
V4L2_CID_COLOR_KILLER,
0
Expand Down Expand Up @@ -963,6 +980,10 @@ int cx88_get_control (struct cx88_core *core, struct v4l2_control *ctl)
case V4L2_CID_AUDIO_VOLUME:
ctl->value = 0x3f - (value & 0x3f);
break;
case V4L2_CID_SHARPNESS:
ctl->value = ((value & 0x0200) ? (((value & 0x0180) >> 7) + 1)
: 0);
break;
default:
ctl->value = ((value + (c->off << c->shift)) & c->mask) >> c->shift;
break;
Expand Down Expand Up @@ -1040,6 +1061,12 @@ int cx88_set_control(struct cx88_core *core, struct v4l2_control *ctl)
}
mask=0xffff;
break;
case V4L2_CID_SHARPNESS:
/* 0b000, 0b100, 0b101, 0b110, or 0b111 */
value = (ctl->value < 1 ? 0 : ((ctl->value + 3) << 7));
/* needs to be set for both fields */
cx_andor(MO_FILTER_EVEN, mask, value);
break;
case V4L2_CID_CHROMA_AGC:
/* Do not allow chroma AGC to be enabled for SECAM */
value = ((ctl->value - c->off) << c->shift) & c->mask;
Expand Down

0 comments on commit aa3d63c

Please sign in to comment.