[Bluetooth] Add support for handling simple eSCO links
With the Bluetooth 1.2 specification the Extended SCO feature for better audio connections was introduced. So far the Bluetooth core wasn't able to handle any eSCO connections correctly. This patch adds simple eSCO support while keeping backward compatibility with older devices. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
committed by
David S. Miller
parent
dae6a0f663
commit
b6a0dc8224
@ -1361,6 +1361,26 @@ static inline void hci_sched_sco(struct hci_dev *hdev)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void hci_sched_esco(struct hci_dev *hdev)
|
||||
{
|
||||
struct hci_conn *conn;
|
||||
struct sk_buff *skb;
|
||||
int quote;
|
||||
|
||||
BT_DBG("%s", hdev->name);
|
||||
|
||||
while (hdev->sco_cnt && (conn = hci_low_sent(hdev, ESCO_LINK, "e))) {
|
||||
while (quote-- && (skb = skb_dequeue(&conn->data_q))) {
|
||||
BT_DBG("skb %p len %d", skb, skb->len);
|
||||
hci_send_frame(skb);
|
||||
|
||||
conn->sent++;
|
||||
if (conn->sent == ~0)
|
||||
conn->sent = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void hci_tx_task(unsigned long arg)
|
||||
{
|
||||
struct hci_dev *hdev = (struct hci_dev *) arg;
|
||||
@ -1376,6 +1396,8 @@ static void hci_tx_task(unsigned long arg)
|
||||
|
||||
hci_sched_sco(hdev);
|
||||
|
||||
hci_sched_esco(hdev);
|
||||
|
||||
/* Send next queued raw (unknown type) packet */
|
||||
while ((skb = skb_dequeue(&hdev->raw_q)))
|
||||
hci_send_frame(skb);
|
||||
|
Reference in New Issue
Block a user