Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333837
b: refs/heads/master
c: 34e59a7
h: refs/heads/master
i:
  333835: d9d51b4
v: v3
  • Loading branch information
Guilherme Herrmann Destefani authored and Mauro Carvalho Chehab committed Oct 6, 2012
1 parent 5eabde4 commit 3cde943
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 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: 38a7996cbb26ddd6b595e2fafa9742aefcb2f115
refs/heads/master: 34e59a7d45950b1a03e498d34c1baf4998218cd7
30 changes: 26 additions & 4 deletions trunk/drivers/media/pci/bt8xx/bttv-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,12 @@ static const struct v4l2_queryctrl bttv_ctls[] = {
.default_value = 32768,
.type = V4L2_CTRL_TYPE_INTEGER,
},{
.id = V4L2_CID_COLOR_KILLER,
.name = "Color killer",
.minimum = 0,
.maximum = 1,
.type = V4L2_CTRL_TYPE_BOOLEAN,
}, {
.id = V4L2_CID_HUE,
.name = "Hue",
.minimum = 0,
Expand Down Expand Up @@ -1474,6 +1480,9 @@ static int bttv_g_ctrl(struct file *file, void *priv,
case V4L2_CID_SATURATION:
c->value = btv->saturation;
break;
case V4L2_CID_COLOR_KILLER:
c->value = btv->opt_color_killer;
break;

case V4L2_CID_AUDIO_MUTE:
case V4L2_CID_AUDIO_VOLUME:
Expand Down Expand Up @@ -1526,7 +1535,6 @@ static int bttv_s_ctrl(struct file *file, void *f,
struct v4l2_control *c)
{
int err;
int val;
struct bttv_fh *fh = f;
struct bttv *btv = fh->btv;

Expand All @@ -1547,6 +1555,16 @@ static int bttv_s_ctrl(struct file *file, void *f,
case V4L2_CID_SATURATION:
bt848_sat(btv, c->value);
break;
case V4L2_CID_COLOR_KILLER:
btv->opt_color_killer = c->value;
if (btv->opt_color_killer) {
btor(BT848_SCLOOP_CKILL, BT848_E_SCLOOP);
btor(BT848_SCLOOP_CKILL, BT848_O_SCLOOP);
} else {
btand(~BT848_SCLOOP_CKILL, BT848_E_SCLOOP);
btand(~BT848_SCLOOP_CKILL, BT848_O_SCLOOP);
}
break;
case V4L2_CID_AUDIO_MUTE:
audio_mute(btv, c->value);
/* fall through */
Expand All @@ -1564,9 +1582,13 @@ static int bttv_s_ctrl(struct file *file, void *f,

case V4L2_CID_PRIVATE_CHROMA_AGC:
btv->opt_chroma_agc = c->value;
val = btv->opt_chroma_agc ? BT848_SCLOOP_CAGC : 0;
btwrite(val, BT848_E_SCLOOP);
btwrite(val, BT848_O_SCLOOP);
if (btv->opt_chroma_agc) {
btor(BT848_SCLOOP_CAGC, BT848_E_SCLOOP);
btor(BT848_SCLOOP_CAGC, BT848_O_SCLOOP);
} else {
btand(~BT848_SCLOOP_CAGC, BT848_E_SCLOOP);
btand(~BT848_SCLOOP_CAGC, BT848_O_SCLOOP);
}
break;
case V4L2_CID_PRIVATE_COMBFILTER:
btv->opt_combfilter = c->value;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/pci/bt8xx/bttvp.h
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ struct bttv {
int opt_lumafilter;
int opt_automute;
int opt_chroma_agc;
int opt_color_killer;
int opt_adc_crush;
int opt_vcr_hack;
int opt_whitecrush_upper;
Expand Down

0 comments on commit 3cde943

Please sign in to comment.