2007-04-23 21:50:06

by Alok

[permalink] [raw]
Subject: [Bluez-devel] [PATCH] Dynamic Alternate settings patch (hci_usb.c)

Hi,

As per the discussion on #bluez channel , I am attaching a patch which
dynamically manages the the alternate settings for SCO channels.
The patch includes the following :

1. It declares a work queue(config_work), which is scheduled when
1. There is a change in number of SCO channels OR
2. There is a change in the Voice setting.

2. On invocation it determines the alternate setting based on the table
given in HCI - usb spec docs. The table is also mentioned in the patch.

3. It then empties all the queued isochronous URBs , except those which are
already submitted.

4. It then sets the alternate setting by calling usb_set_interface().

I have tested this patch using "scotest".
I am using 2.6.21-rc7 with sco-flowcontrol-v4.2.diff patch.

Let me know if any changes are necessary.
Any suggestions are welcome.



Alok.


Attachments:
(No filename) (863.00 B)
(No filename) (1.10 kB)
alternate-setting-patch (5.56 kB)
(No filename) (286.00 B)
(No filename) (164.00 B)
Download all attachments