]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (10563): bttv: clean up mux code for IVC-120G
authorTrent Piepho <xyzzy@speakeasy.org>
Thu, 29 Jan 2009 00:32:59 +0000 (21:32 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Mar 2009 15:42:47 +0000 (12:42 -0300)
The card data for BTTV_BOARD_IVC120 set muxsel to a bunch of bogus values
(1 to 16), which the common mux code would use to set the Bt878's mux to
some random value.  Then the custom code in ivc120_muxsel() would change
the Bt878's mux to the right value (always MUX0).

Better to just make the muxsel data correct (all zeros, easy!) and get the
mux right to begin with.  Then the extra Bt878 mux setting code in
ivc120_muxsel() can be eliminated (the rest of the code for the IVC-120G's
external mux is still there of course).

This will help me clean up muxsel for some other changes.  It should also
get rid of an unnecessary mux switch when changing from certain inputs to
certain other inputs on the IVC-120G.

Cc: Alan Garfield <alan@fromorbit.com>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/bt8xx/bttv-cards.c

index d545d48fac585cba905ea97d891f41742581673d..d055c2770469a18ce6eb0795838727039ea161de 100644 (file)
@@ -2104,8 +2104,7 @@ struct tvcard bttv_tvcards[] = {
                .no_tda9875     = 1,
                .no_tda7432     = 1,
                .gpiomask       = 0x00,
-               .muxsel         = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-                               0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 },
+               .muxsel         = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
                .muxsel_hook    = ivc120_muxsel,
                .pll            = PLL_28,
        },
@@ -4445,8 +4444,7 @@ static void ivc120_muxsel(struct bttv *btv, unsigned int input)
        bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
                      ((matrix == 2) ? 0x03 : 0x00), 1);  /* 9-12 */
 
-       /* Selects MUX0 for input on the 878 */
-       btaor((0)<<5, ~(3<<5), BT848_IFORM);
+       /* 878's MUX0 is already selected for input via muxsel values */
 }