I only have a RaspPi 3 B+ and the ReSpeaker 4mic_hat so I could not test on different configurations, but modifying it to work with others should be possible. This is my first foray into the world of RasPi development, so there may be a few rough edges.
You can either just add the doa_detection source/header to your project and use it or you can compile it with the sample app, to see how it is used. (A Makefile will follow at some point)
$ ./build.sh