aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tvaudio.c
diff options
context:
space:
mode:
authorDaniel Glöckner <daniel-gl@gmx.net>2012-06-09 20:43:58 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-06-18 19:46:42 -0400
commit1884e298c1790a24991c518a8cb8f18ab41f4376 (patch)
tree85bb1abab379dd09325c1f1d172ed160a64d0d8d /drivers/media/video/tvaudio.c
parent9e019e075e03814d27c353e5e92a704d10238c13 (diff)
[media] tvaudio: don't report mono when stereo is received
The V4L2 spec says reporting mono and stereo at the same time means the hardware can not distinguish between the two. So when we can, we should report only one of them. Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/tvaudio.c')
-rw-r--r--drivers/media/video/tvaudio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c
index f3ce93a7cf79..1e61cbf1c85e 100644
--- a/drivers/media/video/tvaudio.c
+++ b/drivers/media/video/tvaudio.c
@@ -383,7 +383,7 @@ static int tda9840_getmode(struct CHIPSTATE *chip)
383 if (val & TDA9840_DS_DUAL) 383 if (val & TDA9840_DS_DUAL)
384 mode |= V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2; 384 mode |= V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2;
385 if (val & TDA9840_ST_STEREO) 385 if (val & TDA9840_ST_STEREO)
386 mode |= V4L2_TUNER_SUB_STEREO; 386 mode = V4L2_TUNER_SUB_STEREO;
387 387
388 v4l2_dbg(1, debug, sd, "tda9840_getmode(): raw chip read: %d, return: %d\n", 388 v4l2_dbg(1, debug, sd, "tda9840_getmode(): raw chip read: %d, return: %d\n",
389 val, mode); 389 val, mode);
@@ -541,7 +541,7 @@ static int tda985x_getmode(struct CHIPSTATE *chip)
541 mode = V4L2_TUNER_SUB_MONO; 541 mode = V4L2_TUNER_SUB_MONO;
542 val = chip_read(chip); 542 val = chip_read(chip);
543 if (val & TDA985x_STP) 543 if (val & TDA985x_STP)
544 mode |= V4L2_TUNER_SUB_STEREO; 544 mode = V4L2_TUNER_SUB_STEREO;
545 if (val & TDA985x_SAPP) 545 if (val & TDA985x_SAPP)
546 mode |= V4L2_TUNER_SUB_SAP; 546 mode |= V4L2_TUNER_SUB_SAP;
547 return mode; 547 return mode;
@@ -700,7 +700,7 @@ static int tda9873_getmode(struct CHIPSTATE *chip)
700 val = chip_read(chip); 700 val = chip_read(chip);
701 mode = V4L2_TUNER_SUB_MONO; 701 mode = V4L2_TUNER_SUB_MONO;
702 if (val & TDA9873_STEREO) 702 if (val & TDA9873_STEREO)
703 mode |= V4L2_TUNER_SUB_STEREO; 703 mode = V4L2_TUNER_SUB_STEREO;
704 if (val & TDA9873_DUAL) 704 if (val & TDA9873_DUAL)
705 mode |= V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2; 705 mode |= V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2;
706 v4l2_dbg(1, debug, sd, "tda9873_getmode(): raw chip read: %d, return: %d\n", 706 v4l2_dbg(1, debug, sd, "tda9873_getmode(): raw chip read: %d, return: %d\n",
@@ -918,12 +918,12 @@ static int tda9874a_getmode(struct CHIPSTATE *chip)
918 * external 4052 multiplexer in audio_hook(). 918 * external 4052 multiplexer in audio_hook().
919 */ 919 */
920 if(nsr & 0x02) /* NSR.S/MB=1 */ 920 if(nsr & 0x02) /* NSR.S/MB=1 */
921 mode |= V4L2_TUNER_SUB_STEREO; 921 mode = V4L2_TUNER_SUB_STEREO;
922 if(nsr & 0x01) /* NSR.D/SB=1 */ 922 if(nsr & 0x01) /* NSR.D/SB=1 */
923 mode |= V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2; 923 mode |= V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2;
924 } else { 924 } else {
925 if(dsr & 0x02) /* DSR.IDSTE=1 */ 925 if(dsr & 0x02) /* DSR.IDSTE=1 */
926 mode |= V4L2_TUNER_SUB_STEREO; 926 mode = V4L2_TUNER_SUB_STEREO;
927 if(dsr & 0x04) /* DSR.IDDUA=1 */ 927 if(dsr & 0x04) /* DSR.IDDUA=1 */
928 mode |= V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2; 928 mode |= V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2;
929 } 929 }
@@ -1350,7 +1350,7 @@ static int ta8874z_getmode(struct CHIPSTATE *chip)
1350 if (val & TA8874Z_B1){ 1350 if (val & TA8874Z_B1){
1351 mode |= V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2; 1351 mode |= V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2;
1352 }else if (!(val & TA8874Z_B0)){ 1352 }else if (!(val & TA8874Z_B0)){
1353 mode |= V4L2_TUNER_SUB_STEREO; 1353 mode = V4L2_TUNER_SUB_STEREO;
1354 } 1354 }
1355 /* v4l_dbg(1, debug, chip->c, "ta8874z_getmode(): raw chip read: 0x%02x, return: 0x%02x\n", val, mode); */ 1355 /* v4l_dbg(1, debug, chip->c, "ta8874z_getmode(): raw chip read: 0x%02x, return: 0x%02x\n", val, mode); */
1356 return mode; 1356 return mode;