Open Source Telephony
 help / color / mirror / Atom feed
From: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
To: ofono@ofono.org
Subject: Re: [PATCH v0 4/8] hfpmodem: Add support for storing the supported codecs
Date: Thu, 17 Jan 2013 15:55:40 -0300	[thread overview]
Message-ID: <20130117185539.GA18094@samus> (raw)
In-Reply-To: <50F834F9.4010409@gmail.com>

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

Hi Denis,

On 11:29 Thu 17 Jan, Denis Kenzior wrote:
> Hi Claudio,
> 
> On 01/17/2013 09:13 AM, Claudio Takahasi wrote:
> >From: Vinicius Costa Gomes<vinicius.gomes@openbossa.org>
> >
> >As informing the AG of the supported codecs is part of the setup
> >of the SLC, it makes sense to have this information inside the SLC
> >establishment part.
> >
> >Now the hfp_slc_info structure has dynamic information, and so the
> >hfp_slc_info_free() function is used.
> >---
> >  drivers/hfpmodem/slc.c  | 14 +++++++++++++-
> >  drivers/hfpmodem/slc.h  | 10 +++++++++-
> >  plugins/hfp_hf_bluez4.c |  5 ++++-
> >  plugins/phonesim.c      | 12 +++++++-----
> >  4 files changed, 33 insertions(+), 8 deletions(-)
> 
> This patch needs to be broken up.  First it needs to implement the
> hfp_slc_info_free function, then update all existing plugins to use
> that.  Then introduce hfp_slc_info_init changes and whatever else.

Ok. Sure.

[snip]

> 
> >diff --git a/plugins/hfp_hf_bluez4.c b/plugins/hfp_hf_bluez4.c
> >index 450c183..f27b0e1 100644
> >--- a/plugins/hfp_hf_bluez4.c
> >+++ b/plugins/hfp_hf_bluez4.c
> >@@ -165,12 +165,15 @@ static DBusMessage *hfp_agent_new_connection(DBusConnection *conn,
> >  	struct ofono_modem *modem = data;
> >  	struct hfp_data *hfp_data = ofono_modem_get_data(modem);
> >  	guint16 version;
> >+	unsigned char codecs[1];
> >
> >  	if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_UNIX_FD,&fd,
> >  				DBUS_TYPE_UINT16,&version, DBUS_TYPE_INVALID))
> >  		return __ofono_error_invalid_args(msg);
> >
> >-	hfp_slc_info_init(&hfp_data->info, version);
> >+	memset(&codecs, 0, sizeof(codecs));
> >+	codecs[0] = HFP_CODEC_CVSD;
> >+	hfp_slc_info_init(&hfp_data->info, version, codecs, 1);
> 
> Why do you need this info for HFP 1.5?

You are right, I don't need it. But being pedantic, it is more because
in the BlueZ 4 case it won't support codec negotiation than because of
the version.

And that reminds me that in the case that I only have one codec (CVSD),
I am sending the supported codecs needlessly. Will fix it as well.


