diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-05-29 10:19:01 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-17 09:44:21 -0300 |
commit | 32cb3b09f4716583921d3244f67893441bfb9af2 (patch) | |
tree | aadb11321a5965f5ffefba84f9e3b346971b095b /drivers/media | |
parent | 55852cbbae45e3bbb5ef7a5f1213ed34ff6209f9 (diff) | |
download | op-kernel-dev-32cb3b09f4716583921d3244f67893441bfb9af2.zip op-kernel-dev-32cb3b09f4716583921d3244f67893441bfb9af2.tar.gz |
[media] vpx3220: fix querystd
Return V4L2_STD_UNKNOWN if no signal is detected.
Otherwise AND the standard mask with the detected standards.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/i2c/vpx3220.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/i2c/vpx3220.c b/drivers/media/i2c/vpx3220.c index 4c57d8a..ece90df 100644 --- a/drivers/media/i2c/vpx3220.c +++ b/drivers/media/i2c/vpx3220.c @@ -295,7 +295,7 @@ static int vpx3220_init(struct v4l2_subdev *sd, u32 val) static int vpx3220_status(struct v4l2_subdev *sd, u32 *pstatus, v4l2_std_id *pstd) { int res = V4L2_IN_ST_NO_SIGNAL, status; - v4l2_std_id std = 0; + v4l2_std_id std = pstd ? *pstd : V4L2_STD_ALL; status = vpx3220_fp_read(sd, 0x0f3); @@ -312,19 +312,21 @@ static int vpx3220_status(struct v4l2_subdev *sd, u32 *pstatus, v4l2_std_id *pst case 0x10: case 0x14: case 0x18: - std = V4L2_STD_PAL; + std &= V4L2_STD_PAL; break; case 0x08: - std = V4L2_STD_SECAM; + std &= V4L2_STD_SECAM; break; case 0x04: case 0x0c: case 0x1c: - std = V4L2_STD_NTSC; + std &= V4L2_STD_NTSC; break; } + } else { + std = V4L2_STD_UNKNOWN; } if (pstd) *pstd = std; |