Skip to content

Commit ca6d2ad

Browse files
zijun-huVudentz
authored andcommitted
Bluetooth: qca: Support HFP offload for QCA2066
For QCA2066 HFP offload, HCI_Configure_Data_Path is not required since present HCI_Enhanced_Setup_Synchronous_Connection is enough to configure non-HCI data transport path when set both Input_Data_Path and Output_Data_Path parameters as 0x01, as is implemented by this change. Signed-off-by: Zijun Hu <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 132d0fd commit ca6d2ad

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

drivers/bluetooth/hci_qca.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,6 +1815,24 @@ static void hci_coredump_qca(struct hci_dev *hdev)
18151815
kfree_skb(skb);
18161816
}
18171817

1818+
static int qca_get_data_path_id(struct hci_dev *hdev, __u8 *data_path_id)
1819+
{
1820+
/* QCA uses 1 as non-HCI data path id for HFP */
1821+
*data_path_id = 1;
1822+
return 0;
1823+
}
1824+
1825+
static int qca_configure_hfp_offload(struct hci_dev *hdev)
1826+
{
1827+
bt_dev_info(hdev, "HFP non-HCI data transport is supported");
1828+
hdev->get_data_path_id = qca_get_data_path_id;
1829+
/* Do not need to send HCI_Configure_Data_Path to configure non-HCI
1830+
* data transport path for QCA controllers, so set below field as NULL.
1831+
*/
1832+
hdev->get_codec_config_data = NULL;
1833+
return 0;
1834+
}
1835+
18181836
static int qca_setup(struct hci_uart *hu)
18191837
{
18201838
struct hci_dev *hdev = hu->hdev;
@@ -1969,6 +1987,10 @@ static int qca_setup(struct hci_uart *hu)
19691987
hu->hdev->set_bdaddr = qca_set_bdaddr_rome;
19701988
else
19711989
hu->hdev->set_bdaddr = qca_set_bdaddr;
1990+
1991+
if (soc_type == QCA_QCA2066)
1992+
qca_configure_hfp_offload(hdev);
1993+
19721994
qca->fw_version = le16_to_cpu(ver.patch_ver);
19731995
qca->controller_id = le16_to_cpu(ver.rom_ver);
19741996
hci_devcd_register(hdev, hci_coredump_qca, qca_dmp_hdr, NULL);

0 commit comments

Comments
 (0)