summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Verkuil <devnull@localhost>2005-12-18 01:05:59 +0000
committerHans Verkuil <devnull@localhost>2005-12-18 01:05:59 +0000
commit73dd6a24694bdd946516a8fdeb3acce13d93ebb4 (patch)
treec7a57bccfe5c6e9f272e7c0cf5f45c7d626ffefb
parent150340324e48dad467c256328e7141ef4e9939b2 (diff)
downloadmediapointer-dvb-s2-73dd6a24694bdd946516a8fdeb3acce13d93ebb4.tar.gz
mediapointer-dvb-s2-73dd6a24694bdd946516a8fdeb3acce13d93ebb4.tar.bz2
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>
-rw-r--r--linux/drivers/media/video/saa7127.c6
-rw-r--r--v4l/ChangeLog11
2 files changed, 14 insertions, 3 deletions
diff --git a/linux/drivers/media/video/saa7127.c b/linux/drivers/media/video/saa7127.c
index b672c60d7..d44887554 100644
--- a/linux/drivers/media/video/saa7127.c
+++ b/linux/drivers/media/video/saa7127.c
@@ -401,7 +401,7 @@ static int saa7127_set_vps(struct i2c_client *client, struct v4l2_sliced_vbi_dat
static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data *data)
{
struct saa7127_state *state = i2c_get_clientdata(client);
- u16 cc = data->data[0] << 8 | data->data[1];
+ u16 cc = data->data[1] << 8 | data->data[0];
int enable = (data->line != 0);
if (enable && (data->field != 0 || data->line != 21))
@@ -409,7 +409,7 @@ static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data
if (state->cc_enable != enable) {
saa7127_dbg("Turn CC %s\n", enable ? "on" : "off");
saa7127_write(client, SAA7127_REG_CLOSED_CAPTION,
- (enable << 6) | 0x11);
+ (state->xds_enable << 7) | (enable << 6) | 0x11);
state->cc_enable = enable;
}
if (!enable)
@@ -435,7 +435,7 @@ static int saa7127_set_xds(struct i2c_client *client, struct v4l2_sliced_vbi_dat
if (state->xds_enable != enable) {
saa7127_dbg("Turn XDS %s\n", enable ? "on" : "off");
saa7127_write(client, SAA7127_REG_CLOSED_CAPTION,
- (enable << 7) | 0x11);
+ (enable << 7) | (state->cc_enable << 6) | 0x11);
state->xds_enable = enable;
}
if (!enable)
diff --git a/v4l/ChangeLog b/v4l/ChangeLog
index f6135e55c..34d331b6b 100644
--- a/v4l/ChangeLog
+++ b/v4l/ChangeLog
@@ -1,3 +1,14 @@
+2005-12-18 01:02 hverkuil
+
+ * linux/drivers/media/video/saa7127.c: (saa7127_set_cc),
+ (saa7127_set_xds):
+ - CC data was swapped the wrong way around.
+ - Enabling CC disabled XDS and vice versa: these two should
+ be independent from one another.
+ Both bugs broke CC output.
+
+ Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
+
2005-12-18 00:50 mchehab
* linux/drivers/media/video/cx25840/cx25840-core.c: (set_v4lstd):