From: Alok <develnewbie@gmail.com>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] [PATCH][HFP] - default device as hfp
Date: Thu, 10 Jan 2008 20:54:50 +0530 [thread overview]
Message-ID: <1199978691.23989.10.camel@greatbear> (raw)
In-Reply-To: <20080109002828.GB5883@ps.ms.mff.cuni.cz>
[-- Attachment #1: Type: text/plain, Size: 731 bytes --]
Hi Johan,
Attaching a patch which fixes a HFP bug in headset.c
When a default device/stored device is registered, it cannot be used as
a handsfree (i.e hs->hfp_active = false) because the following condition
in rfcomm_connect_cb() fails.
if (server_is_enabled(HANDSFREE_SVCLASS_ID) && hs->hfp_handle != 0)
This is because, hs->hfp_handle is not populated for the default
device.As a matter of fact, hs->hsp_handle is not populated either.
verified this by printing the handles.
The 2 handles are ONLY populated through a call to headset_init() with
its 2nd and 3rd arguments not being zero.
I have tested this patch with my setup.
Let me know if my logic is wrong or the patch needs to be changed.
Thanks,
Alok.
[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 910 bytes --]
Index: audio/headset.c
===================================================================
RCS file: /cvsroot/bluez/utils/audio/headset.c,v
retrieving revision 1.156
diff -u -5 -p -r1.156 headset.c
--- audio/headset.c 9 Jan 2008 12:36:58 -0000 1.156
+++ audio/headset.c 10 Jan 2008 14:43:36 -0000
@@ -752,10 +752,16 @@ static void get_record_reply(DBusPending
|| (uuid.type == SDP_UUID16 && uuid.value.uuid16 != id)) {
error("Service classes did not contain the expected UUID");
goto failed_not_supported;
}
+ if ((uuid.value.uuid32 == HANDSFREE_SVCLASS_ID)
+ || (uuid.value.uuid16 == HANDSFREE_SVCLASS_ID)) {
+ hs->hfp_handle = record->handle;
+ }else
+ hs->hsp_handle = record->handle;
+
if (!sdp_get_access_protos(record, &protos)) {
ch = sdp_get_proto_port(protos, RFCOMM_UUID);
sdp_list_foreach(protos, (sdp_list_func_t) sdp_list_free,
NULL);
sdp_list_free(protos, NULL);
[-- Attachment #3: Type: text/plain, Size: 278 bytes --]
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
[-- 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
next prev parent reply other threads:[~2008-01-10 15:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-09 0:28 [Bluez-devel] error in headset capture, patch included Pavel Semerad
2008-01-09 3:03 ` Johan Hedberg
2008-01-09 10:37 ` [Bluez-devel] [PATCH] HFP - Rejecting a call Alok
2008-01-10 15:24 ` Alok [this message]
2008-01-10 15:36 ` [Bluez-devel] [PATCH][HFP] - Setting the inband Ringtone Alok
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=1199978691.23989.10.camel@greatbear \
--to=develnewbie@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.