linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Peter Zotov <whitequark@whitequark.ru>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: Handset voice dial signalling patch
Date: Thu, 14 Jan 2010 16:41:23 +0200	[thread overview]
Message-ID: <20100114144123.GA31691@jh-x301> (raw)
In-Reply-To: <4B4E3A98.8000605@whitequark.ru>

Hi,

On Thu, Jan 14, 2010, Peter Zotov wrote:
> Johan Hedberg wrote:
> >>+	gboolean voice_dial;
> >>+	gboolean voice_dial_req;
> >
> >I'm not so sure that it'll be useful to have this state info in
> >headset.c. I suspect for the most part voice recognition will be a
> >platform specific issue that can be taken care of by the telephony
> >driver. So I'd leave out these new variables for now and add them later
> >if it turns out that there's actually some use for them in headset.c.
> >
> >After this change I think the patch could be pushed upstream.
> Fixed.

Thanks, however there are still a couple of things that I noticed (sorry
for not spotting them earlier). Once the issues in the code are fixed,
please create a patch that's appliable using git am, i.e. commit to your
own tree (with an appropriate commit message) and prepare a patch file
with git format-patch.

> +static int voice_dial(struct audio_device *device, const char *buf)
> +{
> +	if (strlen(buf) < 9)
> +		return -EINVAL;
> +
> +	gboolean start_dialing;

No variable declarations after code in the same scope. Please check your
patch with the configure script options used by bootstrap-configure and
you'll get something like the following with your patch:

audio/headset.c: In function ‘voice_dial’:
audio/headset.c:1145: error: ISO C90 forbids mixed declarations and code

> +void telephony_voice_dial_req(void *telephony_device, gboolean enable)
> +{
> +	debug("telephony-dummy: got %s voice dial request",
> +			enable ? "enable" : "disable");
> +
> +	g_dbus_emit_signal(connection, "/org/bluez/test",
> +			"org.bluez.TelephonyTest", "VoiceDial",
> +			DBUS_TYPE_INVALID);
> +
> +	telephony_voice_dial_rsp(telephony_device, CME_ERROR_NOT_SUPPORTED);
> +}

Why return ERROR_NOT_SUPPORTED instead of ERROR_NONE here? After all,
you did successfully process the command (i.e. send the signal).

Johan

  reply	other threads:[~2010-01-14 14:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13  7:36 Handset voice dial signalling patch Peter Zotov
2010-01-13  8:32 ` Johan Hedberg
2010-01-13  9:03   ` Peter Zotov
2010-01-13  9:26     ` Johan Hedberg
2010-01-13 21:26       ` Peter Zotov
2010-01-14 14:41         ` Johan Hedberg [this message]
2010-01-14 21:26           ` Peter Zotov
2010-01-15  6:57             ` Johan Hedberg

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=20100114144123.GA31691@jh-x301 \
    --to=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=whitequark@whitequark.ru \
    /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;
as well as URLs for NNTP newsgroup(s).