diff options
-rw-r--r-- | drivers/media/video/saa7115.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index 71777216b607..c4f066d6668e 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c | |||
@@ -1388,6 +1388,9 @@ static int saa711x_command(struct i2c_client *client, unsigned int cmd, void *ar | |||
1388 | { | 1388 | { |
1389 | struct v4l2_sliced_vbi_data *data = arg; | 1389 | struct v4l2_sliced_vbi_data *data = arg; |
1390 | 1390 | ||
1391 | /* Note: the internal field ID is inverted for NTSC, | ||
1392 | so data->field 0 maps to the saa7115 even field, | ||
1393 | whereas for PAL it maps to the saa7115 odd field. */ | ||
1391 | switch (data->id) { | 1394 | switch (data->id) { |
1392 | case V4L2_SLICED_WSS_625: | 1395 | case V4L2_SLICED_WSS_625: |
1393 | if (saa711x_read(client, 0x6b) & 0xc0) | 1396 | if (saa711x_read(client, 0x6b) & 0xc0) |
@@ -1398,17 +1401,17 @@ static int saa711x_command(struct i2c_client *client, unsigned int cmd, void *ar | |||
1398 | case V4L2_SLICED_CAPTION_525: | 1401 | case V4L2_SLICED_CAPTION_525: |
1399 | if (data->field == 0) { | 1402 | if (data->field == 0) { |
1400 | /* CC */ | 1403 | /* CC */ |
1401 | if (saa711x_read(client, 0x66) & 0xc0) | 1404 | if (saa711x_read(client, 0x66) & 0x30) |
1402 | return -EIO; | 1405 | return -EIO; |
1403 | data->data[0] = saa711x_read(client, 0x67); | 1406 | data->data[0] = saa711x_read(client, 0x69); |
1404 | data->data[1] = saa711x_read(client, 0x68); | 1407 | data->data[1] = saa711x_read(client, 0x6a); |
1405 | return 0; | 1408 | return 0; |
1406 | } | 1409 | } |
1407 | /* XDS */ | 1410 | /* XDS */ |
1408 | if (saa711x_read(client, 0x66) & 0x30) | 1411 | if (saa711x_read(client, 0x66) & 0xc0) |
1409 | return -EIO; | 1412 | return -EIO; |
1410 | data->data[0] = saa711x_read(client, 0x69); | 1413 | data->data[0] = saa711x_read(client, 0x67); |
1411 | data->data[1] = saa711x_read(client, 0x6a); | 1414 | data->data[1] = saa711x_read(client, 0x68); |
1412 | return 0; | 1415 | return 0; |
1413 | default: | 1416 | default: |
1414 | return -EINVAL; | 1417 | return -EINVAL; |