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.