summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7115.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-02-06 22:26:49 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-02-06 22:26:49 -0200
commita2277247714a35325a228e495412628fa1c42ff8 (patch)
tree26b6c7e251fe8578c1dc20814241293bc3e79d68 /linux/drivers/media/video/saa7115.c
parent4ddabb0e021ea79119db35f5f848fb9220077e20 (diff)
parentaa76e2d035b686e2d6e0c84c6a80ce69147d3d87 (diff)
downloadmediapointer-dvb-s2-a2277247714a35325a228e495412628fa1c42ff8.tar.gz
mediapointer-dvb-s2-a2277247714a35325a228e495412628fa1c42ff8.tar.bz2
merge: http://linuxtv.org/hg/~endriss/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/saa7115.c')
-rw-r--r--linux/drivers/media/video/saa7115.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c
index 71e1cab45..6163a68e3 100644
--- a/linux/drivers/media/video/saa7115.c
+++ b/linux/drivers/media/video/saa7115.c
@@ -1399,6 +1399,9 @@ static int saa711x_command(struct i2c_client *client, unsigned int cmd, void *ar
{
struct v4l2_sliced_vbi_data *data = arg;
+ /* Note: the internal field ID is inverted for NTSC,
+ so data->field 0 maps to the saa7115 even field,
+ whereas for PAL it maps to the saa7115 odd field. */
switch (data->id) {
case V4L2_SLICED_WSS_625:
if (saa711x_read(client, 0x6b) & 0xc0)
@@ -1409,17 +1412,17 @@ static int saa711x_command(struct i2c_client *client, unsigned int cmd, void *ar
case V4L2_SLICED_CAPTION_525:
if (data->field == 0) {
/* CC */
- if (saa711x_read(client, 0x66) & 0xc0)
+ if (saa711x_read(client, 0x66) & 0x30)
return -EIO;
- data->data[0] = saa711x_read(client, 0x67);
- data->data[1] = saa711x_read(client, 0x68);
+ data->data[0] = saa711x_read(client, 0x69);
+ data->data[1] = saa711x_read(client, 0x6a);
return 0;
}
/* XDS */
- if (saa711x_read(client, 0x66) & 0x30)
+ if (saa711x_read(client, 0x66) & 0xc0)
return -EIO;
- data->data[0] = saa711x_read(client, 0x69);
- data->data[1] = saa711x_read(client, 0x6a);
+ data->data[0] = saa711x_read(client, 0x67);
+ data->data[1] = saa711x_read(client, 0x68);
return 0;
default:
return -EINVAL;