Update the A2DP Codec Config API
Previously, the JNI upcall would contain only the current codec config. In the new API, the upcall contains: 1. The current codec config 2. The list of codecs containing the local codecs capabilities 3. The list of codecs containing the selectable codecs capabilities. This list is the intersection of the local codecs capabilities and the capabilities of the paired device. Also, updated the codec backend to accomodate the above changes: * Update all selectable codecs inside bta_av_co_audio_set_codec() * Changed getCodecConfigAndCapabilities() to return current codec config, local codecs capabilities, and selectable codecs capabilities. * Updated each codec to compute and store a copy of the selectable capabilities, and the local capabilities. * Updated tA2DP_SBC_CIE to include new field bits_per_sample (for consistency with the rest of the codecs). * Replaced usage of codec_priority of 0 with BTAV_A2DP_CODEC_PRIORITY_DEFAULT * If there is user codec (re)config call, we always send an upcall to inform the Java layer about the most recent codec info. Thus, the caller would always know whether the request succeeded or failed. Test: A2DP streaming with headsets and switching the codecs Change-Id: Ie7a5cd5c2ab01bb8676032be05bc2ad03baa1e3f
Showing
- system/btif/co/bta_av_co.cc 90 additions, 18 deletionssystem/btif/co/bta_av_co.cc
- system/btif/src/btif_av.cc 6 additions, 4 deletionssystem/btif/src/btif_av.cc
- system/stack/a2dp/a2dp_aac.cc 57 additions, 1 deletionsystem/stack/a2dp/a2dp_aac.cc
- system/stack/a2dp/a2dp_codec_config.cc 66 additions, 20 deletionssystem/stack/a2dp/a2dp_codec_config.cc
- system/stack/a2dp/a2dp_sbc.cc 77 additions, 17 deletionssystem/stack/a2dp/a2dp_sbc.cc
- system/stack/a2dp/a2dp_vendor_aptx.cc 43 additions, 1 deletionsystem/stack/a2dp/a2dp_vendor_aptx.cc
- system/stack/a2dp/a2dp_vendor_aptx_hd.cc 43 additions, 1 deletionsystem/stack/a2dp/a2dp_vendor_aptx_hd.cc
- system/stack/a2dp/a2dp_vendor_ldac.cc 82 additions, 1 deletionsystem/stack/a2dp/a2dp_vendor_ldac.cc
- system/stack/include/a2dp_codec_api.h 26 additions, 5 deletionssystem/stack/include/a2dp_codec_api.h
- system/stack/test/stack_a2dp_test.cc 15 additions, 10 deletionssystem/stack/test/stack_a2dp_test.cc
Loading
Please register or sign in to comment