Skip to content

Commit

Permalink
V4L/DVB (10563): bttv: clean up mux code for IVC-120G
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Trent Piepho authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent 5221e21 commit fb5deb1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/media/video/bt8xx/bttv-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down Expand Up @@ -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 */
}


Expand Down

0 comments on commit fb5deb1

Please sign in to comment.