a2dp: check out_snd_device to tear down a2dp path
During a2dp switching to sco, by expected, the active
a2dp paths should be teared down before sco connection
established to avoid trailing data sent over slimbus.
There could be one usecase which:
- there're two active streams in AHAL, while one of
them is stopped in AudioPolicyManager.
- then only one active stream can receive param
"routing=a2dp" and switch path to a2dp, the other one
will also be switched to a2dp as part of
check_usecases_codec_backend, but the out device is
still the stale device.
- after A2dpSuspended=true is received, only the stream
with out device is a2dp can be teared down, the other
one can keep a2dp active for a while.
Instead of checking out device, check snd_device for tearing
down active streams on a2dp device.
Change-Id: Id7186f312d4aff10b59b6619be5c761f9d592e9b
1 file changed