diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-05-29 09:18:54 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-17 08:42:01 -0400 |
commit | 7dd8fbbe50c01ead78483bc42f744d115afec96b (patch) | |
tree | 4fc9bb2f3039476d83ad452d0e2ffa19bae38df8 /drivers/media/i2c/adv7183.c | |
parent | ca37157506ef53dcf41132aaedab70659509ccee (diff) |
[media] adv7183: fix querystd
If no signal is detected, return V4L2_STD_UNKNOWN. Otherwise AND the standard
with the detected standards.
Note that the v4l2 core initializes the std with tvnorms before calling the
querystd ioctl.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Scott Jiang <scott.jiang.linux@gmail.com>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/i2c/adv7183.c')
-rw-r--r-- | drivers/media/i2c/adv7183.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/i2c/adv7183.c b/drivers/media/i2c/adv7183.c index 980815d37bb1..6f738d8e3a8f 100644 --- a/drivers/media/i2c/adv7183.c +++ b/drivers/media/i2c/adv7183.c | |||
@@ -374,28 +374,28 @@ static int adv7183_querystd(struct v4l2_subdev *sd, v4l2_std_id *std) | |||
374 | reg = adv7183_read(sd, ADV7183_STATUS_1); | 374 | reg = adv7183_read(sd, ADV7183_STATUS_1); |
375 | switch ((reg >> 0x4) & 0x7) { | 375 | switch ((reg >> 0x4) & 0x7) { |
376 | case 0: | 376 | case 0: |
377 | *std = V4L2_STD_NTSC; | 377 | *std &= V4L2_STD_NTSC; |
378 | break; | 378 | break; |
379 | case 1: | 379 | case 1: |
380 | *std = V4L2_STD_NTSC_443; | 380 | *std &= V4L2_STD_NTSC_443; |
381 | break; | 381 | break; |
382 | case 2: | 382 | case 2: |
383 | *std = V4L2_STD_PAL_M; | 383 | *std &= V4L2_STD_PAL_M; |
384 | break; | 384 | break; |
385 | case 3: | 385 | case 3: |
386 | *std = V4L2_STD_PAL_60; | 386 | *std &= V4L2_STD_PAL_60; |
387 | break; | 387 | break; |
388 | case 4: | 388 | case 4: |
389 | *std = V4L2_STD_PAL; | 389 | *std &= V4L2_STD_PAL; |
390 | break; | 390 | break; |
391 | case 5: | 391 | case 5: |
392 | *std = V4L2_STD_SECAM; | 392 | *std &= V4L2_STD_SECAM; |
393 | break; | 393 | break; |
394 | case 6: | 394 | case 6: |
395 | *std = V4L2_STD_PAL_Nc; | 395 | *std &= V4L2_STD_PAL_Nc; |
396 | break; | 396 | break; |
397 | case 7: | 397 | case 7: |
398 | *std = V4L2_STD_SECAM; | 398 | *std &= V4L2_STD_SECAM; |
399 | break; | 399 | break; |
400 | default: | 400 | default: |
401 | *std = V4L2_STD_UNKNOWN; | 401 | *std = V4L2_STD_UNKNOWN; |