Linux bluetooth development
 help / color / mirror / Atom feed
From: Dmitriy Paliy <dmitriy.paliy@nokia.com>
To: linux-bluetooth@vger.kernel.org
Cc: Dmitriy Paliy <dmitriy.paliy@nokia.com>
Subject: [PATCH 4/5] Add set fast connectable to audio manager
Date: Tue, 17 Aug 2010 17:05:33 +0300	[thread overview]
Message-ID: <1282053934-19445-5-git-send-email-dmitriy.paliy@nokia.com> (raw)
In-Reply-To: <1282053934-19445-1-git-send-email-dmitriy.paliy@nokia.com>

Set fast connectable added to audio manager interface. Enables
fast connectable mode for all audio adapters or sets respective
values to default when disabled. It does not interfere with any
other audio manager's interfaces, modes, or states.
---
 audio/manager.c |   14 ++++++++++++++
 audio/manager.h |    4 ++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/audio/manager.c b/audio/manager.c
index 6dd0f87..b885929 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -1290,3 +1290,17 @@ gboolean manager_allow_headset_connection(struct audio_device *device)
 
 	return TRUE;
 }
+
+void manager_set_fast_connectable(gboolean enable)
+{
+	GSList *l;
+
+	for (l = adapters; l != NULL; l = l->next) {
+		struct audio_adapter *adapter = l->data;
+
+		if ( btd_adapter_set_fast_connectable(adapter->btd_adapter,
+								enable) )
+			error("Changing fast connectable for hci%d failed",
+				adapter_get_dev_id(adapter->btd_adapter) );
+	}
+}
diff --git a/audio/manager.h b/audio/manager.h
index 8e1abf4..90fe6f0 100644
--- a/audio/manager.h
+++ b/audio/manager.h
@@ -48,3 +48,7 @@ struct audio_device *manager_get_device(const bdaddr_t *src,
 					gboolean create);
 
 gboolean manager_allow_headset_connection(struct audio_device *device);
+
+/* TRUE to enable fast connectable and FALSE to disable fast connectable for all
+ * audio adapters. */
+void manager_set_fast_connectable(gboolean enable);
-- 
1.7.0.4


  parent reply	other threads:[~2010-08-17 14:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-17 14:05 [PATCH 0/5] Fast connectable mode for HFP Dmitriy Paliy
2010-08-17 14:05 ` [PATCH 1/5] Add STANDARD and INTERLACED page scan definitions Dmitriy Paliy
2010-08-17 14:05 ` [PATCH 2/5] Add fast connectable to hciops Dmitriy Paliy
2010-08-17 14:41   ` Johan Hedberg
2010-08-17 14:05 ` [PATCH 3/5] Add set fast connectable to adapter Dmitriy Paliy
2010-08-17 14:05 ` Dmitriy Paliy [this message]
2010-08-17 14:43   ` [PATCH 4/5] Add set fast connectable to audio manager Johan Hedberg
2010-08-17 14:05 ` [PATCH 5/5] Add fast connectable support to HFP Dmitriy Paliy
2010-08-17 14:20 ` [PATCH 0/5] Fast connectable mode for HFP Johan Hedberg
  -- strict thread matches above, loose matches on Subject: below --
2010-08-18 10:35 [PATCH 0/5] Fast connectable mode for HFP (update) Dmitriy Paliy
2010-08-18 10:35 ` [PATCH 4/5] Add set fast connectable to audio manager Dmitriy Paliy

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=1282053934-19445-5-git-send-email-dmitriy.paliy@nokia.com \
    --to=dmitriy.paliy@nokia.com \
    --cc=linux-bluetooth@vger.kernel.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