Cheers,
-- 
Vinicius

  reply	other threads:[~2013-01-17 18:55 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-17 15:13 [PATCH v0 0/8] HFP HF: Service Level/Codec negotiation Claudio Takahasi
2013-01-17 15:13 ` [PATCH v0 1/8] hfp_hf: Add NewConnection arguments parsing Claudio Takahasi
2013-01-17 17:10   ` Denis Kenzior
2013-01-17 17:58     ` Claudio Takahasi
2013-01-17 18:38       ` Denis Kenzior
2013-01-17 15:13 ` [PATCH v0 2/8] hfpmodem: Add version defines for HFP 1.6 Claudio Takahasi
2013-01-17 17:22   ` Denis Kenzior
2013-01-17 15:13 ` [PATCH v0 3/8] hfpmodem: Add support for sending the supported codecs Claudio Takahasi
2013-01-17 17:22   ` Denis Kenzior
2013-01-17 15:13 ` [PATCH v0 4/8] hfpmodem: Add support for storing " Claudio Takahasi
2013-01-17 17:29   ` Denis Kenzior
2013-01-17 18:55     ` Vinicius Costa Gomes [this message]
2013-01-17 15:13 ` [PATCH v0 5/8] hfpmodem: Send the AT+BAC command with " Claudio Takahasi
2013-01-17 15:13 ` [PATCH v0 6/8] hfp_hf: Register the HFP modem Claudio Takahasi
2013-01-17 15:13 ` [PATCH v0 7/8] hfp_hf: Add service level negotiation Claudio Takahasi
2013-01-17 15:13 ` [PATCH v0 8/8] hfp_hf: Add support for codec negotiation Claudio Takahasi
2013-01-18 23:21 ` [PATCH v1 00/10] HFP HF: Service Level/Codec negotiation Claudio Takahasi
2013-01-18 23:21   ` [PATCH v1 01/10] dbus: Add ofono_dbus_iter_parse_properties() Claudio Takahasi
2013-01-18 23:21   ` [PATCH v1 02/10] bluez5: Rename register/unregister profile Claudio Takahasi
2013-01-18 23:21   ` [PATCH v1 03/10] hfp_hf: Add NewConnection arguments parsing Claudio Takahasi
2013-01-18 23:21   ` [PATCH v1 04/10] hfpmodem: Add support for storing the supported codecs Claudio Takahasi
2013-01-18 23:21   ` [PATCH v1 05/10] hfpmodem: Implement hfp_slc_info_free Claudio Takahasi
2013-01-18 23:21   ` [PATCH v1 06/10] phonesim: Use hfp_slc_info_free() Claudio Takahasi
2013-01-18 23:21   ` [PATCH v1 07/10] hfpmodem: Send the AT+BAC command with the supported codecs Claudio Takahasi
2013-01-18 23:21   ` [PATCH v1 08/10] hfp_hf: Register the HFP modem Claudio Takahasi
2013-01-18 23:21   ` [PATCH v1 09/10] hfp_hf: Add service level negotiation Claudio Takahasi
2013-01-18 23:21   ` [PATCH v1 10/10] hfp_hf: Add support for codec negotiation Claudio Takahasi
2013-01-18 23:38   ` [PATCH v2 00/10] HFP HF: Service Level/Codec negotiation Claudio Takahasi
2013-01-18 23:38     ` [PATCH v2 01/10] dbus: Add ofono_dbus_iter_parse_properties() Claudio Takahasi
2013-01-18 23:38     ` [PATCH v2 02/10] bluez5: Rename register/unregister profile Claudio Takahasi
2013-01-18 23:38     ` [PATCH v2 03/10] hfp_hf: Add NewConnection arguments parsing Claudio Takahasi
2013-01-18 23:38     ` [PATCH v2 04/10] hfpmodem: Add support for storing the supported codecs Claudio Takahasi
2013-01-18 23:38     ` [PATCH v2 05/10] hfpmodem: Implement hfp_slc_info_free Claudio Takahasi
2013-01-18 23:38     ` [PATCH v2 06/10] phonesim: Use hfp_slc_info_free() Claudio Takahasi
2013-01-18 23:38     ` [PATCH v2 07/10] hfpmodem: Send the AT+BAC command with the supported codecs Claudio Takahasi
2013-01-18 23:38     ` [PATCH v2 08/10] hfp_hf: Register the HFP modem Claudio Takahasi
2013-01-18 23:38     ` [PATCH v2 09/10] hfp_hf: Add service level negotiation Claudio Takahasi
2013-01-18 23:39     ` [PATCH v2 10/10] hfp_hf: Add support for codec negotiation Claudio Takahasi
2013-01-22 21:42     ` [PATCH v2 00/10] HFP HF: Service Level/Codec negotiation Vinicius Costa Gomes

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=20130117185539.GA18094@samus \
    --to=vinicius.gomes@openbossa.org \
    --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