OSDN Git Service

Added Start/End Session steps to A2DP session setup
authorPavlin Radoslavov <pavlin@google.com>
Tue, 20 Mar 2018 23:50:57 +0000 (16:50 -0700)
committerPavlin Radoslavov <pavlin@google.com>
Wed, 21 Mar 2018 17:27:40 +0000 (17:27 +0000)
commit03adb3f7ba37d637329d3c13aa4a3bb1ec28f143
tree0b4fd798c31dcd63010d77c22a55321efc95c42c
parent195610879d3800b823b9c9e2c45415c3abc874e6
Added Start/End Session steps to A2DP session setup

Start/End session is called when setting/changing the Active (remote)
device.

Also:
 * For A2DP Source, btif_a2dp_source_setup_codec() is called only for
   Start session. All other calls to btif_a2dp_source_setup_codec are
   removed.
 * Updated the btif_a2dp_source_setup_codec() implementation to
   call btif_a2dp_source_audio_tx_flush_req() and flush the incoming audio
   data. This removes 2 seconds hold-up delay when switching the active
   device and streaming audio.
 * Removed unnecessary lock inside btif/src/btif_a2dp_sink.cc

Bug: 74952724
Test: Manual - Connect two headsets, switch active device,
      connect/disconnect.
Change-Id: I43702e1ddc108628de93161905465647471f554c
btif/include/btif_a2dp_sink.h
btif/include/btif_a2dp_source.h
btif/src/btif_a2dp.cc
btif/src/btif_a2dp_sink.cc
btif/src/btif_a2dp_source.cc
btif/src/btif_av.cc