Commit 7dd8fbbe50c01ead78483bc42f744d115afec96b
Committed by
Mauro Carvalho Chehab
1 parent
ca37157506
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
[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>
Showing 1 changed file with 8 additions and 8 deletions Side-by-side Diff
drivers/media/i2c/adv7183.c
... | ... | @@ -374,28 +374,28 @@ |
374 | 374 | reg = adv7183_read(sd, ADV7183_STATUS_1); |
375 | 375 | switch ((reg >> 0x4) & 0x7) { |
376 | 376 | case 0: |
377 | - *std = V4L2_STD_NTSC; | |
377 | + *std &= V4L2_STD_NTSC; | |
378 | 378 | break; |
379 | 379 | case 1: |
380 | - *std = V4L2_STD_NTSC_443; | |
380 | + *std &= V4L2_STD_NTSC_443; | |
381 | 381 | break; |
382 | 382 | case 2: |
383 | - *std = V4L2_STD_PAL_M; | |
383 | + *std &= V4L2_STD_PAL_M; | |
384 | 384 | break; |
385 | 385 | case 3: |
386 | - *std = V4L2_STD_PAL_60; | |
386 | + *std &= V4L2_STD_PAL_60; | |
387 | 387 | break; |
388 | 388 | case 4: |
389 | - *std = V4L2_STD_PAL; | |
389 | + *std &= V4L2_STD_PAL; | |
390 | 390 | break; |
391 | 391 | case 5: |
392 | - *std = V4L2_STD_SECAM; | |
392 | + *std &= V4L2_STD_SECAM; | |
393 | 393 | break; |
394 | 394 | case 6: |
395 | - *std = V4L2_STD_PAL_Nc; | |
395 | + *std &= V4L2_STD_PAL_Nc; | |
396 | 396 | break; |
397 | 397 | case 7: |
398 | - *std = V4L2_STD_SECAM; | |
398 | + *std &= V4L2_STD_SECAM; | |
399 | 399 | break; |
400 | 400 | default: |
401 | 401 | *std = V4L2_STD_UNKNOWN; |