All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 2/2 v2] hfp_ag_bluez5: register audio card
Date: Mon, 05 Oct 2015 11:45:55 -0500	[thread overview]
Message-ID: <5612A943.2000704@gmail.com> (raw)
In-Reply-To: <1444044790-17392-2-git-send-email-simon.fels@canonical.com>

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

Hi Simon,

<snip>

> @@ -123,14 +168,24 @@ static DBusMessage *profile_new_connection(DBusConnection *conn,
>
>   	ofono_emulator_register(em, fd);
>
> -	fd_dup = dup(fd);
> -	io = g_io_channel_unix_new(fd_dup);
> +	io = g_io_channel_unix_new(fd);

The comment in commit 9332299b indicates that a dup() was needed to 
properly detect HUP events.  Can you double check that this change is 
indeed correct?

>   	g_io_add_watch_full(io, G_PRIORITY_DEFAULT, G_IO_HUP, io_hup_cb,
>   						g_strdup(device), g_free);
>   	g_io_channel_unref(io);
>
> -	g_hash_table_insert(connection_hash, g_strdup(device),
> -						GINT_TO_POINTER(fd_dup));
> +	dev = g_new0(struct device_info, 1);
> +	dev->fd = fd;
> +
> +	dev->card = ofono_handsfree_card_create(0,
> +					OFONO_HANDSFREE_CARD_TYPE_GATEWAY,
> +					NULL, NULL);
> +
> +	ofono_handsfree_card_set_local(dev->card, local);
> +	ofono_handsfree_card_set_remote(dev->card, remote);
> +
> +	g_hash_table_insert(connection_hash, g_strdup(device), dev);
> +
> +	ofono_handsfree_card_register(dev->card);
>

On HFP 1.6 and 1.7, the audio should not be triggered until SLC is 
established.  Whats your plan to ensure that PulseAudio does not start 
using the audio device until then?  FYI, the earlier attempt to add AG 
support had src/emulator.c make the ofono_handsfree_card_register() call 
at the appropriate time.

Regards,
-Denis

  reply	other threads:[~2015-10-05 16:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-05 11:33 [PATCH 1/2 v2] handsfree-audio: add type for our audio cards Simon Fels
2015-10-05 11:33 ` [PATCH 2/2 v2] hfp_ag_bluez5: register audio card Simon Fels
2015-10-05 16:45   ` Denis Kenzior [this message]
2015-10-05 16:47 ` [PATCH 1/2 v2] handsfree-audio: add type for our audio cards 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=5612A943.2000704@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.