From ad70ab8957b33e137f160ba8b5e4cd9a8b98e23e Mon Sep 17 00:00:00 2001 From: baohongde Date: Mon, 2 Sep 2019 20:50:09 +0800 Subject: [PATCH] components/bt: Disable Wide Bond Speech when SCO data path is PCM --- components/bt/host/bluedroid/Kconfig.in | 8 ++++++++ .../bt/host/bluedroid/bta/hf_client/bta_hf_client_main.c | 4 ++++ .../common/include/common/bluedroid_user_config.h | 6 ++++++ .../bt/host/bluedroid/common/include/common/bt_target.h | 2 +- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/components/bt/host/bluedroid/Kconfig.in b/components/bt/host/bluedroid/Kconfig.in index 21b3fc985a..6e225b9ec2 100644 --- a/components/bt/host/bluedroid/Kconfig.in +++ b/components/bt/host/bluedroid/Kconfig.in @@ -98,6 +98,14 @@ choice BT_HFP_AUDIO_DATA_PATH bool "HCI" endchoice +config BT_HFP_WBS_ENABLE + bool "Wide Band Speech" + depends on BT_HFP_AUDIO_DATA_PATH_HCI + default y + help + This enables Wide Band Speech. Should disable it when SCO data path is PCM. + Otherwise there will be no data transmited via GPIOs. + config BT_SSP_ENABLED bool "Secure Simple Pairing" depends on BT_CLASSIC_ENABLED diff --git a/components/bt/host/bluedroid/bta/hf_client/bta_hf_client_main.c b/components/bt/host/bluedroid/bta/hf_client/bta_hf_client_main.c index dcaf665dbc..8eb44a9d65 100644 --- a/components/bt/host/bluedroid/bta/hf_client/bta_hf_client_main.c +++ b/components/bt/host/bluedroid/bta/hf_client/bta_hf_client_main.c @@ -232,7 +232,11 @@ const tBTA_HF_CLIENT_ST_TBL bta_hf_client_st_tbl[] = { bta_hf_client_st_closing }; +#if BTM_WBS_INCLUDED const char *bta_hf_client_version = "1.6"; +#else +const char *bta_hf_client_version = "1.5"; +#endif /* HF Client control block */ #if BTA_DYNAMIC_MEMORY == FALSE diff --git a/components/bt/host/bluedroid/common/include/common/bluedroid_user_config.h b/components/bt/host/bluedroid/common/include/common/bluedroid_user_config.h index b107a01e15..0fcb7d9ff8 100644 --- a/components/bt/host/bluedroid/common/include/common/bluedroid_user_config.h +++ b/components/bt/host/bluedroid/common/include/common/bluedroid_user_config.h @@ -176,6 +176,12 @@ #define UC_BT_HFP_AUDIO_DATA_PATH_HCI FALSE #endif +//Wide Band Speech +#ifdef CONFIG_BT_HFP_WBS_ENABLE +#define UC_BT_HFP_WBS_ENABLE CONFIG_BT_HFP_WBS_ENABLE +#else +#define UC_BT_HFP_WBS_ENABLE FALSE +#endif /********************************************************** * Memory reference diff --git a/components/bt/host/bluedroid/common/include/common/bt_target.h b/components/bt/host/bluedroid/common/include/common/bt_target.h index 146a1ad110..6801d6ebe0 100644 --- a/components/bt/host/bluedroid/common/include/common/bt_target.h +++ b/components/bt/host/bluedroid/common/include/common/bt_target.h @@ -592,7 +592,7 @@ /* Includes WBS if TRUE */ #ifndef BTM_WBS_INCLUDED -#define BTM_WBS_INCLUDED FALSE /* TRUE includes WBS code */ +#define BTM_WBS_INCLUDED UC_BT_HFP_WBS_ENABLE /* TRUE includes WBS code */ #endif /* This is used to work around a controller bug that doesn't like Disconnect