audio: adjust latency for pcm offload stream

Choppy noise is heard when inserting usb headset during pcm offload
playback. That's because muteWaitMs calculated based on output latency
is inaccurate. COMPRESS_OFFLOAD_PLAYBACK_LATENCY a fixed estimation
value is used for both pcm and compress offload. But for pcm offload
use case, this value is not sufficient enough to ensure PCM buffer
completely presented before output/device change happens.

Fix is to introduce accurate latency for pcm offload. This number is
calculated based on real DSP path delay and buffer duration.

Change-Id: Id2b2b13b7aae06fa0ac3896b24fa693b8b1a6de5
CRs-Fixed: 2293194
1 file changed