浏览代码

V4L/DVB (8164): cx18/ivtv: choose a better initial TV standard for cards without eeprom.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Hans Verkuil 17 年之前
父节点
当前提交
c3cb4d95ae
共有 2 个文件被更改,包括 12 次插入0 次删除
  1. 6 0
      drivers/media/video/cx18/cx18-driver.c
  2. 6 0
      drivers/media/video/ivtv/ivtv-driver.c

+ 6 - 0
drivers/media/video/cx18/cx18-driver.c

@@ -722,6 +722,12 @@ static int __devinit cx18_probe(struct pci_dev *dev,
 	/* if no tuner was found, then pick the first tuner in the card list */
 	/* if no tuner was found, then pick the first tuner in the card list */
 	if (cx->options.tuner == -1 && cx->card->tuners[0].std) {
 	if (cx->options.tuner == -1 && cx->card->tuners[0].std) {
 		cx->std = cx->card->tuners[0].std;
 		cx->std = cx->card->tuners[0].std;
+		if (cx->std & V4L2_STD_PAL)
+			cx->std = V4L2_STD_PAL_BG | V4L2_STD_PAL_H;
+		else if (cx->std & V4L2_STD_NTSC)
+			cx->std = V4L2_STD_NTSC_M;
+		else if (cx->std & V4L2_STD_SECAM)
+			cx->std = V4L2_STD_SECAM_L;
 		cx->options.tuner = cx->card->tuners[0].tuner;
 		cx->options.tuner = cx->card->tuners[0].tuner;
 	}
 	}
 	if (cx->options.radio == -1)
 	if (cx->options.radio == -1)

+ 6 - 0
drivers/media/video/ivtv/ivtv-driver.c

@@ -1128,6 +1128,12 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
 	/* if no tuner was found, then pick the first tuner in the card list */
 	/* if no tuner was found, then pick the first tuner in the card list */
 	if (itv->options.tuner == -1 && itv->card->tuners[0].std) {
 	if (itv->options.tuner == -1 && itv->card->tuners[0].std) {
 		itv->std = itv->card->tuners[0].std;
 		itv->std = itv->card->tuners[0].std;
+		if (itv->std & V4L2_STD_PAL)
+			itv->std = V4L2_STD_PAL_BG | V4L2_STD_PAL_H;
+		else if (itv->std & V4L2_STD_NTSC)
+			itv->std = V4L2_STD_NTSC_M;
+		else if (itv->std & V4L2_STD_SECAM)
+			itv->std = V4L2_STD_SECAM_L;
 		itv->options.tuner = itv->card->tuners[0].tuner;
 		itv->options.tuner = itv->card->tuners[0].tuner;
 	}
 	}
 	if (itv->options.radio == -1)
 	if (itv->options.radio == -1)