summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2009-01-28 16:32:59 -0800
committerTrent Piepho <xyzzy@speakeasy.org>2009-01-28 16:32:59 -0800
commita905506813537c4bad63dd73c94a04d6a71f777e (patch)
treee2aad45ffdc0fc2b727e9d959ab248bb22ba48d5
parentda23cfa879b6b08672c49c8c538876a977394199 (diff)
downloadmediapointer-dvb-s2-a905506813537c4bad63dd73c94a04d6a71f777e.tar.gz
mediapointer-dvb-s2-a905506813537c4bad63dd73c94a04d6a71f777e.tar.bz2
bttv: fix external mux for RemoteVision MX
From: Trent Piepho <xyzzy@speakeasy.org> Old versions of the bttv driver would use the high nibble of an input's muxsel value to program the GPIO lines enabled via gpiomask2. Apparently this was supposed to be for switching external audio muxes. Anyway, the code that did this was removed sometime in the pre-git 2.6 series. The RemoteVision MX board used this feature to control an external video mux and I guess no one noticed when they removed the code. Move the extra gpio mux data out of the high nibble of muxsel and to rv605_muxsel(), then have that function set the gpio lines with it. From looking at the CD22M3494E datasheet, it seems like the mdelay(1) is a much longer delay than necessary. It looks like only around 20 ns is necessary. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> CC: Miguel Freitas <miguel@cetuc.puc-rio.br>
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-cards.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/linux/drivers/media/video/bt8xx/bttv-cards.c b/linux/drivers/media/video/bt8xx/bttv-cards.c
index 105358be9..cf7794de8 100644
--- a/linux/drivers/media/video/bt8xx/bttv-cards.c
+++ b/linux/drivers/media/video/bt8xx/bttv-cards.c
@@ -1527,8 +1527,7 @@ struct tvcard bttv_tvcards[] = {
.svhs = NO_SVHS,
.gpiomask = 0x00,
.gpiomask2 = 0x07ff,
- .muxsel = { 0x33, 0x13, 0x23, 0x43, 0xf3, 0x73, 0xe3, 0x03,
- 0xd3, 0xb3, 0xc3, 0x63, 0x93, 0x53, 0x83, 0xa3 },
+ .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
.no_msp34xx = 1,
.no_tda9875 = 1,
.tuner_type = TUNER_ABSENT,
@@ -4229,6 +4228,11 @@ void tea5757_set_freq(struct bttv *btv, unsigned short freq)
*/
static void rv605_muxsel(struct bttv *btv, unsigned int input)
{
+ static const u8 muxgpio[] = { 0x3, 0x1, 0x2, 0x4, 0xf, 0x7, 0xe, 0x0,
+ 0xd, 0xb, 0xc, 0x6, 0x9, 0x5, 0x8, 0xa };
+
+ gpio_bits(0x07f, muxgpio[input]);
+
/* reset all conections */
gpio_bits(0x200,0x200);
mdelay(1);
@@ -4236,7 +4240,6 @@ static void rv605_muxsel(struct bttv *btv, unsigned int input)
mdelay(1);
/* create a new connection */
- gpio_bits(0x480,0x080);
gpio_bits(0x480,0x480);
mdelay(1);
gpio_bits(0x480,0x080);