Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH v2 09/12] emulator: Add HFP 1.6 AG card driver
Date: Thu, 25 Apr 2013 12:58:09 -0500	[thread overview]
Message-ID: <51796EB1.6030607@gmail.com> (raw)
In-Reply-To: <1366916953-12967-10-git-send-email-paulo.borges@openbossa.org>

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

Hi Paulo,

On 04/25/2013 02:09 PM, Paulo Borges wrote:
> ---
>   src/emulator.c |   31 ++++++++++++++++++++++++++++++-
>   1 file changed, 30 insertions(+), 1 deletion(-)
>
> diff --git a/src/emulator.c b/src/emulator.c
> index 8ac79d5..5027b02 100644
> --- a/src/emulator.c
> +++ b/src/emulator.c
> @@ -45,6 +45,8 @@
>
>   #define RING_TIMEOUT 3
>
> +#define HFP_16_AG_DRIVER "hfp16-ag-driver"
> +
>   struct ofono_emulator {
>   	struct ofono_atom *atom;
>   	enum ofono_emulator_type type;
> @@ -1007,6 +1009,32 @@ struct ofono_emulator *ofono_emulator_create(struct ofono_modem *modem,
>   	return em;
>   }
>
> +static int hfp16_card_probe(struct ofono_handsfree_card *card,
> +					unsigned int vendor, void *data)
> +{
> +	DBG("HFP 1.6 AG card driver probe");
> +
> +	return 0;
> +}
> +
> +static void hfp16_card_remove(struct ofono_handsfree_card *card)
> +{
> +	DBG("HFP 1.6 AG card driver remove");
> +}
> +
> +static void hfp16_card_connect(struct ofono_handsfree_card *card,
> +			ofono_handsfree_card_connect_cb_t cb, void *data)
> +{
> +	DBG("HFP 1.6 AG card driver connect");
> +}
> +
> +static struct ofono_handsfree_card_driver hfp16_ag_driver = {
> +	.name		= HFP_16_AG_DRIVER,
> +	.probe		= hfp16_card_probe,
> +	.remove		= hfp16_card_remove,
> +	.connect	= hfp16_card_connect,
> +};
> +

So why do we need this exactly?  There is already a default 
implementation inside handsfree_audio_card if the driver is NULL.  How 
is this going to be different from the default implementation?

>   static int card_set_local_remote(struct ofono_handsfree_card *card, int fd)
>   {
>   	struct sockaddr_rc saddr;
> @@ -1338,9 +1366,10 @@ void __ofono_emulator_set_indicator_forced(struct ofono_emulator *em,
>
>   int __ofono_emulator_init(void)
>   {
> -	return 0;
> +	return ofono_handsfree_card_driver_register(&hfp16_ag_driver);
>   }
>
>   void __ofono_emulator_cleanup(void)
>   {
> +	ofono_handsfree_card_driver_unregister(&hfp16_ag_driver);
>   }

Regards,
-Denis

  reply	other threads:[~2013-04-25 17:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-25 19:09 [PATCH v2 00/12] Add HandsfreeAudioCard to emulator Paulo Borges
2013-04-25 19:09 ` [PATCH v2 01/12] include: Add ofono_emulator_create_card() Paulo Borges
2013-04-25 19:09 ` [PATCH v2 02/12] emulator: Implement ofono_emulator_create_card() Paulo Borges
2013-04-25 19:09 ` [PATCH v2 03/12] hfp_ag_bluez5: Create card when connect Paulo Borges
2013-04-25 19:09 ` [PATCH v2 04/12] emulator: Register card when establish SLC Paulo Borges
2013-04-25 19:09 ` [PATCH v2 05/12] emulator: Set local and remote address of card Paulo Borges
2013-04-25 19:09 ` [PATCH v2 06/12] include: Add emulator init and cleanup functions Paulo Borges
2013-04-25 19:09 ` [PATCH v2 07/12] emulator: Implement " Paulo Borges
2013-04-25 19:09 ` [PATCH v2 08/12] main: Call emulator " Paulo Borges
2013-04-25 19:09 ` [PATCH v2 09/12] emulator: Add HFP 1.6 AG card driver Paulo Borges
2013-04-25 17:58   ` Denis Kenzior [this message]
2013-04-25 19:09 ` [PATCH v2 10/12] emulator: Set " Paulo Borges
2013-04-25 19:09 ` [PATCH v2 11/12] hfp_ag_bluez5: Send HFP version to card creation Paulo Borges
2013-04-25 19:09 ` [PATCH v2 12/12] hfp_ag_bluez5: Register HFP AG version 1.6 Paulo Borges
     [not found] <517A756D.2060305@gmail.com>
2013-04-26 19:20 ` [PATCH v2 09/12] emulator: Add HFP 1.6 AG card driver Paulo Borges

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=51796EB1.6030607@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox