hal: Fix glitch in audio playback during device switch

Currently the deep buffer path uses 4 * 20msec buffer.
During device switch the AudioPolicyManager delays routing
command by 2 * output latency (80msec) to ensure that all
the data written to driver/DSP is played out on current
device itself.
The stream side buffering in the DSP in legacy PCM mode is
95msec and hence the depth of pipeline is 80 + 95 = 175msec
which exceeds the device switch delay 160msec (2 * 80). So
the tail (data written to driver before headset plugin) is
heard on headset and perceived as glitch.
Ensure that the buffering in the kernel is greater than or
equal to the buffering in the DSP to fix the issue.

Change-Id: I01a3862d63ce4c258056620693dee08761c7e83f
CRs-Fixed: 771446
1 file changed