public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] [PATCH]Dynamic Alternate Setting patch	(hci_usb.c)
Date: Tue, 24 Apr 2007 20:38:43 +0200	[thread overview]
Message-ID: <1177439923.14980.14.camel@aeonflux.holtmann.net> (raw)
In-Reply-To: <fc27e74b0704240413v5b6e2e80h7b2feb40d27de686@mail.gmail.com>

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. 

having global static variables doesn't work. It will break horrible in
case you attach a second Bluetooth dongle. Also the voice setting is
stored in hci_dev and always present. So no need to copy these
information. What you need to store is the current alternate setting and
then calculate the new one. Change the setting and then store it.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

      parent reply	other threads:[~2007-04-24 18:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-24 11:13 [Bluez-devel] [PATCH]Dynamic Alternate Setting patch (hci_usb.c) list subscribe
2007-04-24 13:15 ` Jose Vasconcellos
2007-04-24 15:08   ` list subscribe
2007-04-24 15:27     ` Jose Vasconcellos
2007-04-24 16:06       ` Marcel Holtmann
2007-04-24 16:13       ` alok
2007-04-24 17:08         ` Jose Vasconcellos
2007-04-24 18:38 ` Marcel Holtmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1177439923.14980.14.camel@aeonflux.holtmann.net \
    --to=marcel@holtmann.org \
    --cc=bluez-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox