From: Marcel Holtmann <marcel@holtmann.org>
To: Shi Buyun-FVBP83 <FVBP83@motorola.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: how bluez supports ESCO link?
Date: Fri, 12 Dec 2008 02:46:41 +0100 [thread overview]
Message-ID: <1229046401.22285.23.camel@violet.holtmann.net> (raw)
In-Reply-To: <15A39AF0EC0CC0418BE4B70B810E61B70143C694@zmy16exm72.ds.mot.com>
Hi,
> In the current linux 2.6.25 kernel code, can Bluez setup ESCO link?
> I found in net/bluetooth/sco.c, sco_connect defined as:
>
> static int sco_connect(struct sock *sk)
> {
> if (lmp_esco_capable(hdev) && !disable_esco)
> type = ESCO_LINK;
> else
> type = SCO_LINK;
>
> hcon = hci_connect(hdev, type, dst, HCI_AT_NO_BONDING);
> }
> this code shows bluez supports ESCO link.
>
> But in function struct hci_conn * hci_connect(struct hci_dev *hdev, int
> type, bdaddr_t *dst)
> {
> if (type == SCO_LINK) {
> struct hci_conn *sco;
>
> if (!(sco = hci_conn_hash_lookup_ba(hdev, SCO_LINK, dst))) {
> if (!(sco = hci_conn_add(hdev, SCO_LINK, dst))) {
> hci_conn_put(acl);
> return NULL;
> }
> }
> acl->link = sco;
> sco->link = acl;
>
> hci_conn_hold(sco);
>
> if (acl->state == BT_CONNECTED &&
> (sco->state == BT_OPEN || sco->state == BT_CLOSED))
> hci_add_sco(sco, acl->handle);
>
> return sco;
> } else {
> return acl;
> }
> }
> the else switch shows it does nothing when type NOT equal to SCO_LINK.
> Should this code need to modify or this is intended to designed?
the hci_connect from a 2.6.27 kernel looks different. So you might wanna
test with a later kernel.
Regards
Marcel
next prev parent reply other threads:[~2008-12-12 1:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 6:38 how bluez supports ESCO link? Shi Buyun-FVBP83
2008-12-12 1:46 ` Marcel Holtmann [this message]
2008-12-12 3:22 ` shy
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=1229046401.22285.23.camel@violet.holtmann.net \
--to=marcel@holtmann.org \
--cc=FVBP83@motorola.com \
--cc=linux-bluetooth@vger.kernel.org \
/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