diff --git a/components/bt/Kconfig b/components/bt/Kconfig index 358451324d..b8a52aa1ac 100644 --- a/components/bt/Kconfig +++ b/components/bt/Kconfig @@ -79,6 +79,47 @@ menu "Bluetooth" default 1 if BTDM_CTRL_BR_EDR_SCO_DATA_PATH_PCM default 0 + menuconfig BTDM_CTRL_PCM_ROLE_EDGE_CONFIG + bool "PCM Signal Config (Role and Polar)" + depends on BTDM_CTRL_BR_EDR_SCO_DATA_PATH_PCM + default y + + choice BTDM_CTRL_PCM_ROLE + prompt "PCM Role" + depends on BTDM_CTRL_PCM_ROLE_EDGE_CONFIG + help + PCM role can be configured as PCM master or PCM slave + + config BTDM_CTRL_PCM_ROLE_MASTER + bool "PCM Master" + config BTDM_CTRL_PCM_ROLE_SLAVE + bool "PCM Slave" + endchoice + + choice BTDM_CTRL_PCM_POLAR + prompt "PCM Polar" + depends on BTDM_CTRL_PCM_ROLE_EDGE_CONFIG + help + PCM polarity can be configured as Falling Edge or Rising Edge + + config BTDM_CTRL_PCM_POLAR_FALLING_EDGE + bool "Falling Edge" + config BTDM_CTRL_PCM_POLAR_RISING_EDGE + bool "Rising Edge" + endchoice + + config BTDM_CTRL_PCM_ROLE_EFF + int + default 0 if BTDM_CTRL_PCM_ROLE_MASTER + default 1 if BTDM_CTRL_PCM_ROLE_SLAVE + default 0 + + config BTDM_CTRL_PCM_POLAR_EFF + int + default 0 if BTDM_CTRL_PCM_POLAR_FALLING_EDGE + default 1 if BTDM_CTRL_PCM_POLAR_RISING_EDGE + default 0 + config BTDM_CTRL_AUTO_LATENCY bool "Auto latency" depends on BTDM_CTRL_MODE_BTDM diff --git a/components/bt/controller/lib b/components/bt/controller/lib index 6b694f06c8..3e21b1b7ae 160000 --- a/components/bt/controller/lib +++ b/components/bt/controller/lib @@ -1 +1 @@ -Subproject commit 6b694f06c8df6215e0f158267447c61f487a6596 +Subproject commit 3e21b1b7ae27480e3d6891a3bec206de8a6ec65a diff --git a/components/bt/include/esp_bt.h b/components/bt/include/esp_bt.h index 9d034272bd..de8b04239f 100644 --- a/components/bt/include/esp_bt.h +++ b/components/bt/include/esp_bt.h @@ -25,7 +25,7 @@ extern "C" { #endif -#define ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL 0x20200611 +#define ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL 0x20200622 /** * @brief Bluetooth mode for controller enable/disable @@ -149,6 +149,8 @@ the adv packet will be discarded until the memory is restored. */ .bt_legacy_auth_vs_evt = BTDM_CTRL_LEGACY_AUTH_VENDOR_EVT_EFF, \ .bt_max_sync_conn = CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF, \ .ble_sca = CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF, \ + .pcm_role = CONFIG_BTDM_CTRL_PCM_ROLE_EFF, \ + .pcm_polar = CONFIG_BTDM_CTRL_PCM_POLAR_EFF, \ .magic = ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL, \ }; @@ -188,6 +190,8 @@ typedef struct { */ uint8_t bt_max_sync_conn; /*!< BR/EDR maximum ACL connection numbers. Effective in menuconfig */ uint8_t ble_sca; /*!< BLE low power crystal accuracy index */ + uint8_t pcm_role; /*!< PCM role (master & slave)*/ + uint8_t pcm_polar; /*!< PCM polar trig (falling clk edge & rising clk edge) */ uint32_t magic; /*!< Magic number */ } esp_bt_controller_config_t;