hal: check a2dp audio device to mute stream when suspended
When a2dp is suspended and stream is going to be resumed,
in this case, snd device may not be a2dp, so mute is bypassed
and switching to speaker can lead audio leaking to speaker.
Also, for concurrent output streams, if one of them is
switched to speaker, when checking the next one, need
to check the audio device to confirm if it's a2dp or not,
otherwise the next one to be checked will not perform device
switch.
Change-Id: Ic45a395897c3d717f301aa64eb24d4668d452934
1 file changed