hal: Fix VoIP Rx no sound after openOutput if setVolume is not received
HAL sets cached stream volume for VoIP with start output
or device switches. When an output is opened, all stream
members are initialized to 0. After opening an output
if we receive a write before setVolume is called, HAL
sets VoIP stream volume, which is 0 in this case.
Hence Rx is muted. Certain apps do not call setVolume
as frequently as they should leading to the call being
muted until app sends a volume change.
Fix this behavior by not setting VoIP volume as 0 from HAL
until a valid volume is set by client. Let default volume
get applied in lower layers for such scenarios.
Bug: 133829194
Change-Id: I281916295d9458b62a1c6b4b82b6a80116fbbcb9
1 file changed