Re: Re: [v4l-dvb-maintainer] VBI OOPS 2.6.17.8

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hello,

Michael Hunold wrote:
Hello Philipp,

I trimmed LKML from the CC list.

on 14.08.2006 11:37 Philipp Matthias Hahn said the following:

Starting "kdetv" by accident on my Siemens DVB-C 1.x produced the
following OOPS, because kdetv did open "/dev/vbi0". The OOPS is
100% reproduceable.

this is a known issue with the analogtuner part of siemens dvb-c, ive stated that in my mail with my patch, the tuner code is buggy and may oops with tvtime or kdetv, cause of their driver access/capture behaviour.
but it has worked for months here with xawtv 3.94.

checking further...



libzvbi:capture_v4l2k_new: /dev/vbi0 (dvb) is a v4l2 vbi device,


This is about VBI capture on the *analog* parts of a DVB-C card, ie. on
the analog cable channels that can be viewed through the saa711x on the
saa7146 input channel b.

What is the current status anyway? Did somebody ever got this to work?

yes, see list archives and attachment. CVBS imput and tuning is working here fine with xawtv since i created the patch. the patch was created to be able to use the saa7113 input from the analog card extension board, i suggested to plug in an old VHS or other as tuner, since the tda9819 analog part of the siemens card is low analogtv-demodulation quality anyway...


If not, then the easiest "fix" is to remove V4L2_CAP_VBI_CAPTURE from
struct saa7146_ext_vv av7110_vv_data_c in av7110_v4l.c

objection, thats no solution so far.


CU
Michael.

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb



y
tom schorpp
--- Begin Message ---
The patch titled

     dvb: av7110: Siemens DVB-C analog video input support

has been removed from the -mm tree.  Its filename is

     dvb-av7110-siemens-dvb-c-analog-video-input-support.patch

This patch was probably dropped from -mm because
it has already been merged into a subsystem tree
or into Linus's tree


Patches currently in -mm which might be from t.schorpp@xxxxxx are




From: thomas schorpp <t.schorpp@xxxxxx>

Add support for analog video inputs (CVBS and Y/C) of the
analog module for the Siemens DVB-C card.

Signed-off-by: thomas schorpp <t.schorpp@xxxxxx>
Signed-off-by: Johannes Stezenbach <js@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/media/dvb/ttpci/av7110_v4l.c |   74 +++++++++++++++++++++++++----------
 1 files changed, 54 insertions(+), 20 deletions(-)

diff -puN drivers/media/dvb/ttpci/av7110_v4l.c~dvb-av7110-siemens-dvb-c-analog-video-input-support drivers/media/dvb/ttpci/av7110_v4l.c
--- devel/drivers/media/dvb/ttpci/av7110_v4l.c~dvb-av7110-siemens-dvb-c-analog-video-input-support	2005-09-09 12:33:08.000000000 -0700
+++ devel-akpm/drivers/media/dvb/ttpci/av7110_v4l.c	2005-09-09 12:33:08.000000000 -0700
@@ -70,7 +70,7 @@ static int msp_readreg(struct av7110 *av
 	return 0;
 }
 
-static struct v4l2_input inputs[2] = {
+static struct v4l2_input inputs[4] = {
 	{
 		.index		= 0,
 		.name		= "DVB",
@@ -87,6 +87,22 @@ static struct v4l2_input inputs[2] = {
 		.tuner		= 0,
 		.std		= V4L2_STD_PAL_BG|V4L2_STD_NTSC_M,
 		.status		= 0,
+	}, {
+		.index		= 2,
+		.name		= "Video",
+		.type		= V4L2_INPUT_TYPE_CAMERA,
+		.audioset	= 0,
+		.tuner		= 0,
+		.std		= V4L2_STD_PAL_BG|V4L2_STD_NTSC_M,
+		.status		= 0,
+	}, {
+		.index		= 3,
+		.name		= "Y/C",
+		.type		= V4L2_INPUT_TYPE_CAMERA,
+		.audioset	= 0,
+		.tuner		= 0,
+		.std		= V4L2_STD_PAL_BG|V4L2_STD_NTSC_M,
+		.status		= 0,
 	}
 };
 
@@ -212,24 +228,44 @@ static int av7110_dvb_c_switch(struct sa
 	}
 
 	if (0 != av7110->current_input) {
+		dprintk(1, "switching to analog TV:\n");
 		adswitch = 1;
 		source = SAA7146_HPS_SOURCE_PORT_B;
 		sync = SAA7146_HPS_SYNC_PORT_B;
 		memcpy(standard, analog_standard, sizeof(struct saa7146_standard) * 2);
-		dprintk(1, "switching to analog TV\n");
-		msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0000); // loudspeaker source
-		msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0000); // headphone source
-		msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0000); // SCART 1 source
-		msp_writereg(av7110, MSP_WR_DSP, 0x000e, 0x3000); // FM matrix, mono
-		msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x4f00); // loudspeaker + headphone
-		msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x4f00); // SCART 1 volume
 
