When setting the focus via the PCIC/RPC interface, we unfortunately realised that there is probably no way to block until the focus is actually achieved. If adjusting the focus and then starting image capture, the focus is adjusted in the captured images -> BLUR.
Check for "waitForConfigurationDone()" method in RPC and also calls this when the focus is adjusted; this only seems to wait for the software-side change and not the mechanical change.
Also check this issue for the PCIC interface.
Test this feature for setting autofocus and focus individually!