]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
V4L/DVB (10701): saa7185: add colorbar support.
authorHans Verkuil <hverkuil@xs4all.nl>
Wed, 18 Feb 2009 15:23:38 +0000 (12:23 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Mar 2009 15:42:54 +0000 (12:42 -0300)
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/saa7185.c

index 6debb65152ee1f88a3f455c731903d3dc0fe217b..8d06bb312c55505af3be810e9f99ea6000c3f538 100644 (file)
@@ -281,6 +281,8 @@ 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);
@@ -288,6 +290,8 @@ static int saa7185_command(struct i2c_client *client, unsigned cmd, void *arg)
                        break;
 
                case 1:
+                       /* turn off colorbar */
+                       saa7185_write(client, 0x3a, 0x0f);
                        /* Switch RTCE to 0 */
                        saa7185_write(client, 0x61,
                                      (encoder->reg[0x61] & 0xf7) | 0x00);
@@ -295,6 +299,16 @@ static int saa7185_command(struct i2c_client *client, unsigned cmd, void *arg)
                        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;
                }