From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH v2 06/19] hfpmodem: Support for +BSIR unsol. result codes
Date: Thu, 13 Oct 2011 13:14:33 -0500 [thread overview]
Message-ID: <4E972A89.3090206@gmail.com> (raw)
In-Reply-To: <1318422940-14955-7-git-send-email-mikel.astiz@bmw-carit.de>
[-- Attachment #1: Type: text/plain, Size: 1826 bytes --]
Hi Mikel,
On 10/12/2011 07:35 AM, Mikel Astiz wrote:
> ---
> drivers/hfpmodem/handsfree.c | 18 ++++++++++++++++++
> 1 files changed, 18 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/hfpmodem/handsfree.c b/drivers/hfpmodem/handsfree.c
> index 12a23fc..be6b83c 100644
> --- a/drivers/hfpmodem/handsfree.c
> +++ b/drivers/hfpmodem/handsfree.c
> @@ -45,11 +45,28 @@
> struct hf_data {
> GAtChat *chat;
> unsigned int ag_features;
> + unsigned int vendor;
> };
>
> +static void bsir_notify(GAtResult *result, gpointer user_data)
> +{
> + struct ofono_handsfree *hf = user_data;
> + struct hf_data *hd = ofono_handsfree_get_data(hf);
> + int value;
> +
> + if (at_util_parse_reg_unsolicited(result, "+BSIR:", &value,
> + NULL, NULL, NULL, hd->vendor) == FALSE)
> + return;
Why exactly are you using parse_reg_unsolicited here? That one is meant
to parse +CREG/+CGREG unsolicited responses, probably not the right
thing for BSIR, just using g_at_result_iter_next_number would be enough
here.
> +
> + ofono_handsfree_set_inband_ringing(hf, (ofono_bool_t) value);
> +}
> +
> static gboolean hfp_handsfree_register(gpointer user_data)
> {
> struct ofono_handsfree *hf = user_data;
> + struct hf_data *hd = ofono_handsfree_get_data(hf);
> +
> + g_at_chat_register(hd->chat, "+BSIR:", bsir_notify, FALSE, hf, NULL);
>
> ofono_handsfree_register(hf);
>
> @@ -69,6 +86,7 @@ static int hfp_handsfree_probe(struct ofono_handsfree *hf,
> hd = g_new0(struct hf_data, 1);
> hd->chat = g_at_chat_clone(info->chat);
> hd->ag_features = info->ag_features;
> + hd->vendor = vendor;
If you don't use the at_util_parse_reg_unsolicited then you don't need
the vendor information.
>
> ofono_handsfree_set_data(hf, hd);
>
Regards,
-Denis
next prev parent reply other threads:[~2011-10-13 18:14 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-12 12:35 [PATCH v2 00/19] Bluetooth HFP-specific extensions Mikel Astiz
2011-10-12 12:35 ` [PATCH v2 01/19] handsfree: Copyright statement correction Mikel Astiz
2011-10-13 18:07 ` Denis Kenzior
2011-10-12 12:35 ` [PATCH v2 02/19] " Mikel Astiz
2011-10-13 18:07 ` Denis Kenzior
2011-10-12 12:35 ` [PATCH v2 03/19] hfpmodem: " Mikel Astiz
2011-10-13 18:07 ` Denis Kenzior
2011-10-12 12:35 ` [PATCH v2 04/19] doc: Add initial Handsfree API documentation Mikel Astiz
2011-10-13 18:08 ` Denis Kenzior
2011-10-12 12:35 ` [PATCH v2 05/19] hfpmodem: Set initial state for inband ringing Mikel Astiz
2011-10-13 18:09 ` Denis Kenzior
2011-10-12 12:35 ` [PATCH v2 06/19] hfpmodem: Support for +BSIR unsol. result codes Mikel Astiz
2011-10-13 18:14 ` Denis Kenzior [this message]
2011-10-14 8:51 ` Mikel Astiz
2011-10-12 12:35 ` [PATCH v2 07/19] doc: Handsfree API support for +BINP=1 Mikel Astiz
2011-10-13 18:35 ` Denis Kenzior
2011-10-12 12:35 ` [PATCH v2 08/19] handsfree: Expose RequestPhoneNumber in D-Bus API Mikel Astiz
2011-10-13 18:35 ` Denis Kenzior
2011-10-12 12:35 ` [PATCH v2 09/19] hfpmodem: Support of number requests (AT+BINP=1) Mikel Astiz
2011-10-13 18:49 ` Denis Kenzior
2011-10-12 12:35 ` [PATCH v2 10/19] handsfree: Removed ASYNC flag from GetProperties Mikel Astiz
2011-10-13 18:50 ` Denis Kenzior
2011-10-12 12:35 ` [PATCH v2 11/19] doc: Voice recognition function added in Handsfree Mikel Astiz
2011-10-12 12:35 ` [PATCH v2 12/19] include: Voice recognition in handsfree public api Mikel Astiz
2011-10-12 12:35 ` [PATCH v2 13/19] handsfree: Implement voice recognition function Mikel Astiz
2011-10-12 12:35 ` [PATCH v2 14/19] hfpmodem: Support for AT+BVRA Mikel Astiz
2011-10-12 12:35 ` [PATCH v2 15/19] doc: Handsfree exposes supported AG features Mikel Astiz
2011-10-12 12:35 ` [PATCH v2 16/19] include: AG features added to handsfree public api Mikel Astiz
2011-10-12 12:35 ` [PATCH v2 17/19] handsfree: Supported AG features exposed in D-Bus Mikel Astiz
2011-10-12 12:35 ` [PATCH v2 18/19] hfpmodem: Report features supported by AG Mikel Astiz
2011-10-12 12:35 ` [PATCH v2 19/19] hfp_hf: Switched to permissive AT syntax parser Mikel Astiz
2011-10-13 18:52 ` 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=4E972A89.3090206@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.