mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
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 <quic_zijuhu@quicinc.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
132d0fd0b8
commit
ca6d2adf8d
@ -1815,6 +1815,24 @@ static void hci_coredump_qca(struct hci_dev *hdev)
|
|||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int qca_get_data_path_id(struct hci_dev *hdev, __u8 *data_path_id)
|
||||||
|
{
|
||||||
|
/* QCA uses 1 as non-HCI data path id for HFP */
|
||||||
|
*data_path_id = 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int qca_configure_hfp_offload(struct hci_dev *hdev)
|
||||||
|
{
|
||||||
|
bt_dev_info(hdev, "HFP non-HCI data transport is supported");
|
||||||
|
hdev->get_data_path_id = qca_get_data_path_id;
|
||||||
|
/* Do not need to send HCI_Configure_Data_Path to configure non-HCI
|
||||||
|
* data transport path for QCA controllers, so set below field as NULL.
|
||||||
|
*/
|
||||||
|
hdev->get_codec_config_data = NULL;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int qca_setup(struct hci_uart *hu)
|
static int qca_setup(struct hci_uart *hu)
|
||||||
{
|
{
|
||||||
struct hci_dev *hdev = hu->hdev;
|
struct hci_dev *hdev = hu->hdev;
|
||||||
@ -1969,6 +1987,10 @@ out:
|
|||||||
hu->hdev->set_bdaddr = qca_set_bdaddr_rome;
|
hu->hdev->set_bdaddr = qca_set_bdaddr_rome;
|
||||||
else
|
else
|
||||||
hu->hdev->set_bdaddr = qca_set_bdaddr;
|
hu->hdev->set_bdaddr = qca_set_bdaddr;
|
||||||
|
|
||||||
|
if (soc_type == QCA_QCA2066)
|
||||||
|
qca_configure_hfp_offload(hdev);
|
||||||
|
|
||||||
qca->fw_version = le16_to_cpu(ver.patch_ver);
|
qca->fw_version = le16_to_cpu(ver.patch_ver);
|
||||||
qca->controller_id = le16_to_cpu(ver.rom_ver);
|
qca->controller_id = le16_to_cpu(ver.rom_ver);
|
||||||
hci_devcd_register(hdev, hci_coredump_qca, qca_dmp_hdr, NULL);
|
hci_devcd_register(hdev, hci_coredump_qca, qca_dmp_hdr, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user