"above outputs dolby digital(ex) from 384kbps to 640kbps, dts(es/ex), lpcm 2ch to 5ch depending on the source. Is it possible to tweak gefen detective to have algolith mosquito hdmi pass these audio codecs?"
The Gefen box has multiple built in EDIDs and it can learn an EDID from your downstream devices as well. However, I have only tested passing LPCM through the Mosquito. I do not know if it will handle bitstreams.
"am i placing gefen detective between source and algolith or between output and display?"
Between the source and algolith. The problem is that the Algolith's EDID to a source is saying it does not support audio, so the source will not output it. The Gefen gets around that by changing the EDID that is fed to the source.
"doctor hdmi. this does not require power supply and smaller. do you think this can do the same job?"
Probably, but I have never tried one. The Gefen box does not need a power supply in normal operation either. It is just needed when changing EDID settings in the box.