Re: how bluez supports ESCO link?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux