diff mbox series

[v9,06/10] Bluetooth: Add a callback function to set data path

Message ID 20210608122455.19583-6-kiran.k@intel.com
State New
Headers show
Series [v9,01/10] Bluetooth: enumerate local supported codec and cache details | expand

Commit Message

K, Kiran June 8, 2021, 12:24 p.m. UTC
In HFP offload usecase, Intel controllers require offload use
case id (NBS or WBS) to be set before opening SCO connection. Define
a new callback which gets called on setsockopt SCO socket. User space
audio module is expected to set codec via setsockopt(sk, BT_CODEC, ....)
before opening SCO connection.

Signed-off-by: Kiran K <kiran.k@intel.com>
Reviewed-by: Chethan T N <chethan.tumkur.narayan@intel.com>
Reviewed-by: Srivatsa Ravishankar <ravishankar.srivatsa@intel.com>
---
 include/net/bluetooth/hci_core.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Marcel Holtmann June 15, 2021, 7:37 p.m. UTC | #1
Hi Kiran,

> In HFP offload usecase, Intel controllers require offload use

> case id (NBS or WBS) to be set before opening SCO connection. Define

> a new callback which gets called on setsockopt SCO socket. User space

> audio module is expected to set codec via setsockopt(sk, BT_CODEC, ....)

> before opening SCO connection.

> 

> Signed-off-by: Kiran K <kiran.k@intel.com>

> Reviewed-by: Chethan T N <chethan.tumkur.narayan@intel.com>

> Reviewed-by: Srivatsa Ravishankar <ravishankar.srivatsa@intel.com>

> ---

> include/net/bluetooth/hci_core.h | 2 ++

> 1 file changed, 2 insertions(+)

> 

> diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h

> index 641477396da3..ad0024891447 100644

> --- a/include/net/bluetooth/hci_core.h

> +++ b/include/net/bluetooth/hci_core.h

> @@ -618,6 +618,8 @@ struct hci_dev {

> 	void (*cmd_timeout)(struct hci_dev *hdev);

> 	bool (*prevent_wake)(struct hci_dev *hdev);

> 	int (*get_data_path)(struct hci_dev *hdev);

> +	int (*set_data_path)(struct hci_dev *hdev, __u8 type,

> +			     struct bt_codec *codec);

> };

> 


same as the other one, this needs to also provide the user of hdev->set_data_path.

Regards

Marcel
diff mbox series

Patch

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 641477396da3..ad0024891447 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -618,6 +618,8 @@  struct hci_dev {
 	void (*cmd_timeout)(struct hci_dev *hdev);
 	bool (*prevent_wake)(struct hci_dev *hdev);
 	int (*get_data_path)(struct hci_dev *hdev);
+	int (*set_data_path)(struct hci_dev *hdev, __u8 type,
+			     struct bt_codec *codec);
 };
 
 #define HCI_PHY_HANDLE(handle)	(handle & 0xff)