I managed to get binning working with this driver. Beside better sensitivity binning achieves lower download speed that is now around 1s.
Binning is set by changing sensor mode. There are 4 modes, but actually only mode 2 is useful here as it is full res 2x2 binning. Also there is no separate vertical or horizontal binning. I had to make few more little changes here as well to make this working.

Here is difference in non properly focused countertop of my kitchen:
Screenshot-12.png

I did not make pull request as I have no idea how to make this binning to take value from UI so you have to rebuild every time if you want to change binning.
Here is git diff if someone wants to try:

diff --git a/indi-rpicam/mmalcamera.cpp b/indi-rpicam/mmalcamera.cpp
index bbc36f1..2175bc2 100644
--- a/indi-rpicam/mmalcamera.cpp
+++ b/indi-rpicam/mmalcamera.cpp
@@ -38,7 +38,7 @@ MMALCamera::MMALCamera(int n) : MMALComponent(MMAL_COMPONENT_DEFAULT_CAMERA), ca
 
     getSensorInfo();
 
-    selectSensorConfig(0 /* What ever 0 means */);
+    selectSensorConfig(2 /* What ever 0 means */);
 
     configureCamera();
 
diff --git a/indi-rpicam/mmaldriver.cpp b/indi-rpicam/mmaldriver.cpp
index fbb1804..2adf7c2 100644
--- a/indi-rpicam/mmaldriver.cpp
+++ b/indi-rpicam/mmaldriver.cpp
@@ -67,13 +67,13 @@ void MMALDriver::assert_framebuffer(INDI::CCDChip *ccd)
 {
     LOGF_DEBUG("%s()", __FUNCTION__);
     int nbuf = (ccd->getXRes() * ccd->getYRes() * (ccd->getBPP() / 8));
-    int expected = 4056 * 3040 * 2;
+   /* int expected = 4056 * 3040 * 2;
     if (nbuf != expected)
     {
         LOGF_DEBUG("%s: frame buffer size set to %d", __FUNCTION__, nbuf);
         LOGF_ERROR("%s: Wrong size of framebuffer: %d, expected %d", __FUNCTION__, nbuf, expected);
         exit(1);
-    }
+    }*/
 
     LOGF_DEBUG("%s: frame buffer size set to %d", __FUNCTION__, nbuf);
 }
diff --git a/indi-rpicam/raw12tobayer16pipeline.cpp b/indi-rpicam/raw12tobayer16pipeline.cpp
index f78f697..6438494 100644
--- a/indi-rpicam/raw12tobayer16pipeline.cpp
+++ b/indi-rpicam/raw12tobayer16pipeline.cpp
@@ -59,9 +59,9 @@ void Raw12ToBayer16Pipeline::data_received(uint8_t *data,  uint32_t length)
 {
     uint8_t byte;
 
-    assert(bcm_pipe->header.omx_data.raw_width == 6112); 
-    assert(ccd->getXRes() == 4056);
-    assert(ccd->getYRes() == 3040);
+//    assert(bcm_pipe->header.omx_data.raw_width == 6112); 
+//    assert(ccd->getXRes() == 4056);
+//    assert(ccd->getYRes() == 3040);
 
     int maxX = ccd->getSubW();
     int maxY = ccd->getSubH();


Read More...