All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timo =?unknown-8bit?q?M=C3=BCller?= <mail@timomueller.eu>
To: ofono@ofono.org
Subject: Re: [PATCHv3 3/3] hfpmodem: Add N9 quirk to run CLCC after callheld=<2 or 3>
Date: Tue, 26 Mar 2013 10:25:28 +0100	[thread overview]
Message-ID: <51516988.2060300@timomueller.eu> (raw)
In-Reply-To: <2ec1b7ac69aac4f0edbc6cef843c63684ee16995.1360663430.git.timo.mueller@bmw-carit.de>

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

Timo Mueller wrote, On 13.02.2013 09:36:
> From: Timo Mueller <timo.mueller@bmw-carit.de>
>
> On the Nokia N9 with a call being active, placing a second call on the
> AG device will lead to the active call being put on hold. During the
> transition the phone does not update the list of current calls. This
> leads to an +CLCC response that does not contain the new outgoing
> call, even though an outgoing callsetup was reported.
>
> The list will be updated once the active call was put on hold and
> callheld=2 is reported. In this case the list has to be requested
> again (AT+CLCC).
>
> AT sequence that exhibited the failure (AG device was a Nokia N9
> having an active outgoing call and placing a second outgoing call)
>
> < \r\n+CIEV: 5,2\r\n
>> AT+CLCC\r
> < \r\n+CLCC: 1,0,0,0,0,"+49xxx1",145\r\n
> < \r\nOK\r\n
> < \r\n+CIEV: 6,2\r\n
> < \r\n+CIEV: 5,3\r\n
> < \r\n+CIEV: 6,1\r\n
>> AT+CLCC\r
> < \r\n+CIEV: 5,0\r\n
> < \r\n+CLCC: 1,0,1,0,0,"+49xxx1",145\r\n
> < \r\n+CLCC: 2,0,0,0,0,"+49xxx2",145\r\n
> < \r\nOK\r\n
> ---
>   drivers/hfpmodem/vendor.h    |  3 ++-
>   drivers/hfpmodem/voicecall.c | 17 +++++++++++++++++
>   2 files changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hfpmodem/vendor.h b/drivers/hfpmodem/vendor.h
> index fca847a..597ddee 100644
> --- a/drivers/hfpmodem/vendor.h
> +++ b/drivers/hfpmodem/vendor.h
> @@ -21,5 +21,6 @@
>    */
>
>   enum ofono_vendor {
> -	OFONO_VENDOR_GENERIC = 0
> +	OFONO_VENDOR_GENERIC = 0,
> +	OFONO_VENDOR_NOKIA_N9
>   };
> diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c
> index 7d2988e..af2aa75 100644
> --- a/drivers/hfpmodem/voicecall.c
> +++ b/drivers/hfpmodem/voicecall.c
> @@ -1041,13 +1041,20 @@ out:
>   	vd->cind_val[HFP_INDICATOR_CALLSETUP] = value;
>   }
>
> +static int needs_callheld_clcc_quirk(int vendor)
> +{
> +		return vendor == OFONO_VENDOR_NOKIA_N9;
> +}
> +
>   static void ciev_callheld_notify(struct ofono_voicecall *vc,
>   					unsigned int value)
>   {
>   	struct voicecall_data *vd = ofono_voicecall_get_data(vc);
>   	GSList *l;
> +	GSList *dialing;
>   	struct ofono_call *call;
>   	unsigned int callheld = vd->cind_val[HFP_INDICATOR_CALLHELD];
> +	unsigned int callsetup = vd->cind_val[HFP_INDICATOR_CALLSETUP];
>
>   	switch (value) {
>   	case 0:
> @@ -1083,6 +1090,16 @@ static void ciev_callheld_notify(struct ofono_voicecall *vc,
>   				call->status = CALL_STATUS_HELD;
>   				ofono_voicecall_notify(vc, call);
>   			}
> +
> +			if (needs_callheld_clcc_quirk(vd->vendor)) {
> +				if (callsetup == 2 || callsetup == 3) {
> +					dialing = find_dialing(vd->calls);
> +
> +					if (dialing == NULL)
> +						g_at_chat_send(vd->chat, "AT+CLCC", clcc_prefix,
> +								clcc_poll_cb, vc, NULL);
> +				}
> +			}
>   		} else if (callheld == 1) {
>   			if (vd->clcc_source)
>   				g_source_remove(vd->clcc_source);
>

ping

  reply	other threads:[~2013-03-26  9:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-13  8:36 [PATCHv3 1/3] hfpmodem: Retry AT+CLCC request after outgoing callsetup Timo Mueller
2013-02-13  8:36 ` [PATCHv3 2/3] hfp_hf: Add generic hfp modem vendor Timo Mueller
2013-02-13  8:36   ` [PATCHv3 3/3] hfpmodem: Add N9 quirk to run CLCC after callheld=<2 or 3> Timo Mueller
2013-03-26  9:25     ` Timo =?unknown-8bit?q?M=C3=BCller?= [this message]
2013-03-27  5:13     ` Denis Kenzior
2013-03-27  5:09   ` [PATCHv3 2/3] hfp_hf: Add generic hfp modem vendor Denis Kenzior
2013-03-27  5:05 ` [PATCHv3 1/3] hfpmodem: Retry AT+CLCC request after outgoing callsetup Denis Kenzior

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=51516988.2060300@timomueller.eu \
    --to=mail@timomueller.eu \
    --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.