@@ -127,6 +127,12 @@ struct msft_rp_avdtp_open {
__u8 audio_intf_param_cnt;
} __packed;
+#define MSFT_OP_AVDTP_START 0x09
+struct msft_cp_avdtp_start {
+ u8 sub_opcode;
+ __le16 avdtp_handle;
+} __packed;
+
static int __msft_add_monitor_pattern(struct hci_dev *hdev,
struct adv_monitor *monitor);
static int __msft_remove_monitor(struct hci_dev *hdev,
@@ -884,6 +890,19 @@ static int msft_avdtp_open(struct hci_dev *hdev,
return err;
}
+static int msft_avdtp_start(struct hci_dev *hdev, struct sock *sk)
+{
+ struct msft_cp_avdtp_start cmd;
+
+ if (!bt_sk(sk)->avdtp_handle)
+ return -EBADFD;
+
+ cmd.sub_opcode = MSFT_OP_AVDTP_START;
+ cmd.avdtp_handle = cpu_to_le16(bt_sk(sk)->avdtp_handle);
+
+ return hci_send_cmd(hdev, MSFT_OP_AVDTP, sizeof(cmd), &cmd);
+}
+
int msft_avdtp_cmd(struct hci_dev *hdev, struct l2cap_chan *chan,
sockptr_t optval, int optlen,
struct sock *sk)
@@ -918,6 +937,10 @@ int msft_avdtp_cmd(struct hci_dev *hdev, struct l2cap_chan *chan,
err = msft_avdtp_open(hdev, chan, cmd, sk);
break;
+ case MSFT_OP_AVDTP_START:
+ err = msft_avdtp_start(hdev, sk);
+ break;
+
default:
err = -EINVAL;
bt_dev_err(hdev, "Invalid MSFT avdtp sub opcode = 0x%2.2x",
@@ -975,6 +998,9 @@ void msft_cc_avdtp(struct hci_dev *hdev, struct sk_buff *skb)
msft_cc_avdtp_open(hdev, skb);
break;
+ case MSFT_OP_AVDTP_START:
+ break;
+
default:
bt_dev_err(hdev, "Invalid MSFT sub opcode 0x%2.2x",
skb->data[1]);