hal: Avoid A2dp route updation for delayed a2dp/hfp disconnect
- Existing code routes to speaker until stream goes to
standby on A2dp disconnect. This is done to not block
writes from audioflinger.
- Consider a dual a2dp/hfp scenario with A2dp connected
and hfp being constantly reconnected.
- In failure case, routing=0 from hfp disconnect comes in
late i.e. during hfp reconnect. Stream is resumed and
until hfp connect is processed, it is routed to speaker.
- Fix this by not routing to speaker if A2dp has not
disconnected by checking lower stack.
Change-Id: Idd6c827a391777e943b3d59f33f8f4e98f98e802
1 file changed