These two messages are related to the remotevision mx subject.
Sorry about the re-posting.
IMO the way that bt848 handles the gpio is similar to bt878. If so, then the
info in there must help.
A "gpio scanner" would be great to discover the wired pins, althought the
card spec is always better.

Regards


Gleicon S. Moraes --
[EMAIL PROTECTED] - [EMAIL PROTECTED]
http://videodog.cjb.net
http://planeta.terra.com.br/informatica/gleicon/





I've mananged to borrow a bt878 card with an external 4067 multiplexer (
16input-1output, 4bit channel selection).
The 4 address lines from the 4067 are connected to the GPIO[0:3] (pins
86-83).  How can I control this thru the bttv driver (0.7.x)?

By looking at the bttv-card.c code it looks like I need something like the
following:


// I'm ignoring the fact this runs on top AUDIO stuff,
// VIDIOCSAUDIO is used to set the current channel
// VIDIOCGAUDIO is used to read the current channel
// flags (stuct video_audio)  constains the channel
{
 name: "bt878 + 16channel mux (4067)"
 video_inputs: 4,
 pll: PLL_28,
 audio_hook: external4067_muxsel
}

void external4067_muxsel(struct bttv *btv, struct video_audio *v, int set){
  int data;
  int input

  data=btread(BT848_GPIO_DATA);

  if(set){ // set mode, caused by VIDIOCSAUDIO
    //v->flags contaings the channel (4bit) from the user
    if((v->flags<16)&&(v->flags>=0))
      data&=v->flags;
  }else{   //read mode, caused by VIDIOCGAUDIO
    v->flags=data&0x000F;   //only return the [3:0] bits
  }

  btwrite(data,BT848_GPIO_DATA);
}

What does btread(BT848_GPIO_DATA) give me? Do I just set bit 0 to TRUE to
set the GPIO pin to TRUE?  I'll try the code after I get some sleep.




_______________________________________________
Video4linux-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/video4linux-list




On Mon, 2001-09-17 at 23:11, Robert D. wrote:

> The 4 address lines from the 4067 are connected to the GPIO[0:3] (pins
> 86-83).  How can I control this thru the bttv driver (0.7.x)?
> ...
> What does btread(BT848_GPIO_DATA) give me? Do I just set bit 0 to TRUE
to
> set the GPIO pin to TRUE?  
> 

Yes, that's it. I am doing the same with a similar board, which makes
intensive use of the GPIOs. 

> I'll try the code after I get some sleep.

Good Luck,

        Miguel





_______________________________________________
Video4linux-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/video4linux-list


Reply via email to