Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306888
b: refs/heads/master
c: f4001d2
h: refs/heads/master
v: v3
  • Loading branch information
Mikel Astiz authored and Gustavo Padovan committed May 9, 2012
1 parent c6cec59 commit 5b73dde
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2d8b3a11623cf5203bc063927b6fc742625f1ebf
refs/heads/master: f4001d28464d92db5cae7702d65cf18162043a12
13 changes: 11 additions & 2 deletions trunk/drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,7 @@ static void btusb_work(struct work_struct *work)
{
struct btusb_data *data = container_of(work, struct btusb_data, work);
struct hci_dev *hdev = data->hdev;
int new_alts;
int err;

if (hdev->conn_hash.sco_num > 0) {
Expand All @@ -868,11 +869,19 @@ static void btusb_work(struct work_struct *work)

set_bit(BTUSB_DID_ISO_RESUME, &data->flags);
}
if (data->isoc_altsetting != 2) {

if (hdev->voice_setting & 0x0020) {
static const int alts[3] = { 2, 4, 5 };
new_alts = alts[hdev->conn_hash.sco_num - 1];
} else {
new_alts = hdev->conn_hash.sco_num;
}

if (data->isoc_altsetting != new_alts) {
clear_bit(BTUSB_ISOC_RUNNING, &data->flags);
usb_kill_anchored_urbs(&data->isoc_anchor);

if (__set_isoc_interface(hdev, 2) < 0)
if (__set_isoc_interface(hdev, new_alts) < 0)
return;
}

Expand Down

0 comments on commit 5b73dde

Please sign in to comment.