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
This commit is contained in:
parent
b092a9a350
commit
739a765ce5
|
@ -172,7 +172,7 @@ enum {
|
|||
* the buffer size of an input/output stream
|
||||
*/
|
||||
#define DEEP_BUFFER_OUTPUT_PERIOD_SIZE 960
|
||||
#define DEEP_BUFFER_OUTPUT_PERIOD_COUNT 4
|
||||
#define DEEP_BUFFER_OUTPUT_PERIOD_COUNT 5
|
||||
#define LOW_LATENCY_OUTPUT_PERIOD_SIZE 240
|
||||
#define LOW_LATENCY_OUTPUT_PERIOD_COUNT 2
|
||||
|
||||
|
|
Loading…
Reference in New Issue