summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSumit Bajpai <quic_sbajpai@quicinc.com>2023-04-05 15:33:53 +0530
committerSumit Bajpai <quic_sbajpai@quicinc.com>2023-04-05 15:33:53 +0530
commit7348c103b7cbe2ded28d21870389ab3d5e062e15 (patch)
tree7fc6c9b448d63f42c1956d2de6e39fb635cfcafb
parentf20503c97e19542e15f2e94b0d4fc21fed70dfa1 (diff)
AAC-BL: Logic to BL devices for a specific vendor.
Specific vendor has AAC enabled for all remote device but some specific remote devices doesn't work well for AAC. Add logic to use AAC BL for such remote devices from specific vendor. CRs-Fixed: 3454753 Change-Id: I5adac4d5586ee7b4cdd36c9fb89dc0e732ddf279
-rw-r--r--btif/co/bta_av_co.cc14
-rw-r--r--stack/avdt/avdt_ccb_act.cc14
2 files changed, 26 insertions, 2 deletions
diff --git a/btif/co/bta_av_co.cc b/btif/co/bta_av_co.cc
index cd978784a..388f3199e 100644
--- a/btif/co/bta_av_co.cc
+++ b/btif/co/bta_av_co.cc
@@ -1265,9 +1265,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)) {