Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261577
b: refs/heads/master
c: de99d53
h: refs/heads/master
i:
  261575: 75df15c
v: v3
  • Loading branch information
Devin Heitmueller authored and Mauro Carvalho Chehab committed Jul 27, 2011
1 parent c7bb77d commit dd9e74c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 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: 44ecf1df9493e6684cd1bb34abb107a0ffe1078a
refs/heads/master: de99d5328c6d54694471da28711a05adec708c3b
15 changes: 14 additions & 1 deletion trunk/drivers/media/video/cx231xx/cx231xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,8 @@ static int vidioc_enum_input(struct file *file, void *priv,
{
struct cx231xx_fh *fh = priv;
struct cx231xx *dev = fh->dev;
unsigned int n;
u32 gen_stat;
unsigned int ret, n;

n = i->index;
if (n >= MAX_CX231XX_INPUT)
Expand All @@ -1198,6 +1199,18 @@ static int vidioc_enum_input(struct file *file, void *priv,

i->std = dev->vdev->tvnorms;

/* If they are asking about the active input, read signal status */
if (n == dev->video_input) {
ret = cx231xx_read_i2c_data(dev, VID_BLK_I2C_ADDRESS,
GEN_STAT, 2, &gen_stat, 4);
if (ret > 0) {
if ((gen_stat & FLD_VPRES) == 0x00)
i->status |= V4L2_IN_ST_NO_SIGNAL;
if ((gen_stat & FLD_HLOCK) == 0x00)
i->status |= V4L2_IN_ST_NO_H_LOCK;
}
}

return 0;
}

Expand Down

0 comments on commit dd9e74c

Please sign in to comment.