[Samsung Galaxy S7 (Exynos) ROMs, Kernels, Recoveri] Eklondh:
So, about the speaker phone echo problem. I've been googling for hours and trying different things out and it seems to be unsolvable without remaking the Rom itself

But.. What you can do is raise the normal in call speaker volume enough so that you can use that as your loud speaker

I've tried it by editing mixer_paths_0.xml in /system/etc

So what I did was copy the file to a writable location (for example /sdcard) then i edited all of these values to 50 instead of the original 32

After that I used TWRP to mount /system and replace the file and voila, now you have a working loud speaker. Sort of..

50 might be a bit high value but if people start hearing themselves you can always just turn the volume down using the buttons

Its much better than the more or less useless loud speaker at least!

<path name="gain-incall_nb-handset">

<ctl name="HPOUT3L Input 1 Volume" value="50" />

<ctl name="HPOUT3R Input 1 Volume" value="50" />

<ctl name="HPOUT3L Input 2 Volume" value="50" />

<ctl name="HPOUT3R Input 2 Volume" value="50" />

<param name="DSP4 XM f010:0" value="0 0 0 1 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 5 0 0 0 7 0 0 0 9 0 0 0 11 0 0 0 13 0 0 0 6 0 0 0 3 0 0 0 22 0 0 0 3 0 0 0 0 0 0 1 50 0 0 0 240 0 255 255 118 0 255 254 74 0 255 254 239 0 0 0 223 0 0 65 238 0 0 0 3 0 0 0 3 0 0 0 0 0 0 0 0 0 0 82 8 0 0 39 16 0 0 0 12 0 0 5 220 0 0 7 208 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 12" />

<param name="DSP4 XM f010:1" value="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3" />

</path>

<path name="gain-incall_wb-handset">

<ctl name="HPOUT3L Input 1 Volume" value="50" />

<ctl name="HPOUT3R Input 1 Volume" value="50" />

<ctl name="HPOUT3L Input 2 Volume" value="50" />

<ctl name="HPOUT3R Input 2 Volume" value="50" />

<param name="DSP4 XM f010:0" value="0 0 0 1 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 5 0 0 0 7 0 0 0 9 0 0 0 11 0 0 0 13 0 0 0 6 0 0 0 3 0 0 0 22 0 0 0 3 0 0 0 0 0 0 1 50 0 0 0 240 0 255 255 118 0 255 254 74 0 255 254 239 0 0 0 223 0 0 65 238 0 0 0 3 0 0 0 3 0 0 0 0 0 0 0 0 0 0 82 8 0 0 39 16 0 0 0 12 0 0 5 220 0 0 7 208 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 2 0 0 0 0 0 0 1 12" />

<param name="DSP4 XM f010:1" value="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3" />

</path>