diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2005-12-20 06:48:29 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2005-12-22 04:55:12 -0500 |
commit | 515432aa7ae75ea493099f38adc14a99436fa1ac (patch) | |
tree | e34b701a6a81c06ba115c1c9817aea47afed6bd0 /drivers | |
parent | 7bb9529602f8bb41a92275825b808a42ed33e5be (diff) |
V4L/DVB (3191): Fix CC output
- CC data was swapped the wrong way around.
- Enabling CC disabled XDS and vice versa: these two should
be independent from one another.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/saa7127.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/saa7127.c b/drivers/media/video/saa7127.c index 3428e1ed0032..c36f014f1fdf 100644 --- a/drivers/media/video/saa7127.c +++ b/drivers/media/video/saa7127.c | |||
@@ -389,7 +389,7 @@ static int saa7127_set_vps(struct i2c_client *client, struct v4l2_sliced_vbi_dat | |||
389 | static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data *data) | 389 | static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data *data) |
390 | { | 390 | { |
391 | struct saa7127_state *state = i2c_get_clientdata(client); | 391 | struct saa7127_state *state = i2c_get_clientdata(client); |
392 | u16 cc = data->data[0] << 8 | data->data[1]; | 392 | u16 cc = data->data[1] << 8 | data->data[0]; |
393 | int enable = (data->line != 0); | 393 | int enable = (data->line != 0); |
394 | 394 | ||
395 | if (enable && (data->field != 0 || data->line != 21)) | 395 | if (enable && (data->field != 0 || data->line != 21)) |
@@ -397,7 +397,7 @@ static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data | |||
397 | if (state->cc_enable != enable) { | 397 | if (state->cc_enable != enable) { |
398 | saa7127_dbg("Turn CC %s\n", enable ? "on" : "off"); | 398 | saa7127_dbg("Turn CC %s\n", enable ? "on" : "off"); |
399 | saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, | 399 | saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, |
400 | (enable << 6) | 0x11); | 400 | (state->xds_enable << 7) | (enable << 6) | 0x11); |
401 | state->cc_enable = enable; | 401 | state->cc_enable = enable; |
402 | } | 402 | } |
403 | if (!enable) | 403 | if (!enable) |
@@ -423,7 +423,7 @@ static int saa7127_set_xds(struct i2c_client *client, struct v4l2_sliced_vbi_dat | |||
423 | if (state->xds_enable != enable) { | 423 | if (state->xds_enable != enable) { |
424 | saa7127_dbg("Turn XDS %s\n", enable ? "on" : "off"); | 424 | saa7127_dbg("Turn XDS %s\n", enable ? "on" : "off"); |
425 | saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, | 425 | saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, |
426 | (enable << 7) | 0x11); | 426 | (enable << 7) | (state->cc_enable << 6) | 0x11); |
427 | state->xds_enable = enable; | 427 | state->xds_enable = enable; |
428 | } | 428 | } |
429 | if (!enable) | 429 | if (!enable) |