OSDN Git Service

Handle properly AVDTP SetConfig from the A2DP Sink device
authorPavlin Radoslavov <pavlin@google.com>
Tue, 10 Apr 2018 01:01:41 +0000 (18:01 -0700)
committerPavlin Radoslavov <pavlin@google.com>
Tue, 17 Apr 2018 10:35:52 +0000 (03:35 -0700)
commitd5a053208998dc21e2d6c9e69451c31aa62298c6
tree641e2494c23da0aeb34013c5fee2751f321f3415
parent4c6007cfc42efbb7f6fb9bd1dc6c609f68ccd9a6
Handle properly AVDTP SetConfig from the A2DP Sink device

If the remote device is proactive and sends AVDTP SetConfig after
re-connection before the local device gets the chance to do it, the
internal codec setup state might be inconsistent.

* Fix the internal logic when the local device is Acceptor inside
  file bta_av_co.cc, and simplify some of the code.
* Fix the handling of p_scb->sep_info_idx inside bta_av_save_caps()
  when receiving capabilities from the remote device.
* Add new A2dpCodecConfig::setPeerCodecCapabilities() method that is
  implemented by each codec.

Bug: 77525584
Test: Manual - initiate connection by Momentum 2.0 Wireless Headset.
      Connect/disconnect/reconnect multiple headsets.

Change-Id: I456df7c8a2fa0758c0908a4628c4dfae3259dbdb
14 files changed:
bta/av/bta_av_aact.cc
btif/co/bta_av_co.cc
stack/a2dp/a2dp_aac.cc
stack/a2dp/a2dp_codec_config.cc
stack/a2dp/a2dp_sbc.cc
stack/a2dp/a2dp_vendor_aptx.cc
stack/a2dp/a2dp_vendor_aptx_hd.cc
stack/a2dp/a2dp_vendor_ldac.cc
stack/include/a2dp_aac.h
stack/include/a2dp_codec_api.h
stack/include/a2dp_sbc.h
stack/include/a2dp_vendor_aptx.h
stack/include/a2dp_vendor_aptx_hd.h
stack/include/a2dp_vendor_ldac.h