Bttvx and multiframegrabber support

Hello,

I am trying to implement multigrabber support in bttvx
(http://argo.lira.dist.unige.it/cbeltran/bttvx.htm); but I am having some
problems with the pci_attach_device(…) function.
I have two cards with bt878 chips and they are detected correctly when a do
“pci -v” from a shell. But when I invoke pci_attach_device(…) from my
code, only one of the cards is detected. I am using the code suggested in
“Talking to hardware under neutrino”, and the result of pci -v is the next:

Class = Multimedia (Video)
Vendor ID = 109eh, Brooktree Corporation
Device ID = 36eh, Bt878 MediaStream Controller
PCI index = 0h
Class Codes = 040000h
Revision ID = 2h
Bus number = 0
Device number = 8
Function num = 0
Status Reg = 280h
Command Reg = 6h
Header type = 0h Multi-function
BIST = 0h Build-in-self-test not supported
Latency Timer = 20h
Cache Line Size= 0h
PCI Mem Address = db004000h prefetchable 32bit length 4096 enabled
Max Lat = 40ns
Min Gnt = 16ns
PCI Int Pin = INT A
Interrupt line = 10

Class = Multimedia (Unknown)
Vendor ID = 109eh, Brooktree Corporation
Device ID = 878h, Bt878 Video Capture (Audio Section)
PCI index = 0h
Class Codes = 048000h
Revision ID = 2h
Bus number = 0
Device number = 8
Function num = 1
Status Reg = 280h
Command Reg = 6h
Header type = 0h Multi-function
BIST = 0h Build-in-self-test not supported
Latency Timer = 20h
Cache Line Size= 0h
PCI Mem Address = db000000h prefetchable 32bit length 4096 enabled
Max Lat = 255ns
Min Gnt = 4ns
PCI Int Pin = INT A
Interrupt line = 10

Class = Multimedia (Video)
Vendor ID = 109eh, Brooktree Corporation
Device ID = 36eh, Bt878 MediaStream Controller
PCI index = 1h
Class Codes = 040000h
Revision ID = 11h
Bus number = 0
Device number = 9
Function num = 0
Status Reg = 290h
Command Reg = 6h
Header type = 0h Multi-function
BIST = 0h Build-in-self-test not supported
Latency Timer = 20h
Cache Line Size= 0h
PCI Mem Address = db001000h prefetchable 32bit length 4096 enabled
Max Lat = 40ns
Min Gnt = 16ns
PCI Int Pin = INT A
Interrupt line = 9
Capabilities Pointer = 44h
Capability ID = 3h
Capabilities = 0h - 0h
Capability ID = 1h
Capabilities = 22h - 0h

Class = Multimedia (Unknown)
Vendor ID = 109eh, Brooktree Corporation
Device ID = 878h, Bt878 Video Capture (Audio Section)
PCI index = 1h
Class Codes = 048000h
Revision ID = 11h
Bus number = 0
Device number = 9
Function num = 1
Status Reg = 290h
Command Reg = 6h
Header type = 0h Multi-function
BIST = 0h Build-in-self-test not supported
Latency Timer = 20h
Cache Line Size= 0h
PCI Mem Address = db002000h prefetchable 32bit length 4096 enabled
Max Lat = 255ns
Min Gnt = 4ns
PCI Int Pin = INT A
Interrupt line = 9
Capabilities Pointer = 44h
Capability ID = 3h
Capabilities = 0h - 0h
Capability ID = 1h
Capabilities = 22h - 0h

Any idea??

Carlos.

Aja! I found my problem: idx