Skip to content

Commit

Permalink
V4L/DVB (10701): saa7185: add colorbar support.
Browse files Browse the repository at this point in the history
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent 674a323 commit 9040320
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/media/video/saa7185.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,20 +281,34 @@ static int saa7185_command(struct i2c_client *client, unsigned cmd, void *arg)

switch (*iarg) {
case 0:
/* turn off colorbar */
saa7185_write(client, 0x3a, 0x0f);
/* Switch RTCE to 1 */
saa7185_write(client, 0x61,
(encoder->reg[0x61] & 0xf7) | 0x08);
saa7185_write(client, 0x6e, 0x01);
break;

case 1:
/* turn off colorbar */
saa7185_write(client, 0x3a, 0x0f);
/* Switch RTCE to 0 */
saa7185_write(client, 0x61,
(encoder->reg[0x61] & 0xf7) | 0x00);
/* SW: a slight sync problem... */
saa7185_write(client, 0x6e, 0x00);
break;

case 2:
/* turn on colorbar */
saa7185_write(client, 0x3a, 0x8f);
/* Switch RTCE to 0 */
saa7185_write(client, 0x61,
(encoder->reg[0x61] & 0xf7) | 0x08);
/* SW: a slight sync problem... */
saa7185_write(client, 0x6e, 0x01);
break;

default:
return -EINVAL;
}
Expand Down

0 comments on commit 9040320

Please sign in to comment.