diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2009-01-28 19:32:59 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:42:47 -0400 |
commit | fb5deb1b9ecc3c64b713f33ec56781c01a0b11b9 (patch) | |
tree | 5ddcca948350f767869d54cb75dfc465989afa29 | |
parent | 5221e21e5ecd3aebd2e8e3234bd18883ce720945 (diff) |
V4L/DVB (10563): bttv: clean up mux code for IVC-120G
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>
-rw-r--r-- | drivers/media/video/bt8xx/bttv-cards.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c index d545d48fac58..d055c2770469 100644 --- a/drivers/media/video/bt8xx/bttv-cards.c +++ b/drivers/media/video/bt8xx/bttv-cards.c | |||
@@ -2104,8 +2104,7 @@ struct tvcard bttv_tvcards[] = { | |||
2104 | .no_tda9875 = 1, | 2104 | .no_tda9875 = 1, |
2105 | .no_tda7432 = 1, | 2105 | .no_tda7432 = 1, |
2106 | .gpiomask = 0x00, | 2106 | .gpiomask = 0x00, |
2107 | .muxsel = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, | 2107 | .muxsel = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, |
2108 | 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 }, | ||
2109 | .muxsel_hook = ivc120_muxsel, | 2108 | .muxsel_hook = ivc120_muxsel, |
2110 | .pll = PLL_28, | 2109 | .pll = PLL_28, |
2111 | }, | 2110 | }, |
@@ -4445,8 +4444,7 @@ static void ivc120_muxsel(struct bttv *btv, unsigned int input) | |||
4445 | bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02, | 4444 | bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02, |
4446 | ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */ | 4445 | ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */ |
4447 | 4446 | ||
4448 | /* Selects MUX0 for input on the 878 */ | 4447 | /* 878's MUX0 is already selected for input via muxsel values */ |
4449 | btaor((0)<<5, ~(3<<5), BT848_IFORM); | ||
4450 | } | 4448 | } |
4451 | 4449 | ||
4452 | 4450 | ||