Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bc7400a authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (3692): Keep experimental SLICED_VBI defines under an #if 0



The sliced VBI defines added in videodev2.h are removed since requires
more discussion.

Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 2868c41f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -152,7 +152,7 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg)
	case VIDIOC_G_FMT:
	{
		static u16 lcr2vbi[] = {
			0, V4L2_SLICED_TELETEXT_PAL_B, 0,	/* 1 */
			0, V4L2_SLICED_TELETEXT_B, 0,	/* 1 */
			0, V4L2_SLICED_WSS_625, 0,	/* 4 */
			V4L2_SLICED_CAPTION_525,	/* 6 */
			0, 0, V4L2_SLICED_VPS, 0, 0,	/* 9 */
@@ -232,7 +232,7 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg)
		for (i = 7; i <= 23; i++) {
			for (x = 0; x <= 1; x++) {
				switch (svbi->service_lines[1-x][i]) {
				case V4L2_SLICED_TELETEXT_PAL_B:
				case V4L2_SLICED_TELETEXT_B:
					lcr[i] |= 1 << (4 * x);
					break;
				case V4L2_SLICED_WSS_625:
@@ -283,7 +283,7 @@ int cx25840_vbi(struct i2c_client *client, unsigned int cmd, void *arg)

		switch (id2) {
		case 1:
			id2 = V4L2_SLICED_TELETEXT_PAL_B;
			id2 = V4L2_SLICED_TELETEXT_B;
			break;
		case 4:
			id2 = V4L2_SLICED_WSS_625;
+3 −3
Original line number Diff line number Diff line
@@ -852,7 +852,7 @@ static void saa7115_set_lcr(struct i2c_client *client, struct v4l2_sliced_vbi_fo
					case 0:
						lcr[i] |= 0xf << (4 * x);
						break;
					case V4L2_SLICED_TELETEXT_PAL_B:
					case V4L2_SLICED_TELETEXT_B:
						lcr[i] |= 1 << (4 * x);
						break;
					case V4L2_SLICED_CAPTION_525:
@@ -881,7 +881,7 @@ static void saa7115_set_lcr(struct i2c_client *client, struct v4l2_sliced_vbi_fo
static int saa7115_get_v4lfmt(struct i2c_client *client, struct v4l2_format *fmt)
{
	static u16 lcr2vbi[] = {
		0, V4L2_SLICED_TELETEXT_PAL_B, 0,	/* 1 */
		0, V4L2_SLICED_TELETEXT_B, 0,	/* 1 */
		0, V4L2_SLICED_CAPTION_525,	/* 4 */
		V4L2_SLICED_WSS_625, 0,		/* 5 */
		V4L2_SLICED_VPS, 0, 0, 0, 0,	/* 7 */
@@ -1046,7 +1046,7 @@ static void saa7115_decode_vbi_line(struct i2c_client *client,
	/* decode payloads */
	switch (id2) {
	case 1:
		vbi->type = V4L2_SLICED_TELETEXT_PAL_B;
		vbi->type = V4L2_SLICED_TELETEXT_B;
		break;
	case 4:
		if (!saa7115_odd_parity(p[0]) || !saa7115_odd_parity(p[1]))
+9 −1
Original line number Diff line number Diff line
@@ -500,16 +500,21 @@ struct i2c_vbi_ram_value {

static struct i2c_vbi_ram_value vbi_ram_default[] =
{
	/* FIXME: Current api doesn't handle all VBI types, those not
	   yet supported are placed under #if 0 */
#if 0
	{0x010, /* Teletext, SECAM, WST System A */
		{V4L2_SLICED_TELETEXT_SECAM,6,23,1},
		{ 0xaa, 0xaa, 0xff, 0xff, 0xe7, 0x2e, 0x20, 0x26,
		  0xe6, 0xb4, 0x0e, 0x00, 0x00, 0x00, 0x10, 0x00 }
	},
#endif
	{0x030, /* Teletext, PAL, WST System B */
		{V4L2_SLICED_TELETEXT_PAL_B,6,22,1},
		{V4L2_SLICED_TELETEXT_B,6,22,1},
		{ 0xaa, 0xaa, 0xff, 0xff, 0x27, 0x2e, 0x20, 0x2b,
		  0xa6, 0x72, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00 }
	},
#if 0
	{0x050, /* Teletext, PAL, WST System C */
		{V4L2_SLICED_TELETEXT_PAL_C,6,22,1},
		{ 0xaa, 0xaa, 0xff, 0xff, 0xe7, 0x2e, 0x20, 0x22,
@@ -535,6 +540,7 @@ static struct i2c_vbi_ram_value vbi_ram_default[] =
		{ 0xaa, 0x2a, 0xff, 0x3f, 0x04, 0x51, 0x6e, 0x02,
		  0xa6, 0x7b, 0x09, 0x00, 0x00, 0x00, 0x27, 0x00 }
	},
#endif
	{0x0f0, /* Closed Caption, NTSC */
		{V4L2_SLICED_CAPTION_525,21,21,1},
		{ 0xaa, 0x2a, 0xff, 0x3f, 0x04, 0x51, 0x6e, 0x02,
@@ -545,6 +551,7 @@ static struct i2c_vbi_ram_value vbi_ram_default[] =
		{ 0x5b, 0x55, 0xc5, 0xff, 0x00, 0x71, 0x6e, 0x42,
		  0xa6, 0xcd, 0x0f, 0x00, 0x00, 0x00, 0x3a, 0x00 }
	},
#if 0
	{0x130, /* Wide Screen Signal, NTSC C */
		{V4L2_SLICED_WSS_525,20,20,1},
		{ 0x38, 0x00, 0x3f, 0x00, 0x00, 0x71, 0x6e, 0x43,
@@ -560,6 +567,7 @@ static struct i2c_vbi_ram_value vbi_ram_default[] =
		{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x8f, 0x6d, 0x49,
		  0x69, 0x94, 0x08, 0x00, 0x00, 0x00, 0x4c, 0x00 }
	},
#endif
	{0x190, /* Video Program System (VPS), PAL */
		{V4L2_SLICED_VPS,16,16,0},
		{ 0xaa, 0xaa, 0xff, 0xff, 0xba, 0xce, 0x2b, 0x0d,
+8 −57
Original line number Diff line number Diff line
@@ -966,66 +966,17 @@ struct v4l2_sliced_vbi_format

/* Teletext World System Teletext
   (WST), defined on ITU-R BT.653-2 */
#define V4L2_SLICED_TELETEXT_PAL_B      (0x000001)
#define V4L2_SLICED_TELETEXT_PAL_C      (0x000002)
#define V4L2_SLICED_TELETEXT_NTSC_B     (0x000010)
#define V4L2_SLICED_TELETEXT_SECAM      (0x000020)

/* Teletext North American Broadcast Teletext Specification
   (NABTS), defined on ITU-R BT.653-2 */
#define V4L2_SLICED_TELETEXT_NTSC_C     (0x000040)
#define V4L2_SLICED_TELETEXT_NTSC_D     (0x000080)

#define V4L2_SLICED_TELETEXT_B          (0x0001)
/* Video Program System, defined on ETS 300 231*/
#define V4L2_SLICED_VPS                 (0x000400)

#define V4L2_SLICED_VPS                 (0x0400)
/* Closed Caption, defined on EIA-608 */
#define V4L2_SLICED_CAPTION_525         (0x001000)
#define V4L2_SLICED_CAPTION_625         (0x002000)

#define V4L2_SLICED_CAPTION_525         (0x1000)
/* Wide Screen System, defined on ITU-R BT1119.1 */
#define V4L2_SLICED_WSS_625             (0x004000)

/* Wide Screen System, defined on IEC 61880 */
#define V4L2_SLICED_WSS_525             (0x008000)

/* Vertical Interval Timecode (VITC), defined on SMPTE 12M */
#define V4l2_SLICED_VITC_625		(0x010000)
#define V4l2_SLICED_VITC_525		(0x020000)

#define V4L2_SLICED_TELETEXT_B		(V4L2_SLICED_TELETEXT_PAL_B  |\
					 V4L2_SLICED_TELETEXT_NTSC_B)

#define V4L2_SLICED_TELETEXT		(V4L2_SLICED_TELETEXT_PAL_B  |\
					 V4L2_SLICED_TELETEXT_PAL_C  |\
					 V4L2_SLICED_TELETEXT_SECAM  |\
					 V4L2_SLICED_TELETEXT_NTSC_B |\
					 V4L2_SLICED_TELETEXT_NTSC_C |\
					 V4L2_SLICED_TELETEXT_NTSC_D)

#define V4L2_SLICED_CAPTION		(V4L2_SLICED_CAPTION_525     |\
					 V4L2_SLICED_CAPTION_625)

#define V4L2_SLICED_WSS			(V4L2_SLICED_WSS_525         |\
					 V4L2_SLICED_WSS_625)

#define V4L2_SLICED_VITC		(V4L2_SLICED_VITC_525        |\
					 V4L2_SLICED_VITC_625)

#define V4L2_SLICED_VBI_525             (V4L2_SLICED_TELETEXT_NTSC_B |\
					 V4L2_SLICED_TELETEXT_NTSC_C |\
					 V4L2_SLICED_TELETEXT_NTSC_D |\
					 V4L2_SLICED_CAPTION_525     |\
					 V4L2_SLICED_WSS_525         |\
					 V4l2_SLICED_VITC_525)

#define V4L2_SLICED_VBI_625             (V4L2_SLICED_TELETEXT_PAL_B  |\
					 V4L2_SLICED_TELETEXT_PAL_C  |\
					 V4L2_SLICED_TELETEXT_SECAM  |\
					 V4L2_SLICED_VPS             |\
					 V4L2_SLICED_CAPTION_625     |\
					 V4L2_SLICED_WSS_625         |\
					 V4l2_SLICED_VITC_625)
#define V4L2_SLICED_WSS_625             (0x4000)

#define V4L2_SLICED_VBI_525             (V4L2_SLICED_CAPTION_525)
#define V4L2_SLICED_VBI_625             (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625)


struct v4l2_sliced_vbi_cap
{