From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [RFC v0 06/20] hfp_hf_bluez5: Add HFP 1.6 connect implementation
Date: Mon, 18 Mar 2013 14:15:42 -0500 [thread overview]
Message-ID: <514767DE.1050201@gmail.com> (raw)
In-Reply-To: <20130314175245.GA2649@samus>
[-- Attachment #1: Type: text/plain, Size: 2515 bytes --]
Hi Vinicius,
On 03/14/2013 12:52 PM, Vinicius Costa Gomes wrote:
> Hi,
>
> On 11:21 Tue 12 Mar, Claudio Takahasi wrote:
>> This patch implements the HF initiate SCO connection for devices
>> compliant with HFP 1.6. HF sends AT+BCC to inform the AG that audio
>> connection is required.
>> ---
>> plugins/hfp_hf_bluez5.c | 13 ++++++++++++-
>> 1 file changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c
>> index 0d5d5c7..6c55657 100644
>> --- a/plugins/hfp_hf_bluez5.c
>> +++ b/plugins/hfp_hf_bluez5.c
>> @@ -364,7 +364,18 @@ static struct ofono_handsfree_card_driver card_driver15 = {
>> static int card_audio_connect16(const char *remote, const char *local,
>> void *data)
>> {
>> - return 0;
>> + struct ofono_modem *modem = data;
>> + struct hfp *hfp = ofono_modem_get_data(modem);
>> + struct hfp_slc_info *info =&hfp->info;
>> +
>> + if (info->chat == NULL)
>> + return -ENOTCONN;
>> +
>> + info->chat = g_at_chat_ref(info->chat);
>> + g_at_chat_send(info->chat, "AT+BCC", NULL, NULL, info->chat,
>> + (GDestroyNotify) g_at_chat_unref);
>
> Testing with the iPhone, if there's no audio related things happening on
> the phone, audio calls for example, the phone responds with an error.
>
> We need to handle this case, we could think of two alternatives:
>
> 1. Adding a timeout when the driver returns -EINPROGRESS, if this timeout
> expires before the SCO is established we return an error to the caller of the
> Connect method;
Sounds fine
>
> 2. Adding another method to the handsfree-audio.h API, something like:
> "ofono_handsfree_audio_card_falied(card, err)" that would signify that the
> audio connection attempt failed before its time.
No, don't do this
>
> The main advantage of (1) is that we are covered even in the case that
> "AT+BCC" succeeds and the remote device doesn't open an SCO channel.
>
The problem is that the spec does not suggest any timing relationship
between AT+BCC and the SCO establishment. I suggest we ignore this case
for now and simply return success / failure from Connect() based on the
result of AT+BCC.
>
>> +
>> + return -EINPROGRESS;
>> }
>>
>> static struct ofono_handsfree_card_driver card_driver16 = {
>> --
>> 1.7.11.7
>>
>> _______________________________________________
>> ofono mailing list
>> ofono(a)ofono.org
>> http://lists.ofono.org/listinfo/ofono
>
>
> Cheers,
Regards,
-Denis
next prev parent reply other threads:[~2013-03-18 19:15 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-12 14:21 [RFC v0 00/20] HFP1.6: Codec negotiation and HF Connect Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 01/20] handsfree-audio: Add card driver for HFP 1.6 Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 02/20] handsfree-audio: Add user data to card driver Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 03/20] hfp_hf_bluez5: Pass modem as user data Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 04/20] handsfree-audio: Add user data to connect declaration Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 05/20] hfp_hf_bluez5: Add user data to connect implementation Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 06/20] hfp_hf_bluez5: Add HFP 1.6 " Claudio Takahasi
2013-03-14 17:52 ` Vinicius Costa Gomes
2013-03-18 19:15 ` Denis Kenzior [this message]
2013-03-12 14:21 ` [RFC v0 07/20] handsfree-audio: Add HFP 1.6 connect hook Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 08/20] handsfree-audio: Add "Connect" reply for HFP 1.6 Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 09/20] handsfree-audio: Add function to get the codecs Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 10/20] hfpmodem: Send AT+BAC with the supported codecs Claudio Takahasi
2013-03-12 17:44 ` Vinicius Costa Gomes
2013-03-12 14:21 ` [RFC v0 11/20] hfpmodem: Add codec watcher register Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 12/20] hfp_hf_bluez5: Register codec watcher Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 13/20] handsfree-audio: Add function to select the codec Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 14/20] hfp_hf_bluez5: Set the audio codec in the card Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 15/20] handsfree-audio: Send the selected codec Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 16/20] handsfree-audio: Set CVSD as default in the card Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 17/20] handsfree-audio: Use bitmask for supported codecs Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 18/20] handsfree-audio: Disable mSBC if defer is off Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 19/20] bluetooth: Add define for SCO voice settings Claudio Takahasi
2013-03-12 14:21 ` [RFC v0 20/20] handsfree-audio: Add setting SCO air mode Claudio Takahasi
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=514767DE.1050201@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.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 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.