-		if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) {
-			if (ves1820_writereg(dev, 0x09, 0x0f, 0x60))
-				dprintk(1, "setting band in demodulator failed.\n");
-		} else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) {
-			saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); // TDA9198 pin9(STD)
-			saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI); // TDA9198 pin30(VIF)
+		switch (av7110->current_input) {
+		case 1:
+			dprintk(1, "switching SAA7113 to Analog Tuner Input.\n");
+			msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0000); // loudspeaker source
+			msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0000); // headphone source
+			msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0000); // SCART 1 source
+			msp_writereg(av7110, MSP_WR_DSP, 0x000e, 0x3000); // FM matrix, mono
+			msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x4f00); // loudspeaker + headphone
+			msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x4f00); // SCART 1 volume
+
+			if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) {
+				if (ves1820_writereg(dev, 0x09, 0x0f, 0x60))
+					dprintk(1, "setting band in demodulator failed.\n");
+			} else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) {
+				saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); // TDA9198 pin9(STD)
+				saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI); // TDA9198 pin30(VIF)
+			}
+			if (i2c_writereg(av7110, 0x48, 0x02, 0xd0) != 1)
+				dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num);
+			break;
+		case 2:
+			dprintk(1, "switching SAA7113 to Video AV CVBS Input.\n");
+			if (i2c_writereg(av7110, 0x48, 0x02, 0xd2) != 1)
+				dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num);
+			break;
+		case 3:
+			dprintk(1, "switching SAA7113 to Video AV Y/C Input.\n");
+			if (i2c_writereg(av7110, 0x48, 0x02, 0xd9) != 1)
+				dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num);
+			break;
+		default:
+			dprintk(1, "switching SAA7113 to Input: AV7110: SAA7113: invalid input.\n");
 		}
 	} else {
 		adswitch = 0;
@@ -300,7 +336,6 @@ static int av7110_ioctl(struct saa7146_f
 		// FIXME: standard / stereo detection is still broken
 		msp_readreg(av7110, MSP_RD_DEM, 0x007e, &stereo_det);
 		dprintk(1, "VIDIOC_G_TUNER: msp3400 TV standard detection: 0x%04x\n", stereo_det);
-
 		msp_readreg(av7110, MSP_RD_DSP, 0x0018, &stereo_det);
 		dprintk(1, "VIDIOC_G_TUNER: msp3400 stereo detection: 0x%04x\n", stereo_det);
 		stereo = (s8)(stereo_det >> 8);
@@ -310,7 +345,7 @@ static int av7110_ioctl(struct saa7146_f
 			t->audmode = V4L2_TUNER_MODE_STEREO;
 		}
 		else if (stereo < -0x10) {
-			/* bilingual*/
+			/* bilingual */
 			t->rxsubchans = V4L2_TUNER_SUB_LANG1 | V4L2_TUNER_SUB_LANG2;
 			t->audmode = V4L2_TUNER_MODE_LANG1;
 		}
@@ -344,7 +379,7 @@ static int av7110_ioctl(struct saa7146_f
 			fm_matrix = 0x3000; // mono
 			src = 0x0010;
 			break;
-		default: /* case V4L2_TUNER_MODE_MONO: {*/
+		default: /* case V4L2_TUNER_MODE_MONO: */
 			dprintk(2, "VIDIOC_S_TUNER: TDA9840_SET_MONO\n");
 			fm_matrix = 0x3000; // mono
 			src = 0x0030;
@@ -406,7 +441,7 @@ static int av7110_ioctl(struct saa7146_f
 		dprintk(2, "VIDIOC_ENUMINPUT: %d\n", i->index);
 
 		if (av7110->analog_tuner_flags) {
-			if (i->index < 0 || i->index >= 2)
+			if (i->index < 0 || i->index >= 4)
 				return -EINVAL;
 		} else {
 			if (i->index != 0)
@@ -433,10 +468,9 @@ static int av7110_ioctl(struct saa7146_f
 		if (!av7110->analog_tuner_flags)
 			return 0;
 
-		if (input < 0 || input >= 2)
+		if (input < 0 || input >= 4)
 			return -EINVAL;
 
-		/* FIXME: switch inputs here */
 		av7110->current_input = input;
 		return av7110_dvb_c_switch(fh);
 	}
_



--- End Message ---
_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux