system/bt
リビジョン | 1a855c26d82d169015a4bfffde0360821e8571a7 (tree) |
---|---|
日時 | 2016-10-26 08:25:08 |
作者 | Steve Kondik <steve@cyng...> |
コミッター | Steve Kondik |
Revert HFP 1.7 for new impl
Revert "Set HF indicators bit only when remote supports it."
This reverts commit 14c7c069f4d1c8b39524592c81e4ee680383d3ce.
Revert "AG: Set/Unset HF indicator bit based on remote device"
This reverts commit 616d128c492467dfe4e689e4aca8227bd600cf89.
Revert "BT-HFP: HFP1.7 AG support in bluedroid"
This reverts commit 840cf9b195677203cf0cd655e8ab280273571c09.
Change-Id: Icd5e9a0223ace1a4b9d7fe046708a5e34fbe2a36
Revert "Don't unset the HF indicators and S4 Settings for PTS"
This reverts commit bc20346d0004c6493adb7bf667d204d1c12adbc1.
Change-Id: I09b841dd76c9af677f4286bbe759a3f906754ea5
Revert "Dynamic HF version change based on remote hf version"
This reverts commit a8722609d64ceaf62895b3a2fe2ce23e1a54a2a3.
Change-Id: I79805a54cedbb6b21a4c75f13e79d05ac592869c
Revert "BT-HFP: HFP1.7 AG support in bluedroid"
This reverts commit 840cf9b195677203cf0cd655e8ab280273571c09.
Change-Id: Id121c7bb6811263326a459ce84f44baf6ad9acfe
@@ -453,7 +453,6 @@ void bta_ag_rfc_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data) | ||
453 | 453 | p_scb->post_sco = BTA_AG_POST_SCO_NONE; |
454 | 454 | p_scb->svc_conn = FALSE; |
455 | 455 | p_scb->hsp_version = HSP_VERSION_1_2; |
456 | - p_scb->slc_pend_open = FALSE; | |
457 | 456 | bta_ag_at_reinit(&p_scb->at_cb); |
458 | 457 | |
459 | 458 | /* stop timers */ |
@@ -24,7 +24,6 @@ | ||
24 | 24 | #include <ctype.h> |
25 | 25 | #include <stdio.h> |
26 | 26 | #include <string.h> |
27 | -#include <stdlib.h> | |
28 | 27 | |
29 | 28 | #include "bt_target.h" |
30 | 29 | #include "bt_types.h" |
@@ -36,7 +35,6 @@ | ||
36 | 35 | #include "bt_common.h" |
37 | 36 | #include "port_api.h" |
38 | 37 | #include "utl.h" |
39 | -#include <cutils/properties.h> | |
40 | 38 | |
41 | 39 | |
42 | 40 | /***************************************************************************** |
@@ -113,9 +111,7 @@ enum | ||
113 | 111 | BTA_AG_HF_CMD_CBC, |
114 | 112 | BTA_AG_HF_CMD_BCC, |
115 | 113 | BTA_AG_HF_CMD_BCS, |
116 | - BTA_AG_HF_CMD_BAC, | |
117 | - BTA_AG_HF_CMD_BIND, | |
118 | - BTA_AG_HF_CMD_BIEV | |
114 | + BTA_AG_HF_CMD_BAC | |
119 | 115 | }; |
120 | 116 | |
121 | 117 | /* AT command interpreter table for HSP */ |
@@ -157,8 +153,6 @@ const tBTA_AG_AT_CMD bta_ag_hfp_cmd[] = | ||
157 | 153 | {"+BCC", BTA_AG_AT_NONE, BTA_AG_AT_STR, 0, 0}, |
158 | 154 | {"+BCS", BTA_AG_AT_SET, BTA_AG_AT_INT, 0, BTA_AG_CMD_MAX_VAL}, |
159 | 155 | {"+BAC", BTA_AG_AT_SET, BTA_AG_AT_STR, 0, 0}, |
160 | - {"+BIND", (BTA_AG_AT_SET | BTA_AG_AT_READ | BTA_AG_AT_TEST), BTA_AG_AT_STR, 0, 0}, | |
161 | - {"+BIEV", BTA_AG_AT_SET, BTA_AG_AT_STR, 0, 0}, | |
162 | 156 | {"", BTA_AG_AT_NONE, BTA_AG_AT_STR, 0, 0} |
163 | 157 | }; |
164 | 158 |
@@ -200,8 +194,7 @@ enum | ||
200 | 194 | BTA_AG_RES_COPS, |
201 | 195 | BTA_AG_RES_CMEE, |
202 | 196 | BTA_AG_RES_BCS, |
203 | - BTA_AG_RES_UNAT, | |
204 | - BTA_AG_RES_BIND | |
197 | + BTA_AG_RES_UNAT | |
205 | 198 | }; |
206 | 199 | |
207 | 200 | #if defined(BTA_HSP_RESULT_REPLACE_COLON) && (BTA_HSP_RESULT_REPLACE_COLON == TRUE) |
@@ -230,8 +223,7 @@ const tBTA_AG_RESULT bta_ag_result_tbl[] = | ||
230 | 223 | {"+COPS: ", BTA_AG_RES_FMT_STR}, |
231 | 224 | {"+CME ERROR: ", BTA_AG_RES_FMT_INT}, |
232 | 225 | {"+BCS: ", BTA_AG_RES_FMT_INT}, |
233 | - {"", BTA_AG_RES_FMT_STR}, | |
234 | - {"+BIND: ", BTA_AG_RES_FMT_STR}, | |
226 | + {"", BTA_AG_RES_FMT_STR} | |
235 | 227 | }; |
236 | 228 | |
237 | 229 | const tBTA_AG_AT_CMD *bta_ag_at_tbl[BTA_AG_NUM_IDX] = |
@@ -276,9 +268,7 @@ const tBTA_AG_EVT bta_ag_hfp_cb_evt[] = | ||
276 | 268 | BTA_AG_AT_CBC_EVT, /* BTA_AG_HF_CMD_CBC */ |
277 | 269 | 0, /* BTA_AG_HF_CMD_BCC */ |
278 | 270 | BTA_AG_AT_BCS_EVT, /* BTA_AG_HF_CMD_BCS */ |
279 | - BTA_AG_AT_BAC_EVT, /* BTA_AG_HF_CMD_BAC */ | |
280 | - BTA_AG_AT_BIND_EVT, /* BTA_AG_HF_CMD_BIND */ | |
281 | - BTA_AG_AT_BIEV_EVT /* BTA_AG_HF_CMD_BIEV */ | |
271 | + BTA_AG_AT_BAC_EVT /* BTA_AG_HF_CMD_BAC */ | |
282 | 272 | }; |
283 | 273 | |
284 | 274 | /* translation of API result code values to internal values */ |
@@ -304,9 +294,7 @@ const UINT8 bta_ag_trans_result[] = | ||
304 | 294 | 0, /* BTA_AG_CALL_CANCEL_RES */ |
305 | 295 | 0, /* BTA_AG_END_CALL_RES */ |
306 | 296 | 0, /* BTA_AG_IN_CALL_HELD_RES */ |
307 | - BTA_AG_RES_UNAT, /* BTA_AG_UNAT_RES */ | |
308 | - 0, /* BTA_AG_MULTI_CALL_RES */ | |
309 | - BTA_AG_RES_BIND /* BTA_AG_BIND_RES */ | |
297 | + BTA_AG_RES_UNAT /* BTA_AG_UNAT_RES */ | |
310 | 298 | }; |
311 | 299 | |
312 | 300 | /* callsetup indicator value lookup table */ |
@@ -331,10 +319,7 @@ const UINT8 bta_ag_callsetup_ind_tbl[] = | ||
331 | 319 | BTA_AG_CALLSETUP_NONE, /* BTA_AG_OUT_CALL_CONN_RES */ |
332 | 320 | BTA_AG_CALLSETUP_NONE, /* BTA_AG_CALL_CANCEL_RES */ |
333 | 321 | BTA_AG_CALLSETUP_NONE, /* BTA_AG_END_CALL_RES */ |
334 | - BTA_AG_CALLSETUP_NONE, /* BTA_AG_IN_CALL_HELD_RES */ | |
335 | - 0, /* BTA_AG_UNAT_RES */ | |
336 | - 0, /* BTA_AG_MULTI_CALL_RES */ | |
337 | - 0, /* BTA_AG_BIND_RES */ | |
322 | + BTA_AG_CALLSETUP_NONE /* BTA_AG_IN_CALL_HELD_RES */ | |
338 | 323 | }; |
339 | 324 | |
340 | 325 | /******************************************************************************* |
@@ -677,68 +662,6 @@ static UINT8 bta_ag_parse_chld(tBTA_AG_SCB *p_scb, char *p_s) | ||
677 | 662 | return (retval); |
678 | 663 | } |
679 | 664 | |
680 | -/******************************************************************************* | |
681 | -** | |
682 | -** Function bta_ag_parse_biev | |
683 | -** | |
684 | -** Description Parse AT+BIEV parameter string. | |
685 | -** | |
686 | -** | |
687 | -** Returns TRUE if parsed ok, FALSE otherwise. | |
688 | -** | |
689 | -*******************************************************************************/ | |
690 | -static BOOLEAN bta_ag_parse_biev(tBTA_AG_SCB *p_scb, char *p_s) | |
691 | - { | |
692 | - INT32 token1; | |
693 | - long long int token2; | |
694 | - BOOLEAN cont = FALSE; /* Continue processing */ | |
695 | - char *p, *end; | |
696 | - int i = 0; | |
697 | - | |
698 | - while(p_s) | |
699 | - { | |
700 | - /* skip to comma delimiter */ | |
701 | - for(p = p_s; *p != ',' && *p != 0; p++); | |
702 | - | |
703 | - /* get integer value */ | |
704 | - if (*p != 0) | |
705 | - { | |
706 | - *p = 0; | |
707 | - cont = TRUE; | |
708 | - } | |
709 | - else | |
710 | - cont = FALSE; | |
711 | - | |
712 | - if (i > 1) | |
713 | - return FALSE; | |
714 | - | |
715 | - if (i == 0) | |
716 | - { | |
717 | - token1 = utl_str2int32(p_s); | |
718 | - if (token1 == -1) | |
719 | - return FALSE; | |
720 | - } | |
721 | - else | |
722 | - { | |
723 | - token2 = strtoll(p_s, &end, 10); | |
724 | - if (*end != 0 || token2 < 0 || token2 > 0xFFFFFFFF) | |
725 | - return FALSE; | |
726 | - } | |
727 | - | |
728 | - if (cont) | |
729 | - { | |
730 | - p_s = p + 1; | |
731 | - i++; | |
732 | - } | |
733 | - else | |
734 | - { | |
735 | - if (i == 0) return FALSE; | |
736 | - break; | |
737 | - } | |
738 | - } | |
739 | - return TRUE; | |
740 | - } | |
741 | - | |
742 | 665 | #if (BTM_WBS_INCLUDED == TRUE ) |
743 | 666 | /******************************************************************************* |
744 | 667 | ** |
@@ -792,61 +715,6 @@ static tBTA_AG_PEER_CODEC bta_ag_parse_bac(tBTA_AG_SCB *p_scb, char *p_s) | ||
792 | 715 | |
793 | 716 | /******************************************************************************* |
794 | 717 | ** |
795 | -** Function bta_ag_parse_bind | |
796 | -** | |
797 | -** Description Parse AT+BIND parameter string. | |
798 | -** | |
799 | -** Returns TRUE if parsed ok, FALSE otherwise. | |
800 | -** | |
801 | -*******************************************************************************/ | |
802 | -static BOOLEAN bta_ag_parse_bind(tBTA_AG_SCB *p_scb, char *p_s) | |
803 | -{ | |
804 | - INT32 anum_hfind; | |
805 | - BOOLEAN cont = FALSE; /* Continue processing */ | |
806 | - char *p; | |
807 | - int i = 0; | |
808 | - | |
809 | - while(p_s) | |
810 | - { | |
811 | - /* skip to comma delimiter */ | |
812 | - for(p = p_s; *p != ',' && *p != 0; p++); | |
813 | - | |
814 | - /* get integre value */ | |
815 | - if (*p != 0) | |
816 | - { | |
817 | - *p = 0; | |
818 | - cont = TRUE; | |
819 | - } | |
820 | - else | |
821 | - cont = FALSE; | |
822 | - | |
823 | - anum_hfind = utl_str2int32(p_s); | |
824 | - if ((anum_hfind == -1) || (i == 20)) | |
825 | - return FALSE; | |
826 | - | |
827 | - switch(anum_hfind) | |
828 | - { | |
829 | - case BTA_AG_HFIND_ENHANCED_SAFETY: | |
830 | - APPL_TRACE_DEBUG("BTA_AG_HFIND_ENHANCED_SAFETY supported"); | |
831 | - break; | |
832 | - default: | |
833 | - APPL_TRACE_ERROR("unknown HFIND"); | |
834 | - break; | |
835 | - } | |
836 | - | |
837 | - if (cont) | |
838 | - { | |
839 | - p_s = p + 1; | |
840 | - i++; | |
841 | - } | |
842 | - else | |
843 | - break; | |
844 | - } | |
845 | - return TRUE; | |
846 | -} | |
847 | - | |
848 | -/******************************************************************************* | |
849 | -** | |
850 | 718 | ** Function bta_ag_process_unat_res |
851 | 719 | ** |
852 | 720 | ** Description Process the unat response data and remove extra carriage return |
@@ -1006,8 +874,6 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type, | ||
1006 | 874 | tBTA_AG_SCB *ag_scb; |
1007 | 875 | UINT32 i, ind_id; |
1008 | 876 | UINT32 bia_masked_out; |
1009 | - tBTA_AG_FEAT features; | |
1010 | - char value[PROPERTY_VALUE_MAX]; | |
1011 | 877 | #if (BTM_WBS_INCLUDED == TRUE ) |
1012 | 878 | tBTA_AG_PEER_CODEC codec_type, codec_sent; |
1013 | 879 | #endif |
@@ -1106,15 +972,8 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type, | ||
1106 | 972 | /* send OK */ |
1107 | 973 | bta_ag_send_ok(p_scb); |
1108 | 974 | |
1109 | - /* if service level conn. not already open and our features and | |
1110 | - ** peer features do not have Hf indicators, service level conn. now open | |
1111 | - */ | |
1112 | - if (!p_scb->svc_conn && | |
1113 | - !((p_scb->features & BTA_AG_FEAT_HFIND) && | |
1114 | - (p_scb->peer_features & BTA_AG_PEER_FEAT_HFIND))) | |
1115 | - { | |
1116 | - bta_ag_svc_conn_open(p_scb, NULL); | |
1117 | - } | |
975 | + /* if service level conn. not already open, now it's open */ | |
976 | + bta_ag_svc_conn_open(p_scb, NULL); | |
1118 | 977 | |
1119 | 978 | } |
1120 | 979 | else |
@@ -1184,13 +1043,10 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type, | ||
1184 | 1043 | bta_ag_send_ok(p_scb); |
1185 | 1044 | |
1186 | 1045 | /* if service level conn. not already open and our features and |
1187 | - ** peer features do not have 3-way and Hf indicators, service level conn. now open | |
1046 | + ** peer features do not have 3-way, service level conn. now open | |
1188 | 1047 | */ |
1189 | 1048 | if (!p_scb->svc_conn && |
1190 | - !((p_scb->features & BTA_AG_FEAT_3WAY) && | |
1191 | - (p_scb->peer_features & BTA_AG_PEER_FEAT_3WAY)) && | |
1192 | - !((p_scb->features & BTA_AG_FEAT_HFIND) && | |
1193 | - (p_scb->peer_features & BTA_AG_PEER_FEAT_HFIND))) | |
1049 | + !((p_scb->features & BTA_AG_FEAT_3WAY) && (p_scb->peer_features & BTA_AG_PEER_FEAT_3WAY))) | |
1194 | 1050 | { |
1195 | 1051 | bta_ag_svc_conn_open(p_scb, NULL); |
1196 | 1052 | } |
@@ -1235,29 +1091,7 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type, | ||
1235 | 1091 | case BTA_AG_HF_CMD_BRSF: |
1236 | 1092 | /* store peer features */ |
1237 | 1093 | p_scb->peer_features = (UINT16) int_arg; |
1238 | - features = p_scb->features & BTA_AG_BSRF_FEAT_SPEC; | |
1239 | - /* if the devices does not support HFP 1.7, report DUT's HFP version as 1.6 */ | |
1240 | - if (p_scb->peer_version < HFP_VERSION_1_7) | |
1241 | - { | |
1242 | - /* For PTS keep flags as is. */ | |
1243 | - if (property_get("bt.pts.certification", value, "false") && | |
1244 | - strcmp(value, "true") != 0) | |
1245 | - { | |
1246 | - features = features & ~(BTA_AG_FEAT_HFIND | BTA_AG_FEAT_S4); | |
1247 | - } | |
1248 | - } | |
1249 | - else if ((p_scb->peer_version == HFP_VERSION_1_7) && | |
1250 | - (!(p_scb->peer_features & BTA_AG_PEER_FEAT_HFIND))) | |
1251 | - { | |
1252 | - APPL_TRACE_WARNING("%s: Remote is hfp 1.7 but does not support HF indicators" \ | |
1253 | - "unset hf indicator bit from BRSF", __func__); | |
1254 | - /* For PTS keep flags as is. */ | |
1255 | - if (property_get("bt.pts.certification", value, "false") && | |
1256 | - strcmp(value, "true") != 0) | |
1257 | - { | |
1258 | - features = features & ~(BTA_AG_FEAT_HFIND); | |
1259 | - } | |
1260 | - } | |
1094 | + | |
1261 | 1095 | /* send BRSF, send OK */ |
1262 | 1096 | bta_ag_send_result(p_scb, BTA_AG_RES_BRSF, NULL, |
1263 | 1097 | (INT16) features); |
@@ -1446,60 +1280,7 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type, | ||
1446 | 1280 | bta_ag_sco_open(p_scb, NULL); |
1447 | 1281 | break; |
1448 | 1282 | #endif |
1449 | - case BTA_AG_HF_CMD_BIND: | |
1450 | - if ((p_scb->features & BTA_AG_FEAT_HFIND) && | |
1451 | - (p_scb->peer_features & BTA_AG_PEER_FEAT_HFIND)) | |
1452 | - { | |
1453 | - val.num = arg_type; | |
1454 | - if (arg_type == BTA_AG_AT_SET) | |
1455 | - { | |
1456 | - if (!bta_ag_parse_bind(p_scb, p_arg)) | |
1457 | - { | |
1458 | - event = 0; | |
1459 | - bta_ag_send_error(p_scb, BTA_AG_ERR_INV_CHAR_IN_TSTR); | |
1460 | - } | |
1461 | - else | |
1462 | - { | |
1463 | - bta_ag_send_ok (p_scb); | |
1464 | - } | |
1465 | - } | |
1466 | - else if (arg_type == BTA_AG_AT_READ) | |
1467 | - { | |
1468 | - /* open SLC when response ok is sent from app*/ | |
1469 | - p_scb->slc_pend_open = true; | |
1470 | - } | |
1471 | - else if (arg_type == BTA_AG_AT_TEST) | |
1472 | - { | |
1473 | - /* get ag's list of supported hf indicators from app */ | |
1474 | - } | |
1475 | - else | |
1476 | - { | |
1477 | - event = 0; | |
1478 | - bta_ag_send_error (p_scb, BTA_AG_ERR_INVALID_INDEX); | |
1479 | - } | |
1480 | - } | |
1481 | - else | |
1482 | - { | |
1483 | - event = 0; | |
1484 | - bta_ag_send_error(p_scb, BTA_AG_ERR_OP_NOT_SUPPORTED); | |
1485 | - } | |
1486 | - break; | |
1487 | - case BTA_AG_HF_CMD_BIEV: | |
1488 | - if ((p_scb->features & BTA_AG_FEAT_HFIND) && | |
1489 | - (p_scb->peer_features & BTA_AG_PEER_FEAT_HFIND)) | |
1490 | - { | |
1491 | - if (!bta_ag_parse_biev(p_scb, p_arg)) | |
1492 | - { | |
1493 | - event = 0; | |
1494 | - bta_ag_send_error(p_scb, BTA_AG_ERR_INV_CHAR_IN_TSTR); | |
1495 | - } | |
1496 | - } | |
1497 | - else | |
1498 | - { | |
1499 | - event = 0; | |
1500 | - bta_ag_send_error(p_scb, BTA_AG_ERR_OP_NOT_SUPPORTED); | |
1501 | - } | |
1502 | - break; | |
1283 | + | |
1503 | 1284 | default: |
1504 | 1285 | bta_ag_send_error(p_scb, BTA_AG_ERR_OP_NOT_SUPPORTED); |
1505 | 1286 | break; |
@@ -1888,13 +1669,6 @@ void bta_ag_hfp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result) | ||
1888 | 1669 | |
1889 | 1670 | if (p_result->data.ok_flag == BTA_AG_OK_DONE) |
1890 | 1671 | bta_ag_send_ok(p_scb); |
1891 | - | |
1892 | - if (p_scb->slc_pend_open) | |
1893 | - { | |
1894 | - APPL_TRACE_DEBUG("opening SLC now after +BIND READ response"); | |
1895 | - bta_ag_svc_conn_open(p_scb, NULL); | |
1896 | - p_scb->slc_pend_open = FALSE; | |
1897 | - } | |
1898 | 1672 | } |
1899 | 1673 | else |
1900 | 1674 | { |
@@ -1937,10 +1711,6 @@ void bta_ag_hfp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result) | ||
1937 | 1711 | } |
1938 | 1712 | break; |
1939 | 1713 | |
1940 | - case BTA_AG_BIND_RES: | |
1941 | - bta_ag_send_result(p_scb, code, p_result->data.str, 0); | |
1942 | - break; | |
1943 | - | |
1944 | 1714 | default: |
1945 | 1715 | break; |
1946 | 1716 | } |
@@ -2022,8 +1792,7 @@ void bta_ag_send_ring(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data) | ||
2022 | 1792 | { |
2023 | 1793 | UNUSED(p_data); |
2024 | 1794 | |
2025 | - if ((p_scb->conn_service == BTA_AG_HFP) && | |
2026 | - p_scb->callsetup_ind != BTA_AG_CALLSETUP_INCOMING) | |
1795 | + if (p_scb->conn_service == BTA_AG_HFP && p_scb->callsetup_ind != BTA_AG_CALLSETUP_INCOMING) | |
2027 | 1796 | { |
2028 | 1797 | APPL_TRACE_DEBUG("don't send the ring since there is no MT call setup"); |
2029 | 1798 | return; |
@@ -45,8 +45,6 @@ | ||
45 | 45 | #define HFP_VERSION_1_1 0x0101 |
46 | 46 | #define HFP_VERSION_1_5 0x0105 |
47 | 47 | #define HFP_VERSION_1_6 0x0106 |
48 | -#define HFP_VERSION_1_7 0x0107 | |
49 | - | |
50 | 48 | |
51 | 49 | #define HSP_VERSION_1_0 0x0100 |
52 | 50 | #define HSP_VERSION_1_2 0x0102 |
@@ -79,7 +77,6 @@ | ||
79 | 77 | BTA_AG_FEAT_VTAG | BTA_AG_FEAT_REJECT | \ |
80 | 78 | BTA_AG_FEAT_ECS | BTA_AG_FEAT_ECC | \ |
81 | 79 | BTA_AG_FEAT_EXTERR | BTA_AG_FEAT_CODEC | \ |
82 | - BTA_AG_FEAT_HFIND| BTA_AG_FEAT_S4| \ | |
83 | 80 | BTA_AG_FEAT_VOIP) |
84 | 81 | |
85 | 82 | #define BTA_AG_SDP_FEAT_SPEC (BTA_AG_FEAT_3WAY | BTA_AG_FEAT_ECNR | \ |
@@ -300,7 +297,7 @@ typedef struct | ||
300 | 297 | BOOLEAN codec_fallback; /* If sco nego fails for mSBC, fallback to CVSD */ |
301 | 298 | tBTA_AG_SCO_MSBC_SETTINGS codec_msbc_settings; /* settings to be used for the impending eSCO */ |
302 | 299 | #endif |
303 | - BOOLEAN slc_pend_open; /* SLC is pending open */ | |
300 | + | |
304 | 301 | } tBTA_AG_SCB; |
305 | 302 | |
306 | 303 | /* type for sco data */ |
@@ -962,7 +962,6 @@ static char *bta_ag_evt_str(UINT16 event, tBTA_AG_RES result) | ||
962 | 962 | case BTA_AG_CALL_CANCEL_RES: return ("AT Result BTA_AG_CALL_CANCEL_RES"); |
963 | 963 | case BTA_AG_END_CALL_RES: return ("AT Result BTA_AG_END_CALL_RES"); |
964 | 964 | case BTA_AG_UNAT_RES: return ("AT Result BTA_AG_UNAT_RES"); |
965 | - case BTA_AG_BIND_RES: return ("AT Result BTA_AG_BIND_RES"); | |
966 | 965 | default: return ("Unknown AG Result"); |
967 | 966 | } |
968 | 967 | case BTA_AG_API_SETCODEC_EVT: |
@@ -73,31 +73,14 @@ enum | ||
73 | 73 | }; |
74 | 74 | |
75 | 75 | #if (BTM_WBS_INCLUDED == TRUE ) |
76 | -#define BTA_AG_NUM_CODECS 4 | |
77 | -#define BTA_AG_ESCO_SETTING_IDX_CVSD_S4 0 /* eSCO S4 setting for CVSD */ | |
78 | -#define BTA_AG_ESCO_SETTING_IDX_CVSD_S3 1 /* eSCO S3 setting for CVSD */ | |
79 | -#define BTA_AG_ESCO_SETTING_IDX_T1 2 /* eSCO setting for mSBC T1 */ | |
80 | -#define BTA_AG_ESCO_SETTING_IDX_T2 3 /* eSCO setting for mSBC T2 */ | |
76 | +#define BTA_AG_NUM_CODECS 3 | |
77 | +#define BTA_AG_ESCO_SETTING_IDX_CVSD 0 /* eSCO setting for CVSD */ | |
78 | +#define BTA_AG_ESCO_SETTING_IDX_T1 1 /* eSCO setting for mSBC T1 */ | |
79 | +#define BTA_AG_ESCO_SETTING_IDX_T2 2 /* eSCO setting for mSBC T2 */ | |
81 | 80 | |
82 | 81 | static const tBTM_ESCO_PARAMS bta_ag_esco_params[BTA_AG_NUM_CODECS] = |
83 | 82 | { |
84 | - /* CVSD S4 */ | |
85 | - { | |
86 | - BTM_64KBITS_RATE, /* TX Bandwidth (64 kbits/sec) */ | |
87 | - BTM_64KBITS_RATE, /* RX Bandwidth (64 kbits/sec) */ | |
88 | - 0x000c, /* 12 ms (HS/HF can use EV3, 2-EV3, 3-EV3) */ | |
89 | - BTM_VOICE_SETTING_CVSD, /* Inp Linear, Air CVSD, 2s Comp, 16bit */ | |
90 | - (BTM_SCO_PKT_TYPES_MASK_HV1 + /* Packet Types */ | |
91 | - BTM_SCO_PKT_TYPES_MASK_HV2 + | |
92 | - BTM_SCO_PKT_TYPES_MASK_HV3 + | |
93 | - BTM_SCO_PKT_TYPES_MASK_EV3 + | |
94 | - BTM_SCO_PKT_TYPES_MASK_EV4 + | |
95 | - BTM_SCO_PKT_TYPES_MASK_EV5 + | |
96 | - BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 + | |
97 | - BTM_SCO_PKT_TYPES_MASK_NO_3_EV5), | |
98 | - BTM_ESCO_RETRANS_QUALITY /* Retransmission effort */ | |
99 | - }, | |
100 | - /* CVSD S3 */ | |
83 | + /* CVSD */ | |
101 | 84 | { |
102 | 85 | BTM_64KBITS_RATE, /* TX Bandwidth (64 kbits/sec) */ |
103 | 86 | BTM_64KBITS_RATE, /* RX Bandwidth (64 kbits/sec) */ |
@@ -141,40 +124,21 @@ static const tBTM_ESCO_PARAMS bta_ag_esco_params[BTA_AG_NUM_CODECS] = | ||
141 | 124 | }; |
142 | 125 | #else |
143 | 126 | /* WBS not included, CVSD by default */ |
144 | -static const tBTM_ESCO_PARAMS bta_ag_esco_params[] = | |
127 | +static const tBTM_ESCO_PARAMS bta_ag_esco_params = | |
145 | 128 | { |
146 | - /* CVSD S4 */ | |
147 | - { | |
148 | - BTM_64KBITS_RATE, /* TX Bandwidth (64 kbits/sec) */ | |
149 | - BTM_64KBITS_RATE, /* RX Bandwidth (64 kbits/sec) */ | |
150 | - 0x000c, /* 12 ms (HS/HF can use EV3, 2-EV3, 3-EV3) */ | |
151 | - BTM_VOICE_SETTING_CVSD, /* Inp Linear, Air CVSD, 2s Comp, 16bit */ | |
152 | - (BTM_SCO_PKT_TYPES_MASK_HV1 + /* Packet Types */ | |
153 | - BTM_SCO_PKT_TYPES_MASK_HV2 + | |
154 | - BTM_SCO_PKT_TYPES_MASK_HV3 + | |
155 | - BTM_SCO_PKT_TYPES_MASK_EV3 + | |
156 | - BTM_SCO_PKT_TYPES_MASK_EV4 + | |
157 | - BTM_SCO_PKT_TYPES_MASK_EV5 + | |
158 | - BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 + | |
159 | - BTM_SCO_PKT_TYPES_MASK_NO_3_EV5), | |
160 | - BTM_ESCO_RETRANS_QUALITY /* Retransmission effort */ | |
161 | - }, | |
162 | - /* CVSD S3 */ | |
163 | - { | |
164 | - BTM_64KBITS_RATE, /* TX Bandwidth (64 kbits/sec) */ | |
165 | - BTM_64KBITS_RATE, /* RX Bandwidth (64 kbits/sec) */ | |
166 | - 0x000a, /* 10 ms (HS/HF can use EV3, 2-EV3, 3-EV3) */ | |
167 | - 0x0060, /* Inp Linear, Air CVSD, 2s Comp, 16bit */ | |
168 | - (BTM_SCO_PKT_TYPES_MASK_HV1 + /* Packet Types */ | |
169 | - BTM_SCO_PKT_TYPES_MASK_HV2 + | |
170 | - BTM_SCO_PKT_TYPES_MASK_HV3 + | |
171 | - BTM_SCO_PKT_TYPES_MASK_EV3 + | |
172 | - BTM_SCO_PKT_TYPES_MASK_EV4 + | |
173 | - BTM_SCO_PKT_TYPES_MASK_EV5 + | |
174 | - BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 + | |
175 | - BTM_SCO_PKT_TYPES_MASK_NO_3_EV5), | |
176 | - BTM_ESCO_RETRANS_POWER /* Retransmission effort */ | |
177 | - } | |
129 | + BTM_64KBITS_RATE, /* TX Bandwidth (64 kbits/sec) */ | |
130 | + BTM_64KBITS_RATE, /* RX Bandwidth (64 kbits/sec) */ | |
131 | + 0x000a, /* 10 ms (HS/HF can use EV3, 2-EV3, 3-EV3) */ | |
132 | + 0x0060, /* Inp Linear, Air CVSD, 2s Comp, 16bit */ | |
133 | + (BTM_SCO_PKT_TYPES_MASK_HV1 + /* Packet Types */ | |
134 | + BTM_SCO_PKT_TYPES_MASK_HV2 + | |
135 | + BTM_SCO_PKT_TYPES_MASK_HV3 + | |
136 | + BTM_SCO_PKT_TYPES_MASK_EV3 + | |
137 | + BTM_SCO_PKT_TYPES_MASK_EV4 + | |
138 | + BTM_SCO_PKT_TYPES_MASK_EV5 + | |
139 | + BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 + | |
140 | + BTM_SCO_PKT_TYPES_MASK_NO_3_EV5), | |
141 | + BTM_ESCO_RETRANS_POWER /* Retransmission effort */ | |
178 | 142 | }; |
179 | 143 | #endif |
180 | 144 |
@@ -484,9 +448,9 @@ static void bta_ag_create_sco(tBTA_AG_SCB *p_scb, BOOLEAN is_orig) | ||
484 | 448 | tBTM_STATUS status; |
485 | 449 | UINT8 *p_bd_addr = NULL; |
486 | 450 | tBTM_ESCO_PARAMS params; |
487 | - int codec_index = (p_scb->peer_features & BTA_AG_PEER_FEAT_S4) ? 0 : 1; | |
488 | 451 | #if (BTM_WBS_INCLUDED == TRUE ) |
489 | 452 | tBTA_AG_PEER_CODEC esco_codec = BTM_SCO_CODEC_CVSD; |
453 | + int codec_index = 0; | |
490 | 454 | #endif |
491 | 455 | #if (BTM_SCO_HCI_INCLUDED == TRUE ) |
492 | 456 | tBTM_SCO_ROUTE_TYPE sco_route; |
@@ -533,7 +497,7 @@ static void bta_ag_create_sco(tBTA_AG_SCB *p_scb, BOOLEAN is_orig) | ||
533 | 497 | params = bta_ag_esco_params[codec_index]; |
534 | 498 | #else |
535 | 499 | /* When WBS is not included, use CVSD by default */ |
536 | - params = bta_ag_esco_params[codec_index]; | |
500 | + params = bta_ag_esco_params; | |
537 | 501 | #endif |
538 | 502 | |
539 | 503 | if(bta_ag_cb.sco.param_updated) /* If we do not use the default parameters */ |
@@ -1667,19 +1631,9 @@ void bta_ag_sco_conn_rsp(tBTA_AG_SCB *p_scb, tBTM_ESCO_CONN_REQ_EVT_DATA *p_data | ||
1667 | 1631 | { |
1668 | 1632 | resp.rx_bw = BTM_64KBITS_RATE; |
1669 | 1633 | resp.tx_bw = BTM_64KBITS_RATE; |
1670 | - if ((p_scb->peer_features & BTA_AG_PEER_FEAT_S4) && | |
1671 | - (p_scb->features & BTA_AG_PEER_FEAT_S4)) | |
1672 | - { | |
1673 | - APPL_TRACE_WARNING("bta_ag_sco_conn_rsp with S4 link settings"); | |
1674 | - resp.max_latency = 12; | |
1675 | - resp.retrans_effort = BTM_ESCO_RETRANS_QUALITY; | |
1676 | - } | |
1677 | - else | |
1678 | - { | |
1679 | - resp.max_latency = 10; | |
1680 | - resp.retrans_effort = BTM_ESCO_RETRANS_POWER; | |
1681 | - } | |
1634 | + resp.max_latency = 10; | |
1682 | 1635 | resp.voice_contfmt = 0x60; |
1636 | + resp.retrans_effort = BTM_ESCO_RETRANS_POWER; | |
1683 | 1637 | |
1684 | 1638 | if (p_data->link_type == BTM_LINK_TYPE_SCO) |
1685 | 1639 | { |
@@ -23,9 +23,6 @@ | ||
23 | 23 | * |
24 | 24 | ******************************************************************************/ |
25 | 25 | |
26 | -#include <stdio.h> | |
27 | -#include <stdlib.h> | |
28 | -#include <errno.h> | |
29 | 26 | #include <string.h> |
30 | 27 | #include "bta_api.h" |
31 | 28 | #include "bta_sys.h" |
@@ -35,7 +32,6 @@ | ||
35 | 32 | #include "btm_api.h" |
36 | 33 | #include "bt_common.h" |
37 | 34 | #include "utl.h" |
38 | -#include "bt_utils.h" | |
39 | 35 | |
40 | 36 | /* Number of protocol elements in protocol element list. */ |
41 | 37 | #define BTA_AG_NUM_PROTO_ELEMS 2 |
@@ -394,20 +390,6 @@ BOOLEAN bta_ag_sdp_find_attr(tBTA_AG_SCB *p_scb, tBTA_SERVICE_MASK service) | ||
394 | 390 | p_scb->peer_features = p_attr->attr_value.v.u16; |
395 | 391 | #endif |
396 | 392 | } |
397 | - | |
398 | - /* Remote supports 1.7, store it in the file */ | |
399 | - if (p_scb->peer_version == HFP_VERSION_1_7) | |
400 | - { | |
401 | - bool ret = FALSE; | |
402 | - /* Check if the device is already part of the list, if not store it */ | |
403 | - ret = is_device_present(IOT_HFP_1_7_BLACKLIST, p_scb->peer_addr); | |
404 | - | |
405 | - if (ret == FALSE) | |
406 | - { | |
407 | - add_iot_device(IOT_DEV_CONF_FILE, IOT_HFP_1_7_BLACKLIST, | |
408 | - p_scb->peer_addr, METHOD_BD); | |
409 | - } | |
410 | - } | |
411 | 393 | } |
412 | 394 | else /* HSP */ |
413 | 395 | { |
@@ -42,9 +42,7 @@ | ||
42 | 42 | #define BTA_AG_FEAT_ECC 0x00000080 /* Enhanced Call Control */ |
43 | 43 | #define BTA_AG_FEAT_EXTERR 0x00000100 /* Extended error codes */ |
44 | 44 | #define BTA_AG_FEAT_CODEC 0x00000200 /* Codec Negotiation */ |
45 | -#define BTA_AG_FEAT_HFIND 0x00000400 /* HF indicators */ | |
46 | -#define BTA_AG_FEAT_S4 0x00000800 /* ESCO S4 link setting */ | |
47 | -#define BTA_AG_FEAT_VOIP 0x00001000 /* VoIP call */ | |
45 | +#define BTA_AG_FEAT_VOIP 0x00000400 /* VoIP call */ | |
48 | 46 | /* Proprietary features: using 31 ~ 16 bits */ |
49 | 47 | #define BTA_AG_FEAT_BTRH 0x00010000 /* CCAP incoming call hold */ |
50 | 48 | #define BTA_AG_FEAT_UNAT 0x00020000 /* Pass unknown AT commands to application */ |
@@ -100,8 +98,6 @@ typedef UINT8 tBTA_AG_STATUS; | ||
100 | 98 | #define BTA_AG_IN_CALL_HELD_RES 19 /* Incoming call held */ |
101 | 99 | #define BTA_AG_UNAT_RES 20 /* Response to unknown AT command event */ |
102 | 100 | #define BTA_AG_MULTI_CALL_RES 21 /* SLC at three way call */ |
103 | -#define BTA_AG_BIND_RES 22 /* Send indicator response for AT+BIND */ | |
104 | - | |
105 | 101 | |
106 | 102 | typedef UINT8 tBTA_AG_RES; |
107 | 103 |
@@ -114,9 +110,7 @@ typedef UINT8 tBTA_AG_RES; | ||
114 | 110 | #define BTA_AG_PEER_FEAT_ECS 0x0020 /* Enhanced Call Status */ |
115 | 111 | #define BTA_AG_PEER_FEAT_ECC 0x0040 /* Enhanced Call Control */ |
116 | 112 | #define BTA_AG_PEER_FEAT_CODEC 0x0080 /* Codec Negotiation */ |
117 | -#define BTA_AG_PEER_FEAT_HFIND 0x0100 /* HF indicators */ | |
118 | -#define BTA_AG_PEER_FEAT_S4 0x0200 /* ESCO S4 link settings */ | |
119 | -#define BTA_AG_PEER_FEAT_VOIP 0x0400 /* VoIP call */ | |
113 | +#define BTA_AG_PEER_FEAT_VOIP 0x0100 /* VoIP call */ | |
120 | 114 | |
121 | 115 | typedef UINT16 tBTA_AG_PEER_FEAT; |
122 | 116 |
@@ -128,10 +122,6 @@ typedef UINT16 tBTA_AG_PEER_FEAT; | ||
128 | 122 | #define BTA_AG_CODEC_MSBC BTM_SCO_CODEC_MSBC /* mSBC */ |
129 | 123 | typedef UINT16 tBTA_AG_PEER_CODEC; |
130 | 124 | |
131 | -/* HFP peer supported HF indicator assigned numbers */ | |
132 | -#define BTM_AG_HFIND_NONE 0 | |
133 | -#define BTA_AG_HFIND_ENHANCED_SAFETY 1 /* Enhanced Safety HF indicator */ | |
134 | - | |
135 | 125 | /* HFP errcode - Set when BTA_AG_OK_ERROR is returned in 'ok_flag' */ |
136 | 126 | #define BTA_AG_ERR_PHONE_FAILURE 0 /* Phone Failure */ |
137 | 127 | #define BTA_AG_ERR_NO_CONN_PHONE 1 /* No connection to phone */ |
@@ -211,13 +201,6 @@ typedef UINT16 tBTA_AG_PEER_CODEC; | ||
211 | 201 | #define BTA_AG_AT_MAX_LEN 256 |
212 | 202 | #endif |
213 | 203 | |
214 | -/* AT command argument capabilities */ | |
215 | -#define BTA_AG_AT_NONE 0x01 /* no argument */ | |
216 | -#define BTA_AG_AT_SET 0x02 /* set value */ | |
217 | -#define BTA_AG_AT_READ 0x04 /* read value */ | |
218 | -#define BTA_AG_AT_TEST 0x08 /* test value range */ | |
219 | -#define BTA_AG_AT_FREE 0x10 /* freeform argument */ | |
220 | - | |
221 | 204 | /* data associated with BTA_AG_IND_RES */ |
222 | 205 | typedef struct |
223 | 206 | { |
@@ -271,10 +254,6 @@ typedef struct | ||
271 | 254 | #define BTA_AG_AT_CBC_EVT 25 /* Battery Level report from HF */ |
272 | 255 | #define BTA_AG_AT_BAC_EVT 26 /* avablable codec */ |
273 | 256 | #define BTA_AG_AT_BCS_EVT 27 /* Codec select */ |
274 | -#define BTA_AG_AT_BIND_EVT 28 /* Read HF indicators supported values */ | |
275 | -#define BTA_AG_AT_BIEV_EVT 29 /* HF indicator value update from HF*/ | |
276 | - | |
277 | - | |
278 | 257 | |
279 | 258 | typedef UINT8 tBTA_AG_EVT; |
280 | 259 |
@@ -75,20 +75,6 @@ extern INT16 utl_str2int(const char *p_s); | ||
75 | 75 | |
76 | 76 | /******************************************************************************* |
77 | 77 | ** |
78 | -** Function utl_str2int32 | |
79 | -** | |
80 | -** Description This utility function converts a character string to an | |
81 | -** int32. Acceptable values in string are 0-9. If | |
82 | -** invalid string or string value too large, -1 is returned. | |
83 | -** | |
84 | -** | |
85 | -** Returns int32_t value or -1 on error. | |
86 | -** | |
87 | -*******************************************************************************/ | |
88 | -extern INT32 utl_str2int32(const char *p_s); | |
89 | - | |
90 | -/******************************************************************************* | |
91 | -** | |
92 | 78 | ** Function utl_strucmp |
93 | 79 | ** |
94 | 80 | ** Description This utility function compares two strings in uppercase. |
@@ -68,46 +68,6 @@ INT16 utl_str2int(const char *p_s) | ||
68 | 68 | |
69 | 69 | /******************************************************************************* |
70 | 70 | ** |
71 | -** Function utl_str2int32 | |
72 | -** | |
73 | -** Description This utility function converts a character string to an | |
74 | -** int32. Acceptable values in string are 0-9. If invalid | |
75 | -** string or string value too large, -1 is returned. Leading | |
76 | -** spaces are skipped. | |
77 | -** | |
78 | -** | |
79 | -** Returns int32_t value or -1 on error. | |
80 | -** | |
81 | -*******************************************************************************/ | |
82 | -INT32 utl_str2int32(const char *p_s) | |
83 | -{ | |
84 | - INT32 val = 0; | |
85 | - | |
86 | - for (;*p_s == ' ' && *p_s != 0; p_s++); | |
87 | - | |
88 | - if (*p_s == 0) return -1; | |
89 | - | |
90 | - for (;;) | |
91 | - { | |
92 | - if ((*p_s < '0') || (*p_s > '9')) return -1; | |
93 | - | |
94 | - val += (INT32) (*p_s++ - '0'); | |
95 | - | |
96 | - if (val > 65535) return -1; | |
97 | - | |
98 | - if (*p_s == 0) | |
99 | - { | |
100 | - return val; | |
101 | - } | |
102 | - else | |
103 | - { | |
104 | - val *= 10; | |
105 | - } | |
106 | - } | |
107 | -} | |
108 | - | |
109 | -/******************************************************************************* | |
110 | -** | |
111 | 71 | ** Function utl_strucmp |
112 | 72 | ** |
113 | 73 | ** Description This utility function compares two strings in uppercase. |
@@ -73,8 +73,6 @@ | ||
73 | 73 | BTA_AG_FEAT_EXTERR | \ |
74 | 74 | BTA_AG_FEAT_BTRH | \ |
75 | 75 | BTA_AG_FEAT_VREC | \ |
76 | - BTA_AG_FEAT_HFIND | \ | |
77 | - BTA_AG_FEAT_S4 | \ | |
78 | 76 | BTA_AG_FEAT_UNAT) |
79 | 77 | #endif |
80 | 78 |
@@ -717,27 +715,6 @@ static void btif_hf_upstreams_evt(UINT16 event, char* p_param) | ||
717 | 715 | BTHF_WBS_YES : BTHF_WBS_NO, &btif_hf_cb[idx].connected_bda); |
718 | 716 | break; |
719 | 717 | |
720 | - case BTA_AG_AT_BIND_EVT: | |
721 | - switch(p_data->val.num) | |
722 | - { | |
723 | - case BTA_AG_AT_SET: | |
724 | - HAL_CBACK(bt_hf_callbacks, bind_cmd_cb, p_data->val.str, BTHF_BIND_SET, | |
725 | - &btif_hf_cb[idx].connected_bda); | |
726 | - break; | |
727 | - case BTA_AG_AT_READ: | |
728 | - HAL_CBACK(bt_hf_callbacks, bind_cmd_cb, p_data->val.str, BTHF_BIND_READ, | |
729 | - &btif_hf_cb[idx].connected_bda); | |
730 | - break; | |
731 | - case BTA_AG_AT_TEST: | |
732 | - HAL_CBACK(bt_hf_callbacks, bind_cmd_cb, p_data->val.str, BTHF_BIND_TEST, | |
733 | - &btif_hf_cb[idx].connected_bda); | |
734 | - break; | |
735 | - } | |
736 | - break; | |
737 | - case BTA_AG_AT_BIEV_EVT: | |
738 | - HAL_CBACK(bt_hf_callbacks, biev_cmd_cb, p_data->val.str, | |
739 | - &btif_hf_cb[idx].connected_bda); | |
740 | - break; | |
741 | 718 | default: |
742 | 719 | BTIF_TRACE_WARNING("%s: Unhandled event: %d", __FUNCTION__, event); |
743 | 720 | break; |
@@ -1707,88 +1684,6 @@ static bt_status_t configure_wbs( bt_bdaddr_t *bd_addr , bthf_wbs_config_t conf | ||
1707 | 1684 | return BT_STATUS_SUCCESS; |
1708 | 1685 | } |
1709 | 1686 | |
1710 | -/******************************************************************************* | |
1711 | -** | |
1712 | -** Function bind_response | |
1713 | -** | |
1714 | -** Description response for BIND READ command | |
1715 | -** Can be iteratively called for each Hf indicator. | |
1716 | -** | |
1717 | -** Returns bt_status_t | |
1718 | -** | |
1719 | -*******************************************************************************/ | |
1720 | -static bt_status_t bind_response(int anum, bthf_hf_indicator_status_t status, | |
1721 | - bt_bdaddr_t *bd_addr) | |
1722 | -{ | |
1723 | - CHECK_BTHF_INIT(); | |
1724 | - | |
1725 | - int idx = btif_hf_idx_by_bdaddr(bd_addr); | |
1726 | - | |
1727 | - if ((idx < 0) || (idx >= BTIF_HF_NUM_CB)) | |
1728 | - { | |
1729 | - BTIF_TRACE_ERROR("%s: Invalid index %d", __FUNCTION__, idx); | |
1730 | - return BT_STATUS_FAIL; | |
1731 | - } | |
1732 | - | |
1733 | - if (idx != BTIF_HF_INVALID_IDX) | |
1734 | - { | |
1735 | - tBTA_AG_RES_DATA ag_res; | |
1736 | - int xx; | |
1737 | - | |
1738 | - memset (&ag_res, 0, sizeof (ag_res)); | |
1739 | - | |
1740 | - /* Format the response */ | |
1741 | - BTIF_TRACE_EVENT("bind_response: anum : [%d] status %d ", anum, status); | |
1742 | - xx = snprintf (ag_res.str, sizeof(ag_res.str), "%d,%d", anum, status); | |
1743 | - | |
1744 | - BTA_AgResult (btif_hf_cb[idx].handle, BTA_AG_BIND_RES, &ag_res); | |
1745 | - | |
1746 | - return BT_STATUS_SUCCESS; | |
1747 | - } | |
1748 | - | |
1749 | - return BT_STATUS_FAIL; | |
1750 | -} | |
1751 | - | |
1752 | -/******************************************************************************* | |
1753 | -** | |
1754 | -** Function bind_string_response | |
1755 | -** | |
1756 | -** Description response for BIND TEST command | |
1757 | -** | |
1758 | -** Returns bt_status_t | |
1759 | -** | |
1760 | -*******************************************************************************/ | |
1761 | -static bt_status_t bind_string_response(const char* res, | |
1762 | - bt_bdaddr_t *bd_addr) | |
1763 | -{ | |
1764 | - CHECK_BTHF_INIT(); | |
1765 | - | |
1766 | - int idx = btif_hf_idx_by_bdaddr(bd_addr); | |
1767 | - | |
1768 | - if ((idx < 0) || (idx >= BTIF_HF_NUM_CB)) | |
1769 | - { | |
1770 | - BTIF_TRACE_ERROR("%s: Invalid index %d", __FUNCTION__, idx); | |
1771 | - return BT_STATUS_FAIL; | |
1772 | - } | |
1773 | - | |
1774 | - if (idx != BTIF_HF_INVALID_IDX) | |
1775 | - { | |
1776 | - tBTA_AG_RES_DATA ag_res; | |
1777 | - int xx; | |
1778 | - | |
1779 | - memset (&ag_res, 0, sizeof (ag_res)); | |
1780 | - | |
1781 | - /* Format the response */ | |
1782 | - xx = snprintf (ag_res.str, sizeof(ag_res.str), "%s", res); | |
1783 | - | |
1784 | - BTA_AgResult (btif_hf_cb[idx].handle, BTA_AG_BIND_RES, &ag_res); | |
1785 | - | |
1786 | - return BT_STATUS_SUCCESS; | |
1787 | - } | |
1788 | - | |
1789 | - return BT_STATUS_FAIL; | |
1790 | -} | |
1791 | - | |
1792 | 1687 | static void set_voip_network_type_wifi_hci_cmd_complete(tBTM_VSC_CMPL* p_data) |
1793 | 1688 | { |
1794 | 1689 | UINT8 *stream, status, subcmd; |
@@ -1871,8 +1766,6 @@ static const bthf_interface_t bthfInterface = { | ||
1871 | 1766 | phone_state_change, |
1872 | 1767 | cleanup, |
1873 | 1768 | configure_wbs, |
1874 | - bind_response, | |
1875 | - bind_string_response, | |
1876 | 1769 | voip_network_type_wifi, |
1877 | 1770 | }; |
1878 | 1771 |
@@ -307,8 +307,6 @@ const char* dump_hf_event(UINT16 event) | ||
307 | 307 | CASE_RETURN_STR(BTA_AG_AT_CBC_EVT) |
308 | 308 | CASE_RETURN_STR(BTA_AG_AT_BAC_EVT) |
309 | 309 | CASE_RETURN_STR(BTA_AG_AT_BCS_EVT) |
310 | - CASE_RETURN_STR(BTA_AG_AT_BIND_EVT) | |
311 | - CASE_RETURN_STR(BTA_AG_AT_BIEV_EVT) | |
312 | 310 | |
313 | 311 | default: |
314 | 312 | return "UNKNOWN MSG ID"; |
@@ -51,7 +51,6 @@ extern fixed_queue_t *btu_general_alarm_queue; | ||
51 | 51 | #define SDP_MAX_SERVICE_RSPHDR_LEN 12 |
52 | 52 | #define SDP_MAX_SERVATTR_RSPHDR_LEN 10 |
53 | 53 | #define SDP_MAX_ATTR_RSPHDR_LEN 10 |
54 | -#define PROFILE_VERSION_POSITION 7 | |
55 | 54 | #define SDP_PROFILE_DESC_LENGTH 8 |
56 | 55 | #define AVRCP_SUPPORTED_FEATURES_POSITION 1 |
57 | 56 | #define AVRCP_BROWSE_SUPPORT_BITMASK 0x40 |
@@ -287,46 +286,6 @@ BD_ADDR rem | ||
287 | 286 | |
288 | 287 | /************************************************************************************* |
289 | 288 | ** |
290 | -** Function sdp_change_hfp_version | |
291 | -** | |
292 | -** Description Checks if UUID is AG_HANDSFREE, attribute id | |
293 | -** is Profile descriptor list and remote BD address | |
294 | -** matches device blacklist, change hfp version to 1.7 | |
295 | -** | |
296 | -** Returns BOOLEAN | |
297 | -** | |
298 | -***************************************************************************************/ | |
299 | -BOOLEAN sdp_change_hfp_version (tSDP_ATTRIBUTE *p_attr, BD_ADDR remote_address) | |
300 | -{ | |
301 | - bool is_blacklisted = FALSE; | |
302 | - char value[PROPERTY_VALUE_MAX]; | |
303 | - if ((p_attr->id == ATTR_ID_BT_PROFILE_DESC_LIST) && | |
304 | - (p_attr->len >= SDP_PROFILE_DESC_LENGTH)) | |
305 | - { | |
306 | - /* As per current DB implementation UUID is condidered as 16 bit */ | |
307 | - if (((p_attr->value_ptr[3] << 8) | (p_attr->value_ptr[4])) == | |
308 | - UUID_SERVCLASS_HF_HANDSFREE) | |
309 | - { | |
310 | - is_blacklisted = is_device_present(IOT_HFP_1_7_BLACKLIST, remote_address); | |
311 | - SDP_TRACE_DEBUG("%s: HF version is 1.7 for BD addr: %x:%x:%x",\ | |
312 | - __func__, remote_address[0], remote_address[1], remote_address[2]); | |
313 | - /* For PTS we should show AG's HFP version as 1.7 */ | |
314 | - if (is_blacklisted || | |
315 | - (property_get("bt.pts.certification", value, "false") && | |
316 | - strcmp(value, "true") == 0)) | |
317 | - { | |
318 | - p_attr->value_ptr[PROFILE_VERSION_POSITION] = 0x07; // Update HFP version as 1.7 | |
319 | - SDP_TRACE_ERROR("SDP Change HFP Version = 0x%x", | |
320 | - p_attr->value_ptr[PROFILE_VERSION_POSITION]); | |
321 | - return TRUE; | |
322 | - } | |
323 | - } | |
324 | - } | |
325 | - return FALSE; | |
326 | -} | |
327 | - | |
328 | -/************************************************************************************* | |
329 | -** | |
330 | 289 | ** Function sdp_reset_avrcp_cover_art_bit |
331 | 290 | ** |
332 | 291 | ** Description Checks if Service Class ID is AV Remote Control TG, attribute id |
@@ -358,6 +317,8 @@ BOOLEAN sdp_reset_avrcp_cover_art_bit (tSDP_ATTRIBUTE attr, tSDP_ATTRIBUTE *p_at | ||
358 | 317 | return FALSE; |
359 | 318 | } |
360 | 319 | |
320 | +======= | |
321 | +>>>>>>> parent of a872260... Dynamic HF version change based on remote hf version | |
361 | 322 | /******************************************************************************* |
362 | 323 | ** |
363 | 324 | ** Function sdp_server_handle_client_req |
@@ -592,7 +553,6 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num, | ||
592 | 553 | BOOLEAN is_cont = FALSE; |
593 | 554 | BOOLEAN is_avrcp_fallback = FALSE; |
594 | 555 | BOOLEAN is_avrcp_browse_bit_reset = FALSE; |
595 | - BOOLEAN is_hfp_fallback = FALSE; | |
596 | 556 | BOOLEAN is_avrcp_ca_bit_reset = FALSE; |
597 | 557 | UINT16 attr_len; |
598 | 558 |
@@ -692,7 +652,6 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num, | ||
692 | 652 | p_rec->attribute[1], p_attr, p_ccb->device_address); |
693 | 653 | #endif |
694 | 654 | #endif |
695 | - is_hfp_fallback = sdp_change_hfp_version (p_attr, p_ccb->device_address); | |
696 | 655 | /* Check if attribute fits. Assume 3-byte value type/length */ |
697 | 656 | rem_len = max_list_len - (INT16) (p_rsp - &p_ccb->rsp_list[0]); |
698 | 657 |
@@ -766,13 +725,6 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num, | ||
766 | 725 | |= AVRCP_BROWSE_SUPPORT_BITMASK; |
767 | 726 | is_avrcp_browse_bit_reset = FALSE; |
768 | 727 | } |
769 | - if (is_hfp_fallback) | |
770 | - { | |
771 | - SDP_TRACE_ERROR("Restore HFP version to 1.6"); | |
772 | - /* Update HFP version back to 1.6 */ | |
773 | - p_attr->value_ptr[PROFILE_VERSION_POSITION] = 0x06; | |
774 | - is_hfp_fallback = FALSE; | |
775 | - } | |
776 | 728 | if (is_avrcp_ca_bit_reset) |
777 | 729 | { |
778 | 730 | /* Restore Cover Art bit */ |
@@ -819,6 +771,10 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num, | ||
819 | 771 | |= AVRCP_CA_SUPPORT_BITMASK; |
820 | 772 | is_avrcp_ca_bit_reset = FALSE; |
821 | 773 | } |
774 | +======= | |
775 | + } | |
776 | + } | |
777 | +>>>>>>> parent of a872260... Dynamic HF version change based on remote hf version | |
822 | 778 | /* If all the attributes have been accomodated in p_rsp, |
823 | 779 | reset next_attr_index */ |
824 | 780 | if (xx == attr_seq.num_attr) |
@@ -922,7 +878,6 @@ static void process_service_search_attr_req (tCONN_CB *p_ccb, UINT16 trans_num, | ||
922 | 878 | BOOLEAN maxxed_out = FALSE, is_cont = FALSE; |
923 | 879 | BOOLEAN is_avrcp_fallback = FALSE; |
924 | 880 | BOOLEAN is_avrcp_browse_bit_reset = FALSE; |
925 | - BOOLEAN is_hfp_fallback = FALSE; | |
926 | 881 | BOOLEAN is_avrcp_ca_bit_reset = FALSE; |
927 | 882 | UINT8 *p_seq_start = NULL; |
928 | 883 | UINT16 seq_len, attr_len; |
@@ -1036,7 +991,6 @@ static void process_service_search_attr_req (tCONN_CB *p_ccb, UINT16 trans_num, | ||
1036 | 991 | p_rec->attribute[1], p_attr, p_ccb->device_address); |
1037 | 992 | #endif |
1038 | 993 | #endif |
1039 | - is_hfp_fallback = sdp_change_hfp_version (p_attr, p_ccb->device_address); | |
1040 | 994 | /* Check if attribute fits. Assume 3-byte value type/length */ |
1041 | 995 | rem_len = max_list_len - (INT16) (p_rsp - &p_ccb->rsp_list[0]); |
1042 | 996 |
@@ -1115,13 +1069,6 @@ static void process_service_search_attr_req (tCONN_CB *p_ccb, UINT16 trans_num, | ||
1115 | 1069 | |= AVRCP_BROWSE_SUPPORT_BITMASK; |
1116 | 1070 | is_avrcp_browse_bit_reset = FALSE; |
1117 | 1071 | } |
1118 | - if (is_hfp_fallback) | |
1119 | - { | |
1120 | - SDP_TRACE_ERROR("Restore HFP version to 1.6"); | |
1121 | - /* Update HFP version back to 1.6 */ | |
1122 | - p_attr->value_ptr[PROFILE_VERSION_POSITION] = 0x06; | |
1123 | - is_hfp_fallback = FALSE; | |
1124 | - } | |
1125 | 1072 | if (is_avrcp_ca_bit_reset) |
1126 | 1073 | { |
1127 | 1074 | /* Restore Cover Art bit */ |
@@ -1168,6 +1115,10 @@ static void process_service_search_attr_req (tCONN_CB *p_ccb, UINT16 trans_num, | ||
1168 | 1115 | |= AVRCP_CA_SUPPORT_BITMASK; |
1169 | 1116 | is_avrcp_ca_bit_reset = FALSE; |
1170 | 1117 | } |
1118 | +======= | |
1119 | + } | |
1120 | + } | |
1121 | +>>>>>>> parent of a872260... Dynamic HF version change based on remote hf version | |
1171 | 1122 | |
1172 | 1123 | /* Go back and put the type and length into the buffer */ |
1173 | 1124 | if (p_ccb->cont_info.last_attr_seq_desc_sent == FALSE) |
@@ -66,7 +66,6 @@ typedef enum { | ||
66 | 66 | #define IOT_DEV_CONF_FILE "/data/misc/bluedroid/iot_devlist.conf" |
67 | 67 | #define IOT_DEV_CONF_BKP_FILE "/data/misc/bluedroid/iot_devlist_bkp.conf" |
68 | 68 | #define IOT_ROLE_CHANGE_BLACKLIST "RoleChangeBlacklistAddr" |
69 | -#define IOT_HFP_1_7_BLACKLIST "Hfp1_7BlacklistAddr" | |
70 | 69 | #define COD_AUDIO_DEVICE (0x200400) |
71 | 70 | void raise_priority_a2dp(tHIGH_PRIORITY_TASK high_task); |
72 | 71 | void adjust_priority_a2dp(int start); |