Muli-camera adapter v2.2 w/ Picamera2

I have a multi-camera adapter working with 3x IMX708’s (B0310) on a Pi 4 (gave up on Pi 5) and I’d like to understand how to use it with Picamera2. Attempting to instantiate 3 classes of Picamera2 fails, the 2nd class will fail to start because the ‘Device or resource is busy’.

I’ve seen some examples that suggest direct manipulation of the GPIO’s - But I think this is outdated? As I understand it, when I use the dtoverlay=camera-mux-4port... in the config.txt, it seems the underlying layer is aware of the muli-camera adapter and manages the GPIO for me. In fact if I try to access the GPIO it’ll say that resource is busy as well.

So what’s the recommend means to access all 3 cameras? Do I have to create and destroy my camera instance serially? I was hoping to instantiate all 3 of them, init them, then capture to reduce delays between each capture but it looks like that won’t be possible.

Thanks

So doing it serially works:

for i in range(0,3):
    picam = Picamera2(i)
    picam.start()
    config = picam.create_still_configuration()
    img = picam.switch_mode_and_capture_image(config)
    img.save('cam' + str(i) + '.png')
    picam.stop()
    picam.close()

Although exposure time is way too low and image is almost black. Also it is very, very, slow to execute. Any tips on making it faster would be much appreciated - thanks!

It seems Picamera2.set_controls() doesn’t work and I can’t manually up my exposure time or gain

picam = Picamera2(0)
    picam.start()
    picam.set_controls({"ExposureTime": 1000, "AnalogueGain": 10.0})
    metadata = picam.capture_metadata()
    controls = {c: metadata[c] for c in ["ExposureTime", "AnalogueGain", "ColourGains"]}
    print(controls)

The values printed aren’t what I’m setting - it seems it doesn’t change anything?

I have found that there must be a delay after set_controls before it is effective.

Still not clear to me why I need to set exposure manually, but I can now get images that aren’t dark. Last to figure out is raspberry pi 5 issue.