Added code to set sco settings.
Change-Id: I37aa572436241b06e00d1e9e75964aac747eeba5
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
[remove sco link policy part]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
__le16 conn_handle;
__s8 rssi_dbm;
} __packed;
+
+#define HCI_BCM_ENABLE_WBS_REQ 0xfc7e
+struct hci_cp_bcm_wbs_req {
+ __u8 role;
+ __le16 pkt_type;
+} __packed;
+
+#define HCI_BCM_I2C_PCM_REQ 0xfc6d
+struct hci_cp_i2c_pcm_req {
+ __u8 i2c_enable;
+ __u8 is_master;
+ __u8 pcm_rate;
+ __u8 clock_rate;
+} __packed;
+
+#define HCI_BCM_SCO_PCM_REQ 0xfc1c
+struct hci_cp_sco_pcm_req {
+ __u8 sco_routing;
+ __u8 pcm_rate;
+ __u8 frame_type;
+ __u8 sync_mode;
+ __u8 clock_mode;
+} __packed;
#endif
/* ---- HCI Events ---- */
#ifdef TIZEN_BT
bool rssi_monitored;
+ __u8 sco_role;
+ __u16 voice_setting;
#endif
struct hci_conn *link;
struct bt_codec codec;
bool hci_le_discovery_active(struct hci_dev *hdev);
void hci_le_discovery_set_state(struct hci_dev *hdev, int state);
+
+static inline struct hci_conn *hci_conn_hash_lookup_sco(struct hci_dev *hdev)
+{
+ struct hci_conn_hash *h = &hdev->conn_hash;
+ struct hci_conn *c;
+
+ rcu_read_lock();
+ list_for_each_entry_rcu(c, &h->list, list) {
+ if (c->type == SCO_LINK || c->type == ESCO_LINK) {
+ rcu_read_unlock();
+ return c;
+ }
+ }
+ rcu_read_unlock();
+
+ return NULL;
+}
#endif
int hci_disconnect(struct hci_conn *conn, __u8 reason);
} __packed;
#define MGMT_LE_SET_SCAN_PARAMS_SIZE 5
+#define MGMT_SCO_ROLE_HANDSFREE 0x00
+#define MGMT_SCO_ROLE_AUDIO_GATEWAY 0x01
+#define MGMT_OP_SET_VOICE_SETTING (TIZEN_OP_CODE_BASE + 0x10)
+struct mgmt_cp_set_voice_setting {
+ bdaddr_t bdaddr;
+ uint8_t sco_role;
+ uint16_t voice_setting;
+} __packed;
+#define MGMT_SET_VOICE_SETTING_SIZE 9
+
/* EVENTS */
/* For device name update changes */
#define SCO_CMSG_PKT_STATUS 0x01
+#ifdef TIZEN_BT
+void sco_connect_set_gw_nbc(struct hci_dev *hdev);
+void sco_connect_set_gw_wbc(struct hci_dev *hdev);
+void sco_connect_set_nbc(struct hci_dev *hdev);
+void sco_connect_set_wbc(struct hci_dev *hdev);
+#endif
+
#endif /* __SCO_H */