提交 de00448f 编写于 作者: J Jean-Francois Moine 提交者: Mauro Carvalho Chehab

V4L/DVB (8823): gspca: H and V flips work for ov7670 only in ov519.

Signed-off-by: NJean-Francois Moine <moinejf@free.fr>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 012d6b02
...@@ -126,6 +126,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -126,6 +126,7 @@ static struct ctrl sd_ctrls[] = {
.get = sd_getcolors, .get = sd_getcolors,
}, },
/* next controls work with ov7670 only */ /* next controls work with ov7670 only */
#define HFLIP_IDX 3
{ {
{ {
.id = V4L2_CID_HFLIP, .id = V4L2_CID_HFLIP,
...@@ -140,6 +141,7 @@ static struct ctrl sd_ctrls[] = { ...@@ -140,6 +141,7 @@ static struct ctrl sd_ctrls[] = {
.set = sd_sethflip, .set = sd_sethflip,
.get = sd_gethflip, .get = sd_gethflip,
}, },
#define VFLIP_IDX 4
{ {
{ {
.id = V4L2_CID_VFLIP, .id = V4L2_CID_VFLIP,
...@@ -1370,6 +1372,9 @@ static int sd_config(struct gspca_dev *gspca_dev, ...@@ -1370,6 +1372,9 @@ static int sd_config(struct gspca_dev *gspca_dev,
sd->colors = COLOR_DEF; sd->colors = COLOR_DEF;
sd->hflip = HFLIP_DEF; sd->hflip = HFLIP_DEF;
sd->vflip = VFLIP_DEF; sd->vflip = VFLIP_DEF;
if (sd->sensor != SEN_OV7670)
gspca_dev->ctrl_dis = (1 << HFLIP_IDX)
| (1 << VFLIP_IDX);
return 0; return 0;
error: error:
PDEBUG(D_ERR, "OV519 Config failed"); PDEBUG(D_ERR, "OV519 Config failed");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册