public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Guillaume Bedot <littletux@zarb.org>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] Fw: [Bluez-users] Headset not playing audio HELP	PLEASE
Date: Thu, 14 Feb 2008 11:17:44 +0100	[thread overview]
Message-ID: <1202984264.7948.41.camel@localhost> (raw)
In-Reply-To: <841732.94094.qm@web8405.mail.in.yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 2092 bytes --]

Hello,

Le mercredi 13 février 2008 à 10:58 +0530, pramod gurav a écrit :

> Feb 13 09:52:43 localhost kernel: hci_scodata_packet: hci0 SCO packet
> for unknown connection handle 1
> 
> Feb 13 09:52:43 localhost kernel: hci_scodata_packet: hci0 SCO packet
> for unknown connection handle 1

Which kernel do you use now ?

You may have the same issue as me with the Motorola HT820 headset.

I have exactly the same type of messages, at the same time.

> [root@localhost Pramod]# /usr/local/sbin/hciconfig -a 
> hci0:   Type: USB
>         BD Address: 00:02:72:CE:5B:80 ACL MTU: 1017:8 SCO MTU: 64:0
>         UP RUNNING PSCAN ISCAN
>         RX bytes:5974443 acl:279 sco:116978 events:188 errors:0
>         TX bytes:4222 acl:168 sco:0 commands:90 errors:0
>         Features: 0xff 0xff 0x8d 

> 0xfe 
It seems like me, your bluetooth dongle supports eSCO, but not your
headset.

(from http://support.zenwalk.org/index.php?topic=2060.0;wap2)
   Device Name: HBH-600
     LMP Version: 1.1 (0x1) LMP Subversion: 0x9240
     Manufacturer: Philips Semiconductors (37)
     Features: 0xbc 0x28 0x01 0x00 0x00 0x00 0x00 0x00
          <encryption> <slot offset> <timing accuracy> <role switch>
          <sniff mode> <SCO link> <HV3 packets> <CVSD>

First, you can try a old bluetooth dongle =< 1.2 and not patch anything
if you have one.

Alternatively, you can try a slightly older kernel or patch your kernel
to revert "patch-2.6.23-mh1", that will remove eSCO support, but also a
lot of other things.
I have an older kernel without this patch included ( 2.6.22.18 from
mandriva ) that works fine with both of my headsets.

Or if you feel adventurous, you can try the attached patch of mine (you
have to know i am not a kernel dev but just a bluez user), which may
solve your problem with *this headset*.

Unfortunately, it will probably cause others with eSCO capable headsets,
because a SCO link is always used the first time the headset connects
itself, as the headset features are not known yet (mine, PROF PBH-6W,
works only since the second try with this patch).

Regards,

Guillaume B.

[-- Attachment #2: force-sco-link-until-headset-features-are-known.patch --]
[-- Type: text/x-patch, Size: 1865 bytes --]

--- net/bluetooth/hci_conn.c.orig	2008-01-28 09:15:50.000000000 +0100
+++ net/bluetooth/hci_conn.c	2008-02-14 10:34:09.000000000 +0100
@@ -332,6 +332,9 @@
 	if (type == ACL_LINK)
 		return acl;
 
+	if (lmp_esco_capable(hdev) && lmp_esco_capable(acl))
+		type=ESCO_LINK;
+
 	if (!(sco = hci_conn_hash_lookup_ba(hdev, type, dst))) {
 		if (!(sco = hci_conn_add(hdev, type, dst))) {
 			hci_conn_put(acl);
@@ -346,7 +349,7 @@
 
 	if (acl->state == BT_CONNECTED &&
 			(sco->state == BT_OPEN || sco->state == BT_CLOSED)) {
-		if (lmp_esco_capable(hdev))
+		if (type==ESCO_LINK)
 			hci_setup_sync(sco, acl->handle);
 		else
 			hci_add_sco(sco, acl->handle);
--- net/bluetooth/hci_event.c.orig	2008-01-28 09:15:31.000000000 +0100
+++ net/bluetooth/hci_event.c	2008-02-14 10:26:35.000000000 +0100
@@ -720,7 +720,7 @@
 		struct hci_conn *sco = conn->link;
 		if (sco) {
 			if (!ev->status) {
-				if (lmp_esco_capable(hdev))
+				if (lmp_esco_capable(hdev) && lmp_esco_capable(conn))
 					hci_setup_sync(sco, conn->handle);
 				else
 					hci_add_sco(sco, conn->handle);
@@ -771,7 +771,8 @@
 
 		hci_dev_unlock(hdev);
 
-		if (ev->link_type == ACL_LINK || !lmp_esco_capable(hdev)) {
+		if (ev->link_type == ACL_LINK || !lmp_esco_capable(hdev) 
+				|| !lmp_esco_capable(conn)) {
 			struct hci_cp_accept_conn_req cp;
 
 			bacpy(&cp.bdaddr, &ev->bdaddr);
--- net/bluetooth/sco.c.orig	2008-01-28 09:15:14.000000000 +0100
+++ net/bluetooth/sco.c	2008-02-14 10:36:54.000000000 +0100
@@ -189,7 +189,7 @@
 	struct sco_conn *conn;
 	struct hci_conn *hcon;
 	struct hci_dev  *hdev;
-	int err, type;
+	int err;
 
 	BT_DBG("%s -> %s", batostr(src), batostr(dst));
 
@@ -200,9 +200,7 @@
 
 	err = -ENOMEM;
 
-	type = lmp_esco_capable(hdev) ? ESCO_LINK : SCO_LINK;
-
-	hcon = hci_connect(hdev, type, dst);
+	hcon = hci_connect(hdev, SCO_LINK, dst);
 	if (!hcon)
 		goto done;
 


[-- Attachment #3: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

      reply	other threads:[~2008-02-14 10:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-13  5:28 [Bluez-devel] Fw: [Bluez-users] Headset not playing audio HELP PLEASE pramod gurav
2008-02-14 10:17 ` Guillaume Bedot [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=1202984264.7948.41.camel@localhost \
    --to=littletux@zarb.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