diff options
author | CNSS_WLAN Service <cnssbldsw@qualcomm.com> | 2023-04-20 05:33:27 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2023-04-20 05:33:27 -0700 |
commit | eeeff4c55f202ba7f38222e62dfb7399e6098eaf (patch) | |
tree | 5bfd8985325791d622490328ebbc4575fe78950f | |
parent | 3b713d9c02910691ec9dc213cac277a156532fd7 (diff) | |
parent | 7348c103b7cbe2ded28d21870389ab3d5e062e15 (diff) |
Merge "AAC-BL: Logic to BL devices for a specific vendor." into bt-sys.lnx.13.0
-rw-r--r-- | btif/co/bta_av_co.cc | 14 | ||||
-rw-r--r-- | stack/avdt/avdt_ccb_act.cc | 14 |
2 files changed, 26 insertions, 2 deletions
diff --git a/btif/co/bta_av_co.cc b/btif/co/bta_av_co.cc index f650cf3ef..9cf645846 100644 --- a/btif/co/bta_av_co.cc +++ b/btif/co/bta_av_co.cc @@ -1268,9 +1268,21 @@ static bool bta_av_co_check_peer_eligible_for_aac_codec( vndr_prdt_ver_present = true; } if (vndr_prdt_ver_present && (vendor == A2DP_AAC_BOSE_VENDOR_ID)) { - APPL_TRACE_DEBUG("%s: vendor id info matches ", __func__); + APPL_TRACE_DEBUG("%s: vendor id info matches to BOSE vendor ", __func__); vndr_prdt_ver_present = false; aac_support = true; + if (bta_av_co_audio_device_addr_check_is_enabled(&p_peer->addr)) { + if (interop_match_addr_or_name(INTEROP_DISABLE_AAC_CODEC, &p_peer->addr)) { + APPL_TRACE_DEBUG("AAC is not supported for this BL BOSE remote device"); + aac_support = false; + } + } else { + if (btif_storage_get_stored_remote_name(p_peer->addr, remote_name) && + interop_match_name(INTEROP_DISABLE_AAC_CODEC, remote_name)) { + APPL_TRACE_DEBUG("AAC is not supported for this BL BOSE remote device"); + aac_support = false; + } + } } else if (vndr_prdt_ver_present && interop_database_match_version(INTEROP_ENABLE_AAC_CODEC, version) && interop_match_vendor_product_ids(INTEROP_ENABLE_AAC_CODEC, vendor, product)) { APPL_TRACE_DEBUG("%s: vendor id, product id and version info matching with conf file", __func__); diff --git a/stack/avdt/avdt_ccb_act.cc b/stack/avdt/avdt_ccb_act.cc index 717165c61..e92c5dad4 100644 --- a/stack/avdt/avdt_ccb_act.cc +++ b/stack/avdt/avdt_ccb_act.cc @@ -180,9 +180,21 @@ bool avdt_ccb_check_peer_eligible_for_aac_codec(tAVDT_CCB* p_ccb) { vndr_prdt_ver_present = true; } if (vndr_prdt_ver_present && (vendor == A2DP_AAC_BOSE_VENDOR_ID)) { - APPL_TRACE_DEBUG("%s: vendor id info matches ", __func__); + APPL_TRACE_DEBUG("%s: vendor id info matches BOSE vendor ", __func__); vndr_prdt_ver_present = false; aac_support = true; + if (bta_av_co_audio_device_addr_check_is_enabled(&p_ccb->peer_addr)) { + if (interop_match_addr_or_name(INTEROP_DISABLE_AAC_CODEC, &p_ccb->peer_addr)) { + AVDT_TRACE_EVENT("%s: bose device is BL, skipping AAC advertise\n", __func__); + aac_support = false; + } + } else { + if (btif_storage_get_stored_remote_name(p_ccb->peer_addr, remote_name) && + interop_match_name(INTEROP_DISABLE_AAC_CODEC, remote_name)) { + AVDT_TRACE_EVENT("%s: bose device is BL, skipping AAC advertise\n", __func__); + aac_support = false; + } + } } else if (vndr_prdt_ver_present && interop_match_vendor_product_ids(INTEROP_ENABLE_AAC_CODEC, vendor, product) && interop_database_match_version(INTEROP_ENABLE_AAC_CODEC, version)) { |