Bluetooth: Support SCO over HCI for Atheros AR300x Bluetooth device
PATCH 1/1 Bluetooth: Support SCO over HCI for Atheros AR300x Bluetooth device
This patch adds SCO over HCI support to Atheros AR300x HCI transport driver.
--- drivers/bluetooth/hci_ath.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)
drivers/bluetooth/hci_ath.c +9 -9
@@ -162,11 +162,6 @@ static int ath_enqueue(struct hci_uart *hu, struct sk_buff *skb) {struct ath_struct *ath = hu->priv; -if (bt_cb (skb)->pkt_type ==HCI_SCODATA_PKT ) { -kfree_skb (skb); -return 0 ; - } -/* * Update power management enable flag with parameters of * HCI sleep enable vendor specific HCI command.
@@ -183,10 +178,15 @@ static int ath_enqueue(struct hci_uart *hu, struct sk_buff *skb)/* Prepend skb with frame type */ memcpy (skb_push (skb,1 ), &bt_cb (skb)->pkt_type,1 ); -skb_queue_tail (&ath->txq, skb); -set_bit (HCI_UART_SENDING , &hu->tx_state); - -schedule_work (&ath->ctxtsw); +if (bt_cb (skb)->pkt_type ==HCI_SCODATA_PKT ) { +skb_queue_head (&ath->txq, skb); +clear_bit (HCI_UART_SENDING , &hu->tx_state); +hci_uart_tx_wakeup (hu); + }else { +skb_queue_tail (&ath->txq, skb); +set_bit (HCI_UART_SENDING , &hu->tx_state); +schedule_work (&ath->ctxtsw); + }return 0 ; }
Signature · 1 line
1.7.0.4
Hi,
drivers/bluetooth/hci_ath.c
Quoted 12 lines · Suraj Sumangala
This patch adds SCO over HCI support to Atheros AR300x HCI transport driver.
Signed-off-by Suraj Sumangala<[email protected]>--- drivers/bluetooth/hci_ath.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)drivers/bluetooth/hci_ath.c +0
-0
*ping*
Regards
Suraj
Hi Suraj,
Quoted 26 lines · Suraj Sumangala
This patch adds SCO over HCI support to Atheros AR300x HCI transport driver.
Signed-off-by Suraj Sumangala <[email protected]>--- drivers/bluetooth/hci_ath.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)drivers/bluetooth/hci_ath.c +0
-5@@ -162,11 +162,6 @@ static int ath_enqueue(struct hci_uart *hu, struct sk_buff *skb) {struct ath_struct *ath = hu->priv; -if (bt_cb (skb)->pkt_type ==HCI_SCODATA_PKT ) { -kfree_skb (skb); -return 0 ; - } -/* * Update power management enable flag with parameters of * HCI sleep enable vendor specific HCI command. @@ -183,10 +178,15 @@ static int ath_enqueue(struct hci_uart *hu, struct sk_buff *skb)/* Prepend skb with frame type */
drivers/bluetooth/hci_ath.c static int ath_enqueue(struct hci_uart *hu, struct sk_buff *skb) · line 184
Quoted 10 lines
drivers/bluetooth/hci_ath.c +4
-4memcpy (skb_push (skb,1 ), &bt_cb (skb)->pkt_type,1 ); -skb_queue_tail (&ath->txq, skb); -set_bit (HCI_UART_SENDING , &hu->tx_state); - -schedule_work (&ath->ctxtsw); +if (bt_cb (skb)->pkt_type ==HCI_SCODATA_PKT ) { +skb_queue_head (&ath->txq, skb); +clear_bit (HCI_UART_SENDING , &hu->tx_state); +hci_uart_tx_wakeup (hu);
Seems you are giving priority to SCO packets, right? why?
Signature · 2 lines
Gustavo F. Padovan http://profusion.mobi
Hi Gustavo,
Quoted 32 lines · Gustavo F. Padovan
Hi Suraj,
Quoted 28 lines · Suraj Sumangala
This patch adds SCO over HCI support to Atheros AR300x HCI transport driver.
Signed-off-by Suraj Sumangala<[email protected]>--- drivers/bluetooth/hci_ath.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)drivers/bluetooth/hci_ath.c +0
-5@@ -162,11 +162,6 @@ static int ath_enqueue(struct hci_uart *hu, struct sk_buff *skb) {struct ath_struct *ath = hu->priv; -if (bt_cb (skb)->pkt_type ==HCI_SCODATA_PKT ) { -kfree_skb (skb); -return 0 ; - } -/* * Update power management enable flag with parameters of * HCI sleep enable vendor specific HCI command. @@ -183,10 +178,15 @@ static int ath_enqueue(struct hci_uart *hu, struct sk_buff *skb)/* Prepend skb with frame type */ memcpy (skb_push (skb,1 ),&bt_cb (skb)->pkt_type,1 );
Quoted 11 lines
drivers/bluetooth/hci_ath.c static int ath_enqueue(struct hci_uart *hu, struct sk_buff *skb) · line 184
Quoted 8 lines
drivers/bluetooth/hci_ath.c +4
-4-skb_queue_tail (&ath->txq, skb); -set_bit (HCI_UART_SENDING ,&hu->tx_state); - -schedule_work (&ath->ctxtsw); +if (bt_cb (skb)->pkt_type ==HCI_SCODATA_PKT ) { +skb_queue_head (&ath->txq, skb); +clear_bit (HCI_UART_SENDING ,&hu->tx_state); +hci_uart_tx_wakeup (hu);Seems you are giving priority to SCO packets, right? why?
Yes, There was some degradation in audio quality which improved when we gave priority to SCO.
Do you see any potential problem with that? I will re-verify this anyway.
Regards
Suraj