• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

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"

  • Taking upstream impl.

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

変更サマリ

差分

--- a/bta/ag/bta_ag_act.c
+++ b/bta/ag/bta_ag_act.c
@@ -453,7 +453,6 @@ void bta_ag_rfc_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
453453 p_scb->post_sco = BTA_AG_POST_SCO_NONE;
454454 p_scb->svc_conn = FALSE;
455455 p_scb->hsp_version = HSP_VERSION_1_2;
456- p_scb->slc_pend_open = FALSE;
457456 bta_ag_at_reinit(&p_scb->at_cb);
458457
459458 /* stop timers */
--- a/bta/ag/bta_ag_cmd.c
+++ b/bta/ag/bta_ag_cmd.c
@@ -24,7 +24,6 @@
2424 #include <ctype.h>
2525 #include <stdio.h>
2626 #include <string.h>
27-#include <stdlib.h>
2827
2928 #include "bt_target.h"
3029 #include "bt_types.h"
@@ -36,7 +35,6 @@
3635 #include "bt_common.h"
3736 #include "port_api.h"
3837 #include "utl.h"
39-#include <cutils/properties.h>
4038
4139
4240 /*****************************************************************************
@@ -113,9 +111,7 @@ enum
113111 BTA_AG_HF_CMD_CBC,
114112 BTA_AG_HF_CMD_BCC,
115113 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
119115 };
120116
121117 /* AT command interpreter table for HSP */
@@ -157,8 +153,6 @@ const tBTA_AG_AT_CMD bta_ag_hfp_cmd[] =
157153 {"+BCC", BTA_AG_AT_NONE, BTA_AG_AT_STR, 0, 0},
158154 {"+BCS", BTA_AG_AT_SET, BTA_AG_AT_INT, 0, BTA_AG_CMD_MAX_VAL},
159155 {"+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},
162156 {"", BTA_AG_AT_NONE, BTA_AG_AT_STR, 0, 0}
163157 };
164158
@@ -200,8 +194,7 @@ enum
200194 BTA_AG_RES_COPS,
201195 BTA_AG_RES_CMEE,
202196 BTA_AG_RES_BCS,
203- BTA_AG_RES_UNAT,
204- BTA_AG_RES_BIND
197+ BTA_AG_RES_UNAT
205198 };
206199
207200 #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[] =
230223 {"+COPS: ", BTA_AG_RES_FMT_STR},
231224 {"+CME ERROR: ", BTA_AG_RES_FMT_INT},
232225 {"+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}
235227 };
236228
237229 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[] =
276268 BTA_AG_AT_CBC_EVT, /* BTA_AG_HF_CMD_CBC */
277269 0, /* BTA_AG_HF_CMD_BCC */
278270 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 */
282272 };
283273
284274 /* translation of API result code values to internal values */
@@ -304,9 +294,7 @@ const UINT8 bta_ag_trans_result[] =
304294 0, /* BTA_AG_CALL_CANCEL_RES */
305295 0, /* BTA_AG_END_CALL_RES */
306296 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 */
310298 };
311299
312300 /* callsetup indicator value lookup table */
@@ -331,10 +319,7 @@ const UINT8 bta_ag_callsetup_ind_tbl[] =
331319 BTA_AG_CALLSETUP_NONE, /* BTA_AG_OUT_CALL_CONN_RES */
332320 BTA_AG_CALLSETUP_NONE, /* BTA_AG_CALL_CANCEL_RES */
333321 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 */
338323 };
339324
340325 /*******************************************************************************
@@ -677,68 +662,6 @@ static UINT8 bta_ag_parse_chld(tBTA_AG_SCB *p_scb, char *p_s)
677662 return (retval);
678663 }
679664
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-
742665 #if (BTM_WBS_INCLUDED == TRUE )
743666 /*******************************************************************************
744667 **
@@ -792,61 +715,6 @@ static tBTA_AG_PEER_CODEC bta_ag_parse_bac(tBTA_AG_SCB *p_scb, char *p_s)
792715
793716 /*******************************************************************************
794717 **
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-**
850718 ** Function bta_ag_process_unat_res
851719 **
852720 ** 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,
1006874 tBTA_AG_SCB *ag_scb;
1007875 UINT32 i, ind_id;
1008876 UINT32 bia_masked_out;
1009- tBTA_AG_FEAT features;
1010- char value[PROPERTY_VALUE_MAX];
1011877 #if (BTM_WBS_INCLUDED == TRUE )
1012878 tBTA_AG_PEER_CODEC codec_type, codec_sent;
1013879 #endif
@@ -1106,15 +972,8 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
1106972 /* send OK */
1107973 bta_ag_send_ok(p_scb);
1108974
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);
1118977
1119978 }
1120979 else
@@ -1184,13 +1043,10 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
11841043 bta_ag_send_ok(p_scb);
11851044
11861045 /* 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
11881047 */
11891048 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)))
11941050 {
11951051 bta_ag_svc_conn_open(p_scb, NULL);
11961052 }
@@ -1235,29 +1091,7 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
12351091 case BTA_AG_HF_CMD_BRSF:
12361092 /* store peer features */
12371093 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+
12611095 /* send BRSF, send OK */
12621096 bta_ag_send_result(p_scb, BTA_AG_RES_BRSF, NULL,
12631097 (INT16) features);
@@ -1446,60 +1280,7 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB *p_scb, UINT16 cmd, UINT8 arg_type,
14461280 bta_ag_sco_open(p_scb, NULL);
14471281 break;
14481282 #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+
15031284 default:
15041285 bta_ag_send_error(p_scb, BTA_AG_ERR_OP_NOT_SUPPORTED);
15051286 break;
@@ -1888,13 +1669,6 @@ void bta_ag_hfp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
18881669
18891670 if (p_result->data.ok_flag == BTA_AG_OK_DONE)
18901671 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- }
18981672 }
18991673 else
19001674 {
@@ -1937,10 +1711,6 @@ void bta_ag_hfp_result(tBTA_AG_SCB *p_scb, tBTA_AG_API_RESULT *p_result)
19371711 }
19381712 break;
19391713
1940- case BTA_AG_BIND_RES:
1941- bta_ag_send_result(p_scb, code, p_result->data.str, 0);
1942- break;
1943-
19441714 default:
19451715 break;
19461716 }
@@ -2022,8 +1792,7 @@ void bta_ag_send_ring(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
20221792 {
20231793 UNUSED(p_data);
20241794
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)
20271796 {
20281797 APPL_TRACE_DEBUG("don't send the ring since there is no MT call setup");
20291798 return;
--- a/bta/ag/bta_ag_int.h
+++ b/bta/ag/bta_ag_int.h
@@ -45,8 +45,6 @@
4545 #define HFP_VERSION_1_1 0x0101
4646 #define HFP_VERSION_1_5 0x0105
4747 #define HFP_VERSION_1_6 0x0106
48-#define HFP_VERSION_1_7 0x0107
49-
5048
5149 #define HSP_VERSION_1_0 0x0100
5250 #define HSP_VERSION_1_2 0x0102
@@ -79,7 +77,6 @@
7977 BTA_AG_FEAT_VTAG | BTA_AG_FEAT_REJECT | \
8078 BTA_AG_FEAT_ECS | BTA_AG_FEAT_ECC | \
8179 BTA_AG_FEAT_EXTERR | BTA_AG_FEAT_CODEC | \
82- BTA_AG_FEAT_HFIND| BTA_AG_FEAT_S4| \
8380 BTA_AG_FEAT_VOIP)
8481
8582 #define BTA_AG_SDP_FEAT_SPEC (BTA_AG_FEAT_3WAY | BTA_AG_FEAT_ECNR | \
@@ -300,7 +297,7 @@ typedef struct
300297 BOOLEAN codec_fallback; /* If sco nego fails for mSBC, fallback to CVSD */
301298 tBTA_AG_SCO_MSBC_SETTINGS codec_msbc_settings; /* settings to be used for the impending eSCO */
302299 #endif
303- BOOLEAN slc_pend_open; /* SLC is pending open */
300+
304301 } tBTA_AG_SCB;
305302
306303 /* type for sco data */
--- a/bta/ag/bta_ag_main.c
+++ b/bta/ag/bta_ag_main.c
@@ -962,7 +962,6 @@ static char *bta_ag_evt_str(UINT16 event, tBTA_AG_RES result)
962962 case BTA_AG_CALL_CANCEL_RES: return ("AT Result BTA_AG_CALL_CANCEL_RES");
963963 case BTA_AG_END_CALL_RES: return ("AT Result BTA_AG_END_CALL_RES");
964964 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");
966965 default: return ("Unknown AG Result");
967966 }
968967 case BTA_AG_API_SETCODEC_EVT:
--- a/bta/ag/bta_ag_sco.c
+++ b/bta/ag/bta_ag_sco.c
@@ -73,31 +73,14 @@ enum
7373 };
7474
7575 #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 */
8180
8281 static const tBTM_ESCO_PARAMS bta_ag_esco_params[BTA_AG_NUM_CODECS] =
8382 {
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 */
10184 {
10285 BTM_64KBITS_RATE, /* TX Bandwidth (64 kbits/sec) */
10386 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] =
141124 };
142125 #else
143126 /* 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 =
145128 {
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 */
178142 };
179143 #endif
180144
@@ -484,9 +448,9 @@ static void bta_ag_create_sco(tBTA_AG_SCB *p_scb, BOOLEAN is_orig)
484448 tBTM_STATUS status;
485449 UINT8 *p_bd_addr = NULL;
486450 tBTM_ESCO_PARAMS params;
487- int codec_index = (p_scb->peer_features & BTA_AG_PEER_FEAT_S4) ? 0 : 1;
488451 #if (BTM_WBS_INCLUDED == TRUE )
489452 tBTA_AG_PEER_CODEC esco_codec = BTM_SCO_CODEC_CVSD;
453+ int codec_index = 0;
490454 #endif
491455 #if (BTM_SCO_HCI_INCLUDED == TRUE )
492456 tBTM_SCO_ROUTE_TYPE sco_route;
@@ -533,7 +497,7 @@ static void bta_ag_create_sco(tBTA_AG_SCB *p_scb, BOOLEAN is_orig)
533497 params = bta_ag_esco_params[codec_index];
534498 #else
535499 /* When WBS is not included, use CVSD by default */
536- params = bta_ag_esco_params[codec_index];
500+ params = bta_ag_esco_params;
537501 #endif
538502
539503 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
16671631 {
16681632 resp.rx_bw = BTM_64KBITS_RATE;
16691633 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;
16821635 resp.voice_contfmt = 0x60;
1636+ resp.retrans_effort = BTM_ESCO_RETRANS_POWER;
16831637
16841638 if (p_data->link_type == BTM_LINK_TYPE_SCO)
16851639 {
--- a/bta/ag/bta_ag_sdp.c
+++ b/bta/ag/bta_ag_sdp.c
@@ -23,9 +23,6 @@
2323 *
2424 ******************************************************************************/
2525
26-#include <stdio.h>
27-#include <stdlib.h>
28-#include <errno.h>
2926 #include <string.h>
3027 #include "bta_api.h"
3128 #include "bta_sys.h"
@@ -35,7 +32,6 @@
3532 #include "btm_api.h"
3633 #include "bt_common.h"
3734 #include "utl.h"
38-#include "bt_utils.h"
3935
4036 /* Number of protocol elements in protocol element list. */
4137 #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)
394390 p_scb->peer_features = p_attr->attr_value.v.u16;
395391 #endif
396392 }
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- }
411393 }
412394 else /* HSP */
413395 {
--- a/bta/include/bta_ag_api.h
+++ b/bta/include/bta_ag_api.h
@@ -42,9 +42,7 @@
4242 #define BTA_AG_FEAT_ECC 0x00000080 /* Enhanced Call Control */
4343 #define BTA_AG_FEAT_EXTERR 0x00000100 /* Extended error codes */
4444 #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 */
4846 /* Proprietary features: using 31 ~ 16 bits */
4947 #define BTA_AG_FEAT_BTRH 0x00010000 /* CCAP incoming call hold */
5048 #define BTA_AG_FEAT_UNAT 0x00020000 /* Pass unknown AT commands to application */
@@ -100,8 +98,6 @@ typedef UINT8 tBTA_AG_STATUS;
10098 #define BTA_AG_IN_CALL_HELD_RES 19 /* Incoming call held */
10199 #define BTA_AG_UNAT_RES 20 /* Response to unknown AT command event */
102100 #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-
105101
106102 typedef UINT8 tBTA_AG_RES;
107103
@@ -114,9 +110,7 @@ typedef UINT8 tBTA_AG_RES;
114110 #define BTA_AG_PEER_FEAT_ECS 0x0020 /* Enhanced Call Status */
115111 #define BTA_AG_PEER_FEAT_ECC 0x0040 /* Enhanced Call Control */
116112 #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 */
120114
121115 typedef UINT16 tBTA_AG_PEER_FEAT;
122116
@@ -128,10 +122,6 @@ typedef UINT16 tBTA_AG_PEER_FEAT;
128122 #define BTA_AG_CODEC_MSBC BTM_SCO_CODEC_MSBC /* mSBC */
129123 typedef UINT16 tBTA_AG_PEER_CODEC;
130124
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-
135125 /* HFP errcode - Set when BTA_AG_OK_ERROR is returned in 'ok_flag' */
136126 #define BTA_AG_ERR_PHONE_FAILURE 0 /* Phone Failure */
137127 #define BTA_AG_ERR_NO_CONN_PHONE 1 /* No connection to phone */
@@ -211,13 +201,6 @@ typedef UINT16 tBTA_AG_PEER_CODEC;
211201 #define BTA_AG_AT_MAX_LEN 256
212202 #endif
213203
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-
221204 /* data associated with BTA_AG_IND_RES */
222205 typedef struct
223206 {
@@ -271,10 +254,6 @@ typedef struct
271254 #define BTA_AG_AT_CBC_EVT 25 /* Battery Level report from HF */
272255 #define BTA_AG_AT_BAC_EVT 26 /* avablable codec */
273256 #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-
278257
279258 typedef UINT8 tBTA_AG_EVT;
280259
--- a/bta/include/utl.h
+++ b/bta/include/utl.h
@@ -75,20 +75,6 @@ extern INT16 utl_str2int(const char *p_s);
7575
7676 /*******************************************************************************
7777 **
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-**
9278 ** Function utl_strucmp
9379 **
9480 ** Description This utility function compares two strings in uppercase.
--- a/bta/sys/utl.c
+++ b/bta/sys/utl.c
@@ -68,46 +68,6 @@ INT16 utl_str2int(const char *p_s)
6868
6969 /*******************************************************************************
7070 **
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-**
11171 ** Function utl_strucmp
11272 **
11373 ** Description This utility function compares two strings in uppercase.
--- a/btif/src/btif_hf.c
+++ b/btif/src/btif_hf.c
@@ -73,8 +73,6 @@
7373 BTA_AG_FEAT_EXTERR | \
7474 BTA_AG_FEAT_BTRH | \
7575 BTA_AG_FEAT_VREC | \
76- BTA_AG_FEAT_HFIND | \
77- BTA_AG_FEAT_S4 | \
7876 BTA_AG_FEAT_UNAT)
7977 #endif
8078
@@ -717,27 +715,6 @@ static void btif_hf_upstreams_evt(UINT16 event, char* p_param)
717715 BTHF_WBS_YES : BTHF_WBS_NO, &btif_hf_cb[idx].connected_bda);
718716 break;
719717
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;
741718 default:
742719 BTIF_TRACE_WARNING("%s: Unhandled event: %d", __FUNCTION__, event);
743720 break;
@@ -1707,88 +1684,6 @@ static bt_status_t configure_wbs( bt_bdaddr_t *bd_addr , bthf_wbs_config_t conf
17071684 return BT_STATUS_SUCCESS;
17081685 }
17091686
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-
17921687 static void set_voip_network_type_wifi_hci_cmd_complete(tBTM_VSC_CMPL* p_data)
17931688 {
17941689 UINT8 *stream, status, subcmd;
@@ -1871,8 +1766,6 @@ static const bthf_interface_t bthfInterface = {
18711766 phone_state_change,
18721767 cleanup,
18731768 configure_wbs,
1874- bind_response,
1875- bind_string_response,
18761769 voip_network_type_wifi,
18771770 };
18781771
--- a/btif/src/btif_util.c
+++ b/btif/src/btif_util.c
@@ -307,8 +307,6 @@ const char* dump_hf_event(UINT16 event)
307307 CASE_RETURN_STR(BTA_AG_AT_CBC_EVT)
308308 CASE_RETURN_STR(BTA_AG_AT_BAC_EVT)
309309 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)
312310
313311 default:
314312 return "UNKNOWN MSG ID";
--- a/stack/sdp/sdp_server.c
+++ b/stack/sdp/sdp_server.c
@@ -51,7 +51,6 @@ extern fixed_queue_t *btu_general_alarm_queue;
5151 #define SDP_MAX_SERVICE_RSPHDR_LEN 12
5252 #define SDP_MAX_SERVATTR_RSPHDR_LEN 10
5353 #define SDP_MAX_ATTR_RSPHDR_LEN 10
54-#define PROFILE_VERSION_POSITION 7
5554 #define SDP_PROFILE_DESC_LENGTH 8
5655 #define AVRCP_SUPPORTED_FEATURES_POSITION 1
5756 #define AVRCP_BROWSE_SUPPORT_BITMASK 0x40
@@ -287,46 +286,6 @@ BD_ADDR rem
287286
288287 /*************************************************************************************
289288 **
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-**
330289 ** Function sdp_reset_avrcp_cover_art_bit
331290 **
332291 ** 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
358317 return FALSE;
359318 }
360319
320+=======
321+>>>>>>> parent of a872260... Dynamic HF version change based on remote hf version
361322 /*******************************************************************************
362323 **
363324 ** Function sdp_server_handle_client_req
@@ -592,7 +553,6 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
592553 BOOLEAN is_cont = FALSE;
593554 BOOLEAN is_avrcp_fallback = FALSE;
594555 BOOLEAN is_avrcp_browse_bit_reset = FALSE;
595- BOOLEAN is_hfp_fallback = FALSE;
596556 BOOLEAN is_avrcp_ca_bit_reset = FALSE;
597557 UINT16 attr_len;
598558
@@ -692,7 +652,6 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
692652 p_rec->attribute[1], p_attr, p_ccb->device_address);
693653 #endif
694654 #endif
695- is_hfp_fallback = sdp_change_hfp_version (p_attr, p_ccb->device_address);
696655 /* Check if attribute fits. Assume 3-byte value type/length */
697656 rem_len = max_list_len - (INT16) (p_rsp - &p_ccb->rsp_list[0]);
698657
@@ -766,13 +725,6 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
766725 |= AVRCP_BROWSE_SUPPORT_BITMASK;
767726 is_avrcp_browse_bit_reset = FALSE;
768727 }
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- }
776728 if (is_avrcp_ca_bit_reset)
777729 {
778730 /* Restore Cover Art bit */
@@ -819,6 +771,10 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
819771 |= AVRCP_CA_SUPPORT_BITMASK;
820772 is_avrcp_ca_bit_reset = FALSE;
821773 }
774+=======
775+ }
776+ }
777+>>>>>>> parent of a872260... Dynamic HF version change based on remote hf version
822778 /* If all the attributes have been accomodated in p_rsp,
823779 reset next_attr_index */
824780 if (xx == attr_seq.num_attr)
@@ -922,7 +878,6 @@ static void process_service_search_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
922878 BOOLEAN maxxed_out = FALSE, is_cont = FALSE;
923879 BOOLEAN is_avrcp_fallback = FALSE;
924880 BOOLEAN is_avrcp_browse_bit_reset = FALSE;
925- BOOLEAN is_hfp_fallback = FALSE;
926881 BOOLEAN is_avrcp_ca_bit_reset = FALSE;
927882 UINT8 *p_seq_start = NULL;
928883 UINT16 seq_len, attr_len;
@@ -1036,7 +991,6 @@ static void process_service_search_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
1036991 p_rec->attribute[1], p_attr, p_ccb->device_address);
1037992 #endif
1038993 #endif
1039- is_hfp_fallback = sdp_change_hfp_version (p_attr, p_ccb->device_address);
1040994 /* Check if attribute fits. Assume 3-byte value type/length */
1041995 rem_len = max_list_len - (INT16) (p_rsp - &p_ccb->rsp_list[0]);
1042996
@@ -1115,13 +1069,6 @@ static void process_service_search_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
11151069 |= AVRCP_BROWSE_SUPPORT_BITMASK;
11161070 is_avrcp_browse_bit_reset = FALSE;
11171071 }
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- }
11251072 if (is_avrcp_ca_bit_reset)
11261073 {
11271074 /* Restore Cover Art bit */
@@ -1168,6 +1115,10 @@ static void process_service_search_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
11681115 |= AVRCP_CA_SUPPORT_BITMASK;
11691116 is_avrcp_ca_bit_reset = FALSE;
11701117 }
1118+=======
1119+ }
1120+ }
1121+>>>>>>> parent of a872260... Dynamic HF version change based on remote hf version
11711122
11721123 /* Go back and put the type and length into the buffer */
11731124 if (p_ccb->cont_info.last_attr_seq_desc_sent == FALSE)
--- a/utils/include/bt_utils.h
+++ b/utils/include/bt_utils.h
@@ -66,7 +66,6 @@ typedef enum {
6666 #define IOT_DEV_CONF_FILE "/data/misc/bluedroid/iot_devlist.conf"
6767 #define IOT_DEV_CONF_BKP_FILE "/data/misc/bluedroid/iot_devlist_bkp.conf"
6868 #define IOT_ROLE_CHANGE_BLACKLIST "RoleChangeBlacklistAddr"
69-#define IOT_HFP_1_7_BLACKLIST "Hfp1_7BlacklistAddr"
7069 #define COD_AUDIO_DEVICE (0x200400)
7170 void raise_priority_a2dp(tHIGH_PRIORITY_TASK high_task);
7271 void adjust_priority_a2dp(int start);