From: Trent Piepho Date: Thu, 29 Jan 2009 00:32:59 +0000 (-0300) Subject: V4L/DVB (10566): bttv: clean up mux code for IDS Eagle X-Git-Tag: Ubuntu-goldfish-3.4.0-4.27~12657^2~500 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=430390e67b39ccf56d98286f5e5a72d903c9cf87;p=mirror_ubuntu-zesty-kernel.git V4L/DVB (10566): bttv: clean up mux code for IDS Eagle This card apparently uses an external mux and the Bt878's mux should always be set to MUX2. The values for the external mux control bits were stored in the muxsel field. This meant that when changing inputs the driver would switch the Bt878's mux to whatever value the external mux was supposed to be set to, then eagle_muxsel() would switch it back to MUX2 and program the external mux. This creates an unnecessary switch of the Bt878's mux. So change muxsel to be 2 for each input. The external mux bits are just "input&3" so they don't really need to be stored anywhere. This also eliminates the last non-standard use of the muxsel data. Cc: M G Berberich Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c index df4d7752eb77..fc2b796b25fc 100644 --- a/drivers/media/video/bt8xx/bttv-cards.c +++ b/drivers/media/video/bt8xx/bttv-cards.c @@ -1799,7 +1799,7 @@ struct tvcard bttv_tvcards[] = { .tuner_addr = ADDR_UNSET, .svhs = NO_SVHS, .gpiomask = 0, - .muxsel = { 0, 1, 2, 3 }, + .muxsel = { 2, 2, 2, 2 }, .muxsel_hook = eagle_muxsel, .no_msp34xx = 1, .no_tda9875 = 1, @@ -3109,8 +3109,7 @@ static void init_ids_eagle(struct bttv *btv) * has its own multiplexer */ static void eagle_muxsel(struct bttv *btv, unsigned int input) { - btaor((2)<<5, ~(3<<5), BT848_IFORM); - gpio_bits(3,bttv_tvcards[btv->c.type].muxsel[input&7]); + gpio_bits(3, input & 3); /* composite */ /* set chroma ADC to sleep */