All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 4/5] hfp_hf_bluez5: Add a card driver for HFP 1.6
Date: Tue, 26 Mar 2013 23:43:36 -0500	[thread overview]
Message-ID: <515278F8.2010807@gmail.com> (raw)
In-Reply-To: <1364249122-18332-4-git-send-email-vinicius.gomes@openbossa.org>

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

Hi Vinicius,

On 03/25/2013 05:05 PM, Vinicius Costa Gomes wrote:
> This is just the skeleton of a Handsfree Audio Card for the HF side of
> HFP 1.6.
> ---
>   plugins/hfp_hf_bluez5.c | 37 +++++++++++++++++++++++++++++++++++++
>   1 file changed, 37 insertions(+)
>
> diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c
> index ff8afba..89b60c8 100644
> --- a/plugins/hfp_hf_bluez5.c
> +++ b/plugins/hfp_hf_bluez5.c
> @@ -60,6 +60,8 @@
>
>   #define HFP_EXT_PROFILE_PATH   "/bluetooth/profile/hfp_hf"
>
> +#define HFP16_HF_DRIVER		"hfp16-hf-driver"
> +
>   struct hfp {
>   	struct hfp_slc_info info;
>   	DBusMessage *msg;
> @@ -310,6 +312,31 @@ static struct ofono_modem_driver hfp_driver = {
>   	.post_sim	= hfp_post_sim,
>   };
>
> +static int hfp16_card_probe(struct ofono_handsfree_card *card,
> +					unsigned int vendor, void *data)
> +{
> +	return 0;
> +}
> +
> +static void hfp16_card_remove(struct ofono_handsfree_card *card)
> +{
> +
> +}
> +
> +static int hfp16_card_connect(struct ofono_handsfree_card *card,
> +					ofono_handsfree_card_connect_cb_t cb,
> +					void *data)
> +{
> +	return -ENOSYS;

This function should be declared to return void to be consistent with 
everything else.  Whoops.  My fault.  I fixed it upstream.

> +}
> +
> +static struct ofono_handsfree_card_driver hfp16_hf_driver = {
> +	.name		= HFP16_HF_DRIVER,
> +	.probe		= hfp16_card_probe,
> +	.remove		= hfp16_card_remove,
> +	.connect	= hfp16_card_connect,
> +};
> +
>   static ofono_bool_t device_path_compare(struct ofono_modem *modem,
>   					void *userdata)
>   {
> @@ -616,6 +643,13 @@ static int hfp_init(void)
>   		return -EIO;
>   	}
>
> +	err = ofono_handsfree_card_driver_register(&hfp16_hf_driver);
> +	if (err<  0) {
> +		g_dbus_unregister_interface(conn, HFP_EXT_PROFILE_PATH,
> +						BLUEZ_PROFILE_INTERFACE);
> +		return err;
> +	}
> +
>   	err = ofono_modem_driver_register(&hfp_driver);
>   	if (err<  0) {
>   		g_dbus_unregister_interface(conn, HFP_EXT_PROFILE_PATH,
> @@ -647,6 +681,9 @@ static void hfp_exit(void)
>   	bt_unregister_profile(conn, HFP_EXT_PROFILE_PATH);
>   	g_dbus_unregister_interface(conn, HFP_EXT_PROFILE_PATH,
>   						BLUEZ_PROFILE_INTERFACE);
> +
> +	ofono_handsfree_card_driver_unregister(&hfp16_hf_driver);
> +
>   	ofono_modem_driver_unregister(&hfp_driver);
>   	g_dbus_client_unref(bluez);
>

Regards,
-Denis

  reply	other threads:[~2013-03-27  4:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-25 22:05 [PATCH 1/5] handsfree-audio: Add support for initiating SCO connections Vinicius Costa Gomes
2013-03-25 22:05 ` [PATCH 2/5] handsfree-audio: Add support for sending the SCO socket Vinicius Costa Gomes
2013-03-27  4:42   ` Denis Kenzior
2013-03-25 22:05 ` [PATCH 3/5] handsfree-audio: Reject .Connect() from other senders Vinicius Costa Gomes
2013-03-27  4:42   ` Denis Kenzior
2013-03-25 22:05 ` [PATCH 4/5] hfp_hf_bluez5: Add a card driver for HFP 1.6 Vinicius Costa Gomes
2013-03-27  4:43   ` Denis Kenzior [this message]
2013-03-25 22:05 ` [PATCH 5/5] handsfree-audio: Add .Connect using the card driver Vinicius Costa Gomes
2013-03-26 21:21   ` Vinicius Costa Gomes
2013-03-26 21:28     ` [PATCH] " Vinicius Costa Gomes
2013-03-27  4:59       ` Denis Kenzior
2013-03-27 14:22         ` Vinicius Costa Gomes
2013-03-27 14:32           ` Denis Kenzior
2013-03-27 14:45             ` Vinicius Costa Gomes
2013-03-27  4:41 ` [PATCH 1/5] handsfree-audio: Add support for initiating SCO connections 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=515278F8.2010807@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.