* [PATCH BlueZ 02/13] audio: Remove HFP option from audio.conf
From: Luiz Augusto von Dentz @ 2012-11-13 13:21 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1352812880-7306-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
It is not in use anymore
---
audio/audio.conf | 4 ----
audio/manager.c | 8 --------
audio/manager.h | 1 -
3 files changed, 13 deletions(-)
diff --git a/audio/audio.conf b/audio/audio.conf
index d1c57d3..6bf4482 100644
--- a/audio/audio.conf
+++ b/audio/audio.conf
@@ -25,10 +25,6 @@
# service interacts with remote headset devices)
[Headset]
-# Set to true to support HFP, false means only HSP is supported
-# Defaults to true
-HFP=true
-
# Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
MaxConnected=1
diff --git a/audio/manager.c b/audio/manager.c
index 26dde60..e949509 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -90,7 +90,6 @@ static GSList *adapters = NULL;
static GSList *devices = NULL;
static struct enabled_interfaces enabled = {
- .hfp = TRUE,
.gateway = FALSE,
.sink = TRUE,
.source = FALSE,
@@ -674,13 +673,6 @@ int audio_manager_init(GKeyFile *conf, gboolean *enable_sco)
} else
auto_connect = b;
- b = g_key_file_get_boolean(config, "Headset", "HFP",
- &err);
- if (err)
- g_clear_error(&err);
- else
- enabled.hfp = b;
-
err = NULL;
i = g_key_file_get_integer(config, "Headset", "MaxConnected",
&err);
diff --git a/audio/manager.h b/audio/manager.h
index 08d814f..8fb208c 100644
--- a/audio/manager.h
+++ b/audio/manager.h
@@ -23,7 +23,6 @@
*/
struct enabled_interfaces {
- gboolean hfp;
gboolean headset;
gboolean gateway;
gboolean sink;
--
1.7.11.7
^ permalink raw reply related
* [PATCH BlueZ 1/3] avctp: Fix dead assignment in control_response
From: Luiz Augusto von Dentz @ 2012-11-13 13:21 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1352812880-7306-1-git-send-email-luiz.dentz@gmail.com>
From: Szymon Janc <szymon.janc@tieto.com>
Value stored to req is never read before writing it again.
---
audio/avctp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/audio/avctp.c b/audio/avctp.c
index 6ba25e4..29756f6 100644
--- a/audio/avctp.c
+++ b/audio/avctp.c
@@ -577,7 +577,7 @@ static void control_response(struct avctp_channel *control,
size_t operand_count)
{
struct avctp_pending_req *p = control->p;
- struct avctp_control_req *req = p->data;
+ struct avctp_control_req *req;
GSList *l;
if (p && p->transaction == avctp->transaction) {
--
1.7.11.7
^ permalink raw reply related
* [PATCH BlueZ 01/13] audio: Remove HFP and HSP headset role support
From: Luiz Augusto von Dentz @ 2012-11-13 13:21 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <1352812880-7306-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The support for these profiles are intended to be external, probably directly
integrated in the telephony stack of the platform in use e.g. oFono.
---
audio/manager.c | 502 --------------------------------------------------------
1 file changed, 502 deletions(-)
diff --git a/audio/manager.c b/audio/manager.c
index 4ea61bf..26dde60 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -91,7 +91,6 @@ static GSList *devices = NULL;
static struct enabled_interfaces enabled = {
.hfp = TRUE,
- .headset = TRUE,
.gateway = FALSE,
.sink = TRUE,
.source = FALSE,
@@ -111,62 +110,6 @@ static struct audio_adapter *find_adapter(GSList *list,
return NULL;
}
-static sdp_record_t *hsp_ag_record(uint8_t ch)
-{
- sdp_list_t *svclass_id, *pfseq, *apseq, *root;
- uuid_t root_uuid, svclass_uuid, ga_svclass_uuid;
- uuid_t l2cap_uuid, rfcomm_uuid;
- sdp_profile_desc_t profile;
- sdp_record_t *record;
- sdp_list_t *aproto, *proto[2];
- sdp_data_t *channel;
-
- record = sdp_record_alloc();
- if (!record)
- return NULL;
-
- sdp_uuid16_create(&root_uuid, PUBLIC_BROWSE_GROUP);
- root = sdp_list_append(0, &root_uuid);
- sdp_set_browse_groups(record, root);
-
- sdp_uuid16_create(&svclass_uuid, HEADSET_AGW_SVCLASS_ID);
- svclass_id = sdp_list_append(0, &svclass_uuid);
- sdp_uuid16_create(&ga_svclass_uuid, GENERIC_AUDIO_SVCLASS_ID);
- svclass_id = sdp_list_append(svclass_id, &ga_svclass_uuid);
- sdp_set_service_classes(record, svclass_id);
-
- sdp_uuid16_create(&profile.uuid, HEADSET_PROFILE_ID);
- profile.version = 0x0102;
- pfseq = sdp_list_append(0, &profile);
- sdp_set_profile_descs(record, pfseq);
-
- sdp_uuid16_create(&l2cap_uuid, L2CAP_UUID);
- proto[0] = sdp_list_append(0, &l2cap_uuid);
- apseq = sdp_list_append(0, proto[0]);
-
- sdp_uuid16_create(&rfcomm_uuid, RFCOMM_UUID);
- proto[1] = sdp_list_append(0, &rfcomm_uuid);
- channel = sdp_data_alloc(SDP_UINT8, &ch);
- proto[1] = sdp_list_append(proto[1], channel);
- apseq = sdp_list_append(apseq, proto[1]);
-
- aproto = sdp_list_append(0, apseq);
- sdp_set_access_protos(record, aproto);
-
- sdp_set_info_attr(record, "Headset Audio Gateway", 0, 0);
-
- sdp_data_free(channel);
- sdp_list_free(proto[0], 0);
- sdp_list_free(proto[1], 0);
- sdp_list_free(apseq, 0);
- sdp_list_free(pfseq, 0);
- sdp_list_free(aproto, 0);
- sdp_list_free(root, 0);
- sdp_list_free(svclass_id, 0);
-
- return record;
-}
-
static sdp_record_t *hfp_hs_record(uint8_t ch)
{
sdp_list_t *svclass_id, *pfseq, *apseq, *root;
@@ -223,206 +166,6 @@ static sdp_record_t *hfp_hs_record(uint8_t ch)
return record;
}
-static sdp_record_t *hfp_ag_record(uint8_t ch, uint32_t feat)
-{
- sdp_list_t *svclass_id, *pfseq, *apseq, *root;
- uuid_t root_uuid, svclass_uuid, ga_svclass_uuid;
- uuid_t l2cap_uuid, rfcomm_uuid;
- sdp_profile_desc_t profile;
- sdp_list_t *aproto, *proto[2];
- sdp_record_t *record;
- sdp_data_t *channel, *features;
- uint8_t netid = 0x01;
- uint16_t sdpfeat;
- sdp_data_t *network;
-
- record = sdp_record_alloc();
- if (!record)
- return NULL;
-
- network = sdp_data_alloc(SDP_UINT8, &netid);
- if (!network) {
- sdp_record_free(record);
- return NULL;
- }
-
- sdp_uuid16_create(&root_uuid, PUBLIC_BROWSE_GROUP);
- root = sdp_list_append(0, &root_uuid);
- sdp_set_browse_groups(record, root);
-
- sdp_uuid16_create(&svclass_uuid, HANDSFREE_AGW_SVCLASS_ID);
- svclass_id = sdp_list_append(0, &svclass_uuid);
- sdp_uuid16_create(&ga_svclass_uuid, GENERIC_AUDIO_SVCLASS_ID);
- svclass_id = sdp_list_append(svclass_id, &ga_svclass_uuid);
- sdp_set_service_classes(record, svclass_id);
-
- sdp_uuid16_create(&profile.uuid, HANDSFREE_PROFILE_ID);
- profile.version = 0x0105;
- pfseq = sdp_list_append(0, &profile);
- sdp_set_profile_descs(record, pfseq);
-
- sdp_uuid16_create(&l2cap_uuid, L2CAP_UUID);
- proto[0] = sdp_list_append(0, &l2cap_uuid);
- apseq = sdp_list_append(0, proto[0]);
-
- sdp_uuid16_create(&rfcomm_uuid, RFCOMM_UUID);
- proto[1] = sdp_list_append(0, &rfcomm_uuid);
- channel = sdp_data_alloc(SDP_UINT8, &ch);
- proto[1] = sdp_list_append(proto[1], channel);
- apseq = sdp_list_append(apseq, proto[1]);
-
- sdpfeat = (uint16_t) feat & 0xF;
- features = sdp_data_alloc(SDP_UINT16, &sdpfeat);
- sdp_attr_add(record, SDP_ATTR_SUPPORTED_FEATURES, features);
-
- aproto = sdp_list_append(0, apseq);
- sdp_set_access_protos(record, aproto);
-
- sdp_set_info_attr(record, "Hands-Free Audio Gateway", 0, 0);
-
- sdp_attr_add(record, SDP_ATTR_EXTERNAL_NETWORK, network);
-
- sdp_data_free(channel);
- sdp_list_free(proto[0], 0);
- sdp_list_free(proto[1], 0);
- sdp_list_free(apseq, 0);
- sdp_list_free(pfseq, 0);
- sdp_list_free(aproto, 0);
- sdp_list_free(root, 0);
- sdp_list_free(svclass_id, 0);
-
- return record;
-}
-
-static void headset_auth_cb(DBusError *derr, void *user_data)
-{
- struct audio_device *device = user_data;
- GError *err = NULL;
- GIOChannel *io;
-
- device->hs_auth_id = 0;
-
- if (device->hs_preauth_id) {
- g_source_remove(device->hs_preauth_id);
- device->hs_preauth_id = 0;
- }
-
- if (derr && dbus_error_is_set(derr)) {
- error("Access denied: %s", derr->message);
- headset_set_state(device, HEADSET_STATE_DISCONNECTED);
- return;
- }
-
- io = headset_get_rfcomm(device);
-
- if (!bt_io_accept(io, headset_connect_cb, device, NULL, &err)) {
- error("bt_io_accept: %s", err->message);
- g_error_free(err);
- headset_set_state(device, HEADSET_STATE_DISCONNECTED);
- return;
- }
-}
-
-static gboolean hs_preauth_cb(GIOChannel *chan, GIOCondition cond,
- gpointer user_data)
-{
- struct audio_device *device = user_data;
-
- DBG("Headset disconnected during authorization");
-
- btd_cancel_authorization(device->hs_auth_id);
- device->hs_auth_id = 0;
-
- headset_set_state(device, HEADSET_STATE_DISCONNECTED);
-
- device->hs_preauth_id = 0;
-
- return FALSE;
-}
-
-static void ag_confirm(GIOChannel *chan, gpointer data)
-{
- const char *server_uuid, *remote_uuid;
- struct audio_device *device;
- gboolean hfp_active;
- bdaddr_t src, dst;
- GError *err = NULL;
- uint8_t ch;
-
- bt_io_get(chan, &err,
- BT_IO_OPT_SOURCE_BDADDR, &src,
- BT_IO_OPT_DEST_BDADDR, &dst,
- BT_IO_OPT_CHANNEL, &ch,
- BT_IO_OPT_INVALID);
- if (err) {
- error("%s", err->message);
- g_error_free(err);
- goto drop;
- }
-
- if (ch == DEFAULT_HS_AG_CHANNEL) {
- hfp_active = FALSE;
- server_uuid = HSP_AG_UUID;
- remote_uuid = HSP_HS_UUID;
- } else {
- hfp_active = TRUE;
- server_uuid = HFP_AG_UUID;
- remote_uuid = HFP_HS_UUID;
- }
-
- device = manager_get_device(&src, &dst, TRUE);
- if (!device)
- goto drop;
-
- if (!manager_allow_headset_connection(device)) {
- DBG("Refusing headset: too many existing connections");
- goto drop;
- }
-
- if (!device->headset) {
- btd_device_add_uuid(device->btd_dev, remote_uuid);
- if (!device->headset)
- goto drop;
- }
-
- if (headset_get_state(device) > HEADSET_STATE_DISCONNECTED) {
- DBG("Refusing new connection since one already exists");
- goto drop;
- }
-
- headset_set_hfp_active(device, hfp_active);
- headset_set_rfcomm_initiator(device, TRUE);
-
- if (headset_connect_rfcomm(device, chan) < 0) {
- error("headset_connect_rfcomm failed");
- goto drop;
- }
-
- headset_set_state(device, HEADSET_STATE_CONNECTING);
-
- device->hs_auth_id = btd_request_authorization(&device->src,
- &device->dst,
- server_uuid,
- headset_auth_cb,
- device);
- if (device->hs_auth_id == 0) {
- DBG("Authorization denied");
- headset_set_state(device, HEADSET_STATE_DISCONNECTED);
- return;
- }
-
- device->hs_preauth_id = g_io_add_watch(chan,
- G_IO_NVAL | G_IO_HUP | G_IO_ERR,
- hs_preauth_cb, device);
-
- device->auto_connect = auto_connect;
-
- return;
-
-drop:
- g_io_channel_shutdown(chan, TRUE, NULL);
-}
-
static void gateway_auth_cb(DBusError *derr, void *user_data)
{
struct audio_device *device = user_data;
@@ -499,108 +242,6 @@ drop:
g_io_channel_shutdown(chan, TRUE, NULL);
}
-static int headset_server_init(struct audio_adapter *adapter)
-{
- uint8_t chan = DEFAULT_HS_AG_CHANNEL;
- sdp_record_t *record;
- gboolean master = TRUE;
- GError *err = NULL;
- uint32_t features;
- GIOChannel *io;
- const bdaddr_t *src;
-
- if (config) {
- gboolean tmp;
-
- tmp = g_key_file_get_boolean(config, "General", "Master",
- &err);
- if (err) {
- DBG("audio.conf: %s", err->message);
- g_clear_error(&err);
- } else
- master = tmp;
- }
-
- src = adapter_get_address(adapter->btd_adapter);
-
- io = bt_io_listen(NULL, ag_confirm, adapter, NULL, &err,
- BT_IO_OPT_SOURCE_BDADDR, src,
- BT_IO_OPT_CHANNEL, chan,
- BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
- BT_IO_OPT_MASTER, master,
- BT_IO_OPT_INVALID);
- if (!io)
- goto failed;
-
- adapter->hsp_ag_server = io;
-
- record = hsp_ag_record(chan);
- if (!record) {
- error("Unable to allocate new service record");
- goto failed;
- }
-
- if (add_record_to_server(src, record) < 0) {
- error("Unable to register HS AG service record");
- sdp_record_free(record);
- goto failed;
- }
- adapter->hsp_ag_record_id = record->handle;
-
- features = headset_config_init(config);
-
- if (!enabled.hfp)
- return 0;
-
- chan = DEFAULT_HF_AG_CHANNEL;
-
- io = bt_io_listen(NULL, ag_confirm, adapter, NULL, &err,
- BT_IO_OPT_SOURCE_BDADDR, src,
- BT_IO_OPT_CHANNEL, chan,
- BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
- BT_IO_OPT_MASTER, master,
- BT_IO_OPT_INVALID);
- if (!io)
- goto failed;
-
- adapter->hfp_ag_server = io;
-
- record = hfp_ag_record(chan, features);
- if (!record) {
- error("Unable to allocate new service record");
- goto failed;
- }
-
- if (add_record_to_server(src, record) < 0) {
- error("Unable to register HF AG service record");
- sdp_record_free(record);
- goto failed;
- }
- adapter->hfp_ag_record_id = record->handle;
-
- return 0;
-
-failed:
- if (err) {
- error("%s", err->message);
- g_error_free(err);
- }
-
- if (adapter->hsp_ag_server) {
- g_io_channel_shutdown(adapter->hsp_ag_server, TRUE, NULL);
- g_io_channel_unref(adapter->hsp_ag_server);
- adapter->hsp_ag_server = NULL;
- }
-
- if (adapter->hfp_ag_server) {
- g_io_channel_shutdown(adapter->hfp_ag_server, TRUE, NULL);
- g_io_channel_unref(adapter->hfp_ag_server);
- adapter->hfp_ag_server = NULL;
- }
-
- return -1;
-}
-
static int gateway_server_init(struct audio_adapter *adapter)
{
uint8_t chan = DEFAULT_HFP_HS_CHANNEL;
@@ -683,26 +324,6 @@ static void audio_remove(struct btd_profile *p, struct btd_device *device)
audio_device_unregister(dev);
}
-static int hs_probe(struct btd_profile *p, struct btd_device *device,
- GSList *uuids)
-{
- struct audio_device *audio_dev;
-
- audio_dev = get_audio_dev(device);
- if (!audio_dev) {
- DBG("unable to get a device object");
- return -1;
- }
-
- if (audio_dev->headset)
- headset_update(audio_dev, audio_dev->headset, uuids);
- else
- audio_dev->headset = headset_init(audio_dev, uuids,
- enabled.hfp);
-
- return 0;
-}
-
static int ag_probe(struct btd_profile *p, struct btd_device *device,
GSList *uuids)
{
@@ -813,112 +434,6 @@ static struct audio_adapter *audio_adapter_get(struct btd_adapter *adapter)
return adp;
}
-static void state_changed(struct btd_adapter *adapter, gboolean powered)
-{
- struct audio_adapter *adp;
- static gboolean telephony = FALSE;
- GSList *l;
-
- DBG("%s powered %s", adapter_get_path(adapter),
- powered ? "on" : "off");
-
- /* ignore powered change, adapter is powering down */
- if (powered && adapter_powering_down(adapter))
- return;
-
- adp = find_adapter(adapters, adapter);
- if (!adp)
- return;
-
- adp->powered = powered;
-
- if (powered) {
- /* telephony driver already initialized*/
- if (telephony == TRUE)
- return;
- telephony_init();
- telephony = TRUE;
- return;
- }
-
- /* telephony not initialized just ignore power down */
- if (telephony == FALSE)
- return;
-
- for (l = adapters; l; l = l->next) {
- adp = l->data;
-
- if (adp->powered == TRUE)
- return;
- }
-
- telephony_exit();
- telephony = FALSE;
-}
-
-static int headset_server_probe(struct btd_profile *p,
- struct btd_adapter *adapter)
-{
- struct audio_adapter *adp;
- const gchar *path = adapter_get_path(adapter);
- int err;
-
- DBG("path %s", path);
-
- adp = audio_adapter_get(adapter);
- if (!adp)
- return -EINVAL;
-
- err = headset_server_init(adp);
- if (err < 0) {
- audio_adapter_unref(adp);
- return err;
- }
-
- btd_adapter_register_powered_callback(adapter, state_changed);
-
- return 0;
-}
-
-static void headset_server_remove(struct btd_profile *p,
- struct btd_adapter *adapter)
-{
- struct audio_adapter *adp;
- const gchar *path = adapter_get_path(adapter);
-
- DBG("path %s", path);
-
- btd_adapter_unregister_powered_callback(adapter, state_changed);
-
- adp = find_adapter(adapters, adapter);
- if (!adp)
- return;
-
- if (adp->hsp_ag_record_id) {
- remove_record_from_server(adp->hsp_ag_record_id);
- adp->hsp_ag_record_id = 0;
- }
-
- if (adp->hsp_ag_server) {
- g_io_channel_shutdown(adp->hsp_ag_server, TRUE, NULL);
- g_io_channel_unref(adp->hsp_ag_server);
- adp->hsp_ag_server = NULL;
- }
-
- if (adp->hfp_ag_record_id) {
- remove_record_from_server(adp->hfp_ag_record_id);
- adp->hfp_ag_record_id = 0;
- }
-
- if (adp->hfp_ag_server) {
- g_io_channel_shutdown(adp->hfp_ag_server, TRUE, NULL);
- g_io_channel_unref(adp->hfp_ag_server);
- adp->hfp_ag_server = NULL;
- }
-
- audio_adapter_unref(adp);
-}
-
static int gateway_server_probe(struct btd_profile *p,
struct btd_adapter *adapter)
{
@@ -1068,17 +583,6 @@ static void media_server_remove(struct btd_adapter *adapter)
audio_adapter_unref(adp);
}
-static struct btd_profile headset_profile = {
- .name = "audio-headset",
-
- .remote_uuids = BTD_UUIDS(HSP_HS_UUID, HFP_HS_UUID),
- .device_probe = hs_probe,
- .device_remove = audio_remove,
-
- .adapter_probe = headset_server_probe,
- .adapter_remove = headset_server_remove,
-};
-
static struct btd_profile gateway_profile = {
.name = "audio-gateway",
@@ -1187,9 +691,6 @@ int audio_manager_init(GKeyFile *conf, gboolean *enable_sco)
max_connected_headsets = i;
proceed:
- if (enabled.headset)
- btd_profile_register(&headset_profile);
-
if (enabled.gateway)
btd_profile_register(&gateway_profile);
@@ -1213,9 +714,6 @@ void audio_manager_exit(void)
config = NULL;
}
- if (enabled.headset)
- btd_profile_unregister(&headset_profile);
-
if (enabled.gateway)
btd_profile_unregister(&gateway_profile);
--
1.7.11.7
^ permalink raw reply related
* [PATCH BlueZ 00/13] Remove HFP implementation
From: Luiz Augusto von Dentz @ 2012-11-13 13:21 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
These changes remove HFP implemention from audio plugin and move audio under
profiles directory.
HFP can be emulated by test-profile -u hfp, all the telephony backends are
gone as well since this is now suppose to be a external profile probably
done inside the telephony stack e.g. oFono in use in the platform.
Luiz Augusto von Dentz (13):
audio: Remove HFP and HSP headset role support
audio: Remove HFP option from audio.conf
audio: Remove code using headset
build: Remove telephony-maemo5.c
build: Remove telephony-maemo6.c
build: Remove telephony-ofono.c
build: Remove telephony-dummy.c
build: Remove telephony.h
build: Remove headset.c and headset.h
audio: Remove code HFP and HS gateway role
build: Remove gateway.c and gateway.h
audio: Move to profiles directory
audio: Add support for passing endpoints as custom property
Makefile.am | 48 +-
audio/gateway.c | 1048 ------------
audio/gateway.h | 75 -
audio/headset.c | 2825 -------------------------------
audio/headset.h | 112 --
audio/manager.c | 1387 ---------------
audio/telephony-dummy.c | 444 -----
audio/telephony-maemo5.c | 2102 -----------------------
audio/telephony-maemo6.c | 2196 ------------------------
audio/telephony-ofono.c | 1636 ------------------
audio/telephony.h | 244 ---
{audio => profiles/audio}/a2dp-codecs.h | 0
{audio => profiles/audio}/a2dp.c | 0
{audio => profiles/audio}/a2dp.h | 0
{audio => profiles/audio}/audio.conf | 4 -
{audio => profiles/audio}/avctp.c | 0
{audio => profiles/audio}/avctp.h | 0
{audio => profiles/audio}/avdtp.c | 0
{audio => profiles/audio}/avdtp.h | 0
{audio => profiles/audio}/avrcp.c | 0
{audio => profiles/audio}/avrcp.h | 0
{audio => profiles/audio}/control.c | 0
{audio => profiles/audio}/control.h | 0
{audio => profiles/audio}/device.c | 198 +--
{audio => profiles/audio}/device.h | 2 -
{audio => profiles/audio}/main.c | 98 +-
profiles/audio/manager.c | 552 ++++++
{audio => profiles/audio}/manager.h | 7 +-
{audio => profiles/audio}/media.c | 245 ++-
{audio => profiles/audio}/media.h | 0
{audio => profiles/audio}/player.c | 0
{audio => profiles/audio}/player.h | 0
{audio => profiles/audio}/rtp.h | 0
{audio => profiles/audio}/sink.c | 0
{audio => profiles/audio}/sink.h | 0
{audio => profiles/audio}/source.c | 0
{audio => profiles/audio}/source.h | 0
{audio => profiles/audio}/transport.c | 380 -----
{audio => profiles/audio}/transport.h | 0
39 files changed, 673 insertions(+), 12930 deletions(-)
delete mode 100644 audio/gateway.c
delete mode 100644 audio/gateway.h
delete mode 100644 audio/headset.c
delete mode 100644 audio/headset.h
delete mode 100644 audio/manager.c
delete mode 100644 audio/telephony-dummy.c
delete mode 100644 audio/telephony-maemo5.c
delete mode 100644 audio/telephony-maemo6.c
delete mode 100644 audio/telephony-ofono.c
delete mode 100644 audio/telephony.h
rename {audio => profiles/audio}/a2dp-codecs.h (100%)
rename {audio => profiles/audio}/a2dp.c (100%)
rename {audio => profiles/audio}/a2dp.h (100%)
rename {audio => profiles/audio}/audio.conf (93%)
rename {audio => profiles/audio}/avctp.c (100%)
rename {audio => profiles/audio}/avctp.h (100%)
rename {audio => profiles/audio}/avdtp.c (100%)
rename {audio => profiles/audio}/avdtp.h (100%)
rename {audio => profiles/audio}/avrcp.c (100%)
rename {audio => profiles/audio}/avrcp.h (100%)
rename {audio => profiles/audio}/control.c (100%)
rename {audio => profiles/audio}/control.h (100%)
rename {audio => profiles/audio}/device.c (69%)
rename {audio => profiles/audio}/device.h (96%)
rename {audio => profiles/audio}/main.c (53%)
create mode 100644 profiles/audio/manager.c
rename {audio => profiles/audio}/manager.h (89%)
rename {audio => profiles/audio}/media.c (91%)
rename {audio => profiles/audio}/media.h (100%)
rename {audio => profiles/audio}/player.c (100%)
rename {audio => profiles/audio}/player.h (100%)
rename {audio => profiles/audio}/rtp.h (100%)
rename {audio => profiles/audio}/sink.c (100%)
rename {audio => profiles/audio}/sink.h (100%)
rename {audio => profiles/audio}/source.c (100%)
rename {audio => profiles/audio}/source.h (100%)
rename {audio => profiles/audio}/transport.c (72%)
rename {audio => profiles/audio}/transport.h (100%)
--
1.7.11.7
^ permalink raw reply
* Re: [PATCH 1/3] avctp: Fix dead assignment in control_response
From: Luiz Augusto von Dentz @ 2012-11-13 13:14 UTC (permalink / raw)
To: Szymon Janc; +Cc: linux-bluetooth
In-Reply-To: <1352811160-12722-1-git-send-email-szymon.janc@tieto.com>
Hi Szymon,
On Tue, Nov 13, 2012 at 2:52 PM, Szymon Janc <szymon.janc@tieto.com> wrote:
> Value stored to req is never read before writing it again.
>
> ---
> audio/avctp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/audio/avctp.c b/audio/avctp.c
> index 6ba25e4..29756f6 100644
> --- a/audio/avctp.c
> +++ b/audio/avctp.c
> @@ -577,7 +577,7 @@ static void control_response(struct avctp_channel *control,
> size_t operand_count)
> {
> struct avctp_pending_req *p = control->p;
> - struct avctp_control_req *req = p->data;
> + struct avctp_control_req *req;
> GSList *l;
>
> if (p && p->transaction == avctp->transaction) {
> --
> 1.7.9.5
Pushed, thanks.
--
Luiz Augusto von Dentz
^ permalink raw reply
* Re: [PATCH BlueZ] build: Fix make distcheck for input plugin
From: Anderson Lizardo @ 2012-11-13 13:06 UTC (permalink / raw)
To: Szymon Janc; +Cc: Lucas De Marchi, linux-bluetooth@vger.kernel.org
In-Reply-To: <6569845.L3ZsFuOrP2@uw000953>
Hi Szymon,
On Tue, Nov 13, 2012 at 8:57 AM, Szymon Janc <szymon.janc@tieto.com> wrote:
>> I agree it is not the best solution. Actually, I think we can overcome
>> the problem completely by getting rid of symlinks for "drivers" (like
>> sap-{u8500,dummy}.c, suspend-dummy.c,
>> telephony-{dummy,maemo5,maemo6,ofono}.c) and having everything
>> built-in and enabled/disabled based on which D-Bus services are
>> running on the system (or, if not possible, by using config options).
>> This would also help with spotting build breakages, since all BlueZ
>> code could be compiled by a single "./bootstrap-configure && make"
>> call.
>
> All code is compiled, it is just not linked.
Sorry, I meant "linked" instead of "compiled" on my explanation. See
the original thread where this was first brought up:
http://thread.gmane.org/gmane.linux.bluez.kernel/30175/focus=30190
It is easier for testing code if it can be enabled/disabled at
runtime, instead of rebuilding with different configure options.
Regards,
--
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
^ permalink raw reply
* Re: [PATCH BlueZ] build: Fix make distcheck for input plugin
From: Anderson Lizardo @ 2012-11-13 13:02 UTC (permalink / raw)
To: Lucas De Marchi; +Cc: linux-bluetooth
In-Reply-To: <CAMOw1v58=ZfoG919+N3ARNRbr6UEmoPhRKcuzfzRELa8G=9GeQ@mail.gmail.com>
Hi Lucas,
On Tue, Nov 13, 2012 at 8:55 AM, Lucas De Marchi
<lucas.demarchi@profusion.mobi> wrote:
>> I agree it is not the best solution. Actually, I think we can overcome
>> the problem completely by getting rid of symlinks for "drivers" (like
>> sap-{u8500,dummy}.c, suspend-dummy.c,
>> telephony-{dummy,maemo5,maemo6,ofono}.c) and having everything
>> built-in and enabled/disabled based on which D-Bus services are
>> running on the system (or, if not possible, by using config options).
>
> what do you mean by "running on the system"?
In situations where it is appropriate, we have a
g_dbus_add_service_watch() which will trigger the support code
specific for that service, instead of relying on enabling the service
support at compile time. In practice the support code will be always
compiled.
For situations where the driver code is not related to any D-Bus
service, a config option (in e.g. /etc/bluetooth/<profile>.conf) could
enable/disable the support. The main benefit here is that there will
be no "dead code" that never gets compiled because bootstrap-configure
is not able to enable all drivers.
Regards,
--
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
^ permalink raw reply
* Re: [PATCH BlueZ] build: Fix make distcheck for input plugin
From: Szymon Janc @ 2012-11-13 12:57 UTC (permalink / raw)
To: Anderson Lizardo; +Cc: Lucas De Marchi, linux-bluetooth@vger.kernel.org
In-Reply-To: <CAJdJm_NsCEmcjhtfSNh8mN5keoLzTtJsdN4+bpmdtJVzPgf4-Q@mail.gmail.com>
Hi,
> > Humn... maybe we need to review these CPPFLAGS for plugins. Appending
> > it to AM_CPPFLAGS means that every single source file has
> > "-I$(srcdir)/profiles/input". Even those sources not at all related to
> > HOGPLUGIN.
> >
> > However the only way I can think to fix it is by creating convenience
> > libs since autofoo doesn't support CPPFLAGS per source file.
>
> I agree it is not the best solution. Actually, I think we can overcome
> the problem completely by getting rid of symlinks for "drivers" (like
> sap-{u8500,dummy}.c, suspend-dummy.c,
> telephony-{dummy,maemo5,maemo6,ofono}.c) and having everything
> built-in and enabled/disabled based on which D-Bus services are
> running on the system (or, if not possible, by using config options).
> This would also help with spotting build breakages, since all BlueZ
> code could be compiled by a single "./bootstrap-configure && make"
> call.
All code is compiled, it is just not linked.
--
BR
Szymon Janc
^ permalink raw reply
* Re: [PATCH BlueZ] build: Fix make distcheck for input plugin
From: Lucas De Marchi @ 2012-11-13 12:55 UTC (permalink / raw)
To: Anderson Lizardo; +Cc: linux-bluetooth
In-Reply-To: <CAJdJm_NsCEmcjhtfSNh8mN5keoLzTtJsdN4+bpmdtJVzPgf4-Q@mail.gmail.com>
On Tue, Nov 13, 2012 at 10:52 AM, Anderson Lizardo
<anderson.lizardo@openbossa.org> wrote:
> Hi Lucas,
>
> On Tue, Nov 13, 2012 at 8:21 AM, Lucas De Marchi
> <lucas.demarchi@profusion.mobi> wrote:
>> On Mon, Nov 12, 2012 at 7:03 PM, Anderson Lizardo
>> <anderson.lizardo@openbossa.org> wrote:
>>> suspend.c is a symlink generated at build time, therefore it should be
>>> created on build directory. Additionally, it is necessary to add
>>> -I$(srcdir)/profiles/input to CPPFLAGS so suspend.h can be found (the
>>> compiler does not follow symlinks prior to resolving #include
>>> directives).
>>> ---
>>> Makefile.am | 6 +++++-
>>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Makefile.am b/Makefile.am
>>> index d49e8a0..c398e74 100644
>>> --- a/Makefile.am
>>> +++ b/Makefile.am
>>> @@ -366,6 +366,10 @@ if MCAP
>>> AM_CPPFLAGS += -I$(builddir)/health
>>> endif
>>>
>>> +if HOGPLUGIN
>>> +AM_CPPFLAGS += -I$(srcdir)/profiles/input
>>> +endif
>>
>> Humn... maybe we need to review these CPPFLAGS for plugins. Appending
>> it to AM_CPPFLAGS means that every single source file has
>> "-I$(srcdir)/profiles/input". Even those sources not at all related to
>> HOGPLUGIN.
>>
>> However the only way I can think to fix it is by creating convenience
>> libs since autofoo doesn't support CPPFLAGS per source file.
>
> I agree it is not the best solution. Actually, I think we can overcome
> the problem completely by getting rid of symlinks for "drivers" (like
> sap-{u8500,dummy}.c, suspend-dummy.c,
> telephony-{dummy,maemo5,maemo6,ofono}.c) and having everything
> built-in and enabled/disabled based on which D-Bus services are
> running on the system (or, if not possible, by using config options).
what do you mean by "running on the system"?
Lucas De Marchi
^ permalink raw reply
* Re: [PATCH BlueZ] build: Fix make distcheck for input plugin
From: Anderson Lizardo @ 2012-11-13 12:52 UTC (permalink / raw)
To: Lucas De Marchi; +Cc: linux-bluetooth
In-Reply-To: <CAMOw1v4h9wfcFLL-j5+fmEUNF=ShHZryw93aOC+_8d2NsbMFag@mail.gmail.com>
Hi Lucas,
On Tue, Nov 13, 2012 at 8:21 AM, Lucas De Marchi
<lucas.demarchi@profusion.mobi> wrote:
> On Mon, Nov 12, 2012 at 7:03 PM, Anderson Lizardo
> <anderson.lizardo@openbossa.org> wrote:
>> suspend.c is a symlink generated at build time, therefore it should be
>> created on build directory. Additionally, it is necessary to add
>> -I$(srcdir)/profiles/input to CPPFLAGS so suspend.h can be found (the
>> compiler does not follow symlinks prior to resolving #include
>> directives).
>> ---
>> Makefile.am | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/Makefile.am b/Makefile.am
>> index d49e8a0..c398e74 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -366,6 +366,10 @@ if MCAP
>> AM_CPPFLAGS += -I$(builddir)/health
>> endif
>>
>> +if HOGPLUGIN
>> +AM_CPPFLAGS += -I$(srcdir)/profiles/input
>> +endif
>
> Humn... maybe we need to review these CPPFLAGS for plugins. Appending
> it to AM_CPPFLAGS means that every single source file has
> "-I$(srcdir)/profiles/input". Even those sources not at all related to
> HOGPLUGIN.
>
> However the only way I can think to fix it is by creating convenience
> libs since autofoo doesn't support CPPFLAGS per source file.
I agree it is not the best solution. Actually, I think we can overcome
the problem completely by getting rid of symlinks for "drivers" (like
sap-{u8500,dummy}.c, suspend-dummy.c,
telephony-{dummy,maemo5,maemo6,ofono}.c) and having everything
built-in and enabled/disabled based on which D-Bus services are
running on the system (or, if not possible, by using config options).
This would also help with spotting build breakages, since all BlueZ
code could be compiled by a single "./bootstrap-configure && make"
call.
This was suggested by Marcel sometime ago on the mailing list, but no
one has come up with actually implementing this.
This commit for now will fix make distcheck breakage, and in my tests
it did not break anything else.
I will propose a TODO entry for this, so someone can work on it.
Best Regards,
--
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
^ permalink raw reply
* [PATCH 3/3] network: Fix dead assignment in connect_cb
From: Szymon Janc @ 2012-11-13 12:52 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Szymon Janc
In-Reply-To: <1352811160-12722-1-git-send-email-szymon.janc@tieto.com>
Value stored to err_msg is never read in case err was not NULL.
Simply remove err_msg and pass strerror() directly where it is used.
---
profiles/network/connection.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/profiles/network/connection.c b/profiles/network/connection.c
index abcbee8..1a1fb4d 100644
--- a/profiles/network/connection.c
+++ b/profiles/network/connection.c
@@ -371,19 +371,16 @@ static int bnep_connect(struct network_conn *nc)
static void connect_cb(GIOChannel *chan, GError *err, gpointer data)
{
struct network_conn *nc = data;
- const char *err_msg;
int perr;
if (err) {
error("%s", err->message);
- err_msg = err->message;
goto failed;
}
perr = bnep_connect(nc);
if (perr < 0) {
- err_msg = strerror(-perr);
- error("bnep connect(): %s (%d)", err_msg, -perr);
+ error("bnep connect(): %s (%d)", strerror(-perr), -perr);
goto failed;
}
--
1.7.9.5
^ permalink raw reply related
* [PATCH 2/3] avrcp: Fix dead assignments in ct_set_setting
From: Szymon Janc @ 2012-11-13 12:52 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Szymon Janc
In-Reply-To: <1352811160-12722-1-git-send-email-szymon.janc@tieto.com>
Value stored in val is never read before writing it again. After
fixing val same applies to attr variable.
---
audio/avrcp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/audio/avrcp.c b/audio/avrcp.c
index e3ce2fb..2517df8 100644
--- a/audio/avrcp.c
+++ b/audio/avrcp.c
@@ -1944,8 +1944,8 @@ static bool ct_set_setting(struct media_player *mp, const char *key,
const char *value, void *user_data)
{
struct avrcp_player *player = user_data;
- int attr = attr_to_val(key);
- int val = attrval_to_val(attr, value);
+ int attr;
+ int val;
struct avrcp *session;
session = player->sessions->data;
--
1.7.9.5
^ permalink raw reply related
* [PATCH 1/3] avctp: Fix dead assignment in control_response
From: Szymon Janc @ 2012-11-13 12:52 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Szymon Janc
Value stored to req is never read before writing it again.
---
audio/avctp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/audio/avctp.c b/audio/avctp.c
index 6ba25e4..29756f6 100644
--- a/audio/avctp.c
+++ b/audio/avctp.c
@@ -577,7 +577,7 @@ static void control_response(struct avctp_channel *control,
size_t operand_count)
{
struct avctp_pending_req *p = control->p;
- struct avctp_control_req *req = p->data;
+ struct avctp_control_req *req;
GSList *l;
if (p && p->transaction == avctp->transaction) {
--
1.7.9.5
^ permalink raw reply related
* Re: [PATCH BlueZ] build: Fix make distcheck for input plugin
From: Lucas De Marchi @ 2012-11-13 12:21 UTC (permalink / raw)
To: Anderson Lizardo; +Cc: linux-bluetooth
In-Reply-To: <1352754221-29672-1-git-send-email-anderson.lizardo@openbossa.org>
On Mon, Nov 12, 2012 at 7:03 PM, Anderson Lizardo
<anderson.lizardo@openbossa.org> wrote:
> suspend.c is a symlink generated at build time, therefore it should be
> created on build directory. Additionally, it is necessary to add
> -I$(srcdir)/profiles/input to CPPFLAGS so suspend.h can be found (the
> compiler does not follow symlinks prior to resolving #include
> directives).
> ---
> Makefile.am | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index d49e8a0..c398e74 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -366,6 +366,10 @@ if MCAP
> AM_CPPFLAGS += -I$(builddir)/health
> endif
>
> +if HOGPLUGIN
> +AM_CPPFLAGS += -I$(srcdir)/profiles/input
> +endif
Humn... maybe we need to review these CPPFLAGS for plugins. Appending
it to AM_CPPFLAGS means that every single source file has
"-I$(srcdir)/profiles/input". Even those sources not at all related to
HOGPLUGIN.
However the only way I can think to fix it is by creating convenience
libs since autofoo doesn't support CPPFLAGS per source file.
Lucas De Marchi
^ permalink raw reply
* Re: [PATCH v2] neard: Set device name in cache
From: Johan Hedberg @ 2012-11-13 11:32 UTC (permalink / raw)
To: Frédéric Danis; +Cc: linux-bluetooth
In-Reply-To: <1352299230-6201-1-git-send-email-frederic.danis@linux.intel.com>
Hi Frederic,
On Wed, Nov 07, 2012, Frédéric Danis wrote:
> If device existed previously, it has been removed before calling of
> btd_event_remote_name(), so this just update storage cache and name
> property change of device object is not emitted.
> ---
> plugins/neard.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
Applied. Thanks.
Johan
^ permalink raw reply
* Re: [RFC v0 0/7] Manager/Adapter transition to ObjectManager
From: Mikel Astiz @ 2012-11-13 10:44 UTC (permalink / raw)
To: Mikel Astiz, linux-bluetooth, Mikel Astiz
In-Reply-To: <20121112192607.GA6300@x220.P-661HNU-F1>
Hi Johan,
On Mon, Nov 12, 2012 at 8:26 PM, Johan Hedberg <johan.hedberg@gmail.com> wrote:
> Hi Mikel,
>
>> > Mikel Astiz (7):
>> > manager: Expose default adapter using property
>> > manager: Remove redundant D-Bus signals
>> > manager: Remove redundant Adapters property
>> > adapter: Remove redundant D-Bus signals
>> > adapter: Remove DevicesFound signal
>> > adapter: Remove redundant Devices property
>> > adapter: Remove FindDevice method from D-Bus API
>> >
>> > doc/adapter-api.txt | 32 +--------
>> > doc/manager-api.txt | 28 +-------
>> > src/adapter.c | 187 +---------------------------------------------------
>> > src/manager.c | 103 +++++++----------------------
>> > 4 files changed, 29 insertions(+), 321 deletions(-)
>>
>> All patches except 5/7 (which needs a bit more discussion) have been
>> applied. Thanks.
>
> I had to revert all of these since I didn't realize you hadn't updated
> the test scripts (all of which broke with these patches). Also, it seems
> the DefaultAdapter patch is also broken since I never saw that property
> (e.g. with test/get-managed-objects). Please send a new patch set once
> you've got the scripts converted and the DefaultAdapter patch fixed.
> Thanks.
You're right, we should keep the test scripts in sync all the time. I
tried to warn you about this in the cover-letter but no problem, I
will send v2 with the changes you suggest.
Regarding the DefaultAdapter property, it was working for me, but I
was using the Properties interface. The test script you mention is
indeed not reporting the property, but this is because the root object
is not a "managed object", and this property is associated to the
root. This is no real issue IMO but still, for convenience reasons: do
you think we should move the org.bluez.Manager interface to some other
object path such as /adapters? As a side effect, this could make it
possible that clients filter out signals (i.e. InterfacesAdded) based
on the object path.
Cheers,
Mikel
^ permalink raw reply
* Re: [PATCH v2] gatt: Update characteristic names translation table
From: Johan Hedberg @ 2012-11-13 8:12 UTC (permalink / raw)
To: Andrzej Kaczmarek; +Cc: linux-bluetooth
In-Reply-To: <1352722128-12100-1-git-send-email-andrzej.kaczmarek@tieto.com>
Hi Andrzej,
On Mon, Nov 12, 2012, Andrzej Kaczmarek wrote:
> ---
> attrib/client.c | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
Applied. Thanks.
Johan
^ permalink raw reply
* Re: [PATCH] device: Defer write to storage
From: Johan Hedberg @ 2012-11-13 8:11 UTC (permalink / raw)
To: Frédéric Danis; +Cc: linux-bluetooth
In-Reply-To: <1352735024-2733-1-git-send-email-frederic.danis@linux.intel.com>
Hi Frederic,
On Mon, Nov 12, 2012, Frédéric Danis wrote:
> Defere write to storage using g_idle_add() to avoid multiple
> open/write/close operations when device properties are changed
> in sequence.
> ---
> src/device.c | 24 +++++++++++++++++++++---
> 1 file changed, 21 insertions(+), 3 deletions(-)
Applied after a couple of cosmetic fixes (we try to use > 0 for testing
for valid GSource IDs). Thanks.
Johan
^ permalink raw reply
* Re: [PATCH] Update dbusoob API
From: Johan Hedberg @ 2012-11-13 8:09 UTC (permalink / raw)
To: Szymon Janc; +Cc: linux-bluetooth
In-Reply-To: <1352735596-731-1-git-send-email-szymon.janc@tieto.com>
Hi Szymon,
On Mon, Nov 12, 2012, Szymon Janc wrote:
> This updates AddRemoteData method to create and return device object path.
>
> With recent change on how new device objects are created it is no
> longer possible to create device object from string with
> org.bluez.Adapter interface. When adding OOB data for specified
> address device object is created if it was not yet existing.
>
> Path to object is returned in AddRemoteData to avoid need for extra
> FindDevice() call on org.bluez.Adapter to get object maching specified
> address.
>
> Question:
> Should RemoveRemoteData be updated to accept device path instead of address?
> (and therefore require existing object, this method doesn't remove object or
> any storage data but only deletes hash/rand kept in kernel).
I'm not sure about this one. Usually passing object paths as a parameter
means you should be instead having the method on top of the object path
itself. Maybe we just keep this symmetric for now by using the address
instead.
Anyway, I went ahead and applied the AddRemoteData patch (after removing
the Change-Id tag - please remember to remove those in the future).
Johan
^ permalink raw reply
* Re: [PATCH BlueZ] build: Fix make distcheck for input plugin
From: Johan Hedberg @ 2012-11-13 8:05 UTC (permalink / raw)
To: Anderson Lizardo; +Cc: linux-bluetooth
In-Reply-To: <1352754221-29672-1-git-send-email-anderson.lizardo@openbossa.org>
Hi Lizardo,
On Mon, Nov 12, 2012, Anderson Lizardo wrote:
> suspend.c is a symlink generated at build time, therefore it should be
> created on build directory. Additionally, it is necessary to add
> -I$(srcdir)/profiles/input to CPPFLAGS so suspend.h can be found (the
> compiler does not follow symlinks prior to resolving #include
> directives).
> ---
> Makefile.am | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
Applied. Thanks.
Johan
^ permalink raw reply
* [PATCH BlueZ] build: Fix make distcheck for input plugin
From: Anderson Lizardo @ 2012-11-12 21:03 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Anderson Lizardo
suspend.c is a symlink generated at build time, therefore it should be
created on build directory. Additionally, it is necessary to add
-I$(srcdir)/profiles/input to CPPFLAGS so suspend.h can be found (the
compiler does not follow symlinks prior to resolving #include
directives).
---
Makefile.am | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index d49e8a0..c398e74 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -366,6 +366,10 @@ if MCAP
AM_CPPFLAGS += -I$(builddir)/health
endif
+if HOGPLUGIN
+AM_CPPFLAGS += -I$(srcdir)/profiles/input
+endif
+
unit_objects =
if TEST
@@ -405,7 +409,7 @@ profiles/sap/sap.c: profiles/sap/@SAP_DRIVER@
$(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@
profiles/input/suspend.c: profiles/input/@HOG_SUSPEND_DRIVER@
- $(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@
+ $(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
scripts/%.rules:
$(AM_V_GEN)cp $(subst 97-,,$@) $@
--
1.7.9.5
^ permalink raw reply related
* Re: Feedback on potential fix for issue while advertising Feature List
From: Bart Westgeest @ 2012-11-12 19:36 UTC (permalink / raw)
To: Johan Hedberg; +Cc: linux-bluetooth
In-Reply-To: <20121110122535.GA26532@x220.P-661HNU-F1>
> I think the option of looking at the length and using the old
> type for < 256 and a 16-bit type for greater lengths would be the
> safest.
Thanks for the feedback. I'll start working on a patch.
^ permalink raw reply
* Re: [RFC v0 0/7] Manager/Adapter transition to ObjectManager
From: Johan Hedberg @ 2012-11-12 19:26 UTC (permalink / raw)
To: Mikel Astiz, linux-bluetooth, Mikel Astiz
In-Reply-To: <20121112172346.GA6267@x220.P-661HNU-F1>
Hi Mikel,
> > Mikel Astiz (7):
> > manager: Expose default adapter using property
> > manager: Remove redundant D-Bus signals
> > manager: Remove redundant Adapters property
> > adapter: Remove redundant D-Bus signals
> > adapter: Remove DevicesFound signal
> > adapter: Remove redundant Devices property
> > adapter: Remove FindDevice method from D-Bus API
> >
> > doc/adapter-api.txt | 32 +--------
> > doc/manager-api.txt | 28 +-------
> > src/adapter.c | 187 +---------------------------------------------------
> > src/manager.c | 103 +++++++----------------------
> > 4 files changed, 29 insertions(+), 321 deletions(-)
>
> All patches except 5/7 (which needs a bit more discussion) have been
> applied. Thanks.
I had to revert all of these since I didn't realize you hadn't updated
the test scripts (all of which broke with these patches). Also, it seems
the DefaultAdapter patch is also broken since I never saw that property
(e.g. with test/get-managed-objects). Please send a new patch set once
you've got the scripts converted and the DefaultAdapter patch fixed.
Thanks.
Johan
^ permalink raw reply
* Re: [RFC v0 0/7] Manager/Adapter transition to ObjectManager
From: Johan Hedberg @ 2012-11-12 17:23 UTC (permalink / raw)
To: Mikel Astiz; +Cc: linux-bluetooth, Mikel Astiz
In-Reply-To: <1352385015-2127-1-git-send-email-mikel.astiz.oss@gmail.com>
Hi Mikel,
On Thu, Nov 08, 2012, Mikel Astiz wrote:
> (This is sent as RFC since I haven't done proper testing, and
> furthermore the test scripts haven't been updated)
>
> While thinking about how profile and their states should be exposed in
> D-Bus (see previous RFC), I found several potential improvements in
> the current version of the Manager and Adapter APIs.
>
> Basically, this patchset removes some properties and methods that seem
> duplicated.
>
> There are other similar methods/properties that could be simplified as
> well, but for practical reasons I started with the most obvious ones.
>
> Mikel Astiz (7):
> manager: Expose default adapter using property
> manager: Remove redundant D-Bus signals
> manager: Remove redundant Adapters property
> adapter: Remove redundant D-Bus signals
> adapter: Remove DevicesFound signal
> adapter: Remove redundant Devices property
> adapter: Remove FindDevice method from D-Bus API
>
> doc/adapter-api.txt | 32 +--------
> doc/manager-api.txt | 28 +-------
> src/adapter.c | 187 +---------------------------------------------------
> src/manager.c | 103 +++++++----------------------
> 4 files changed, 29 insertions(+), 321 deletions(-)
All patches except 5/7 (which needs a bit more discussion) have been
applied. Thanks.
Johan
^ permalink raw reply
* [PATCH] dbusoob: Create device object and return it when adding OOB data
From: Szymon Janc @ 2012-11-12 15:53 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Szymon Janc
In-Reply-To: <1352735596-731-1-git-send-email-szymon.janc@tieto.com>
With recent change on how new device objects are created it is no
longer possible to create device object from string with
org.bluez.Adapter interface. When adding OOB data for specified
address device object is created if it was not yet existing.
Path to object is returned in AddRemoteData to avoid need for extra
FindDevice() call on org.bluez.Adapter to get object maching specified
address.
Change-Id: I5c30b2a9ca981e857729f9f50f6c839ea40a1ab7
---
doc/oob-api.txt | 6 +++++-
plugins/dbusoob.c | 28 ++++++++++++++++++++++++----
2 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/doc/oob-api.txt b/doc/oob-api.txt
index c3978fc..7f73db4 100644
--- a/doc/oob-api.txt
+++ b/doc/oob-api.txt
@@ -38,11 +38,15 @@ Methods dict ReadLocalData()
org.bluez.Error.InProgress
org.bluez.Error.NotSupported
- void AddRemoteData(string address, dict data)
+ object AddRemoteData(string address, dict data)
This method adds new Out Of Band data for
specified address. If data for specified address
already exists it will be overwritten with new one.
+ If device object with given address does not exist yet
+ it will be created.
+
+ Returns the object path of device for given address.
All data is optional.
diff --git a/plugins/dbusoob.c b/plugins/dbusoob.c
index 711fbc4..b59ffa8 100644
--- a/plugins/dbusoob.c
+++ b/plugins/dbusoob.c
@@ -222,6 +222,8 @@ static DBusMessage *add_remote_data(DBusConnection *conn, DBusMessage *msg,
DBusMessageIter data;
struct oob_data remote_data;
struct btd_device *device;
+ DBusMessage *reply;
+ const char *dev_path;
if (!btd_adapter_ssp_enabled(adapter))
return btd_error_not_supported(msg);
@@ -236,19 +238,36 @@ static DBusMessage *add_remote_data(DBusConnection *conn, DBusMessage *msg,
if (bachk(remote_data.addr) < 0)
return btd_error_invalid_args(msg);
- device = adapter_find_device(adapter, remote_data.addr);
- if (device && device_is_paired(device))
+ device = adapter_get_device(adapter, remote_data.addr);
+ if (!device)
+ return btd_error_failed(msg, "Creating device object failed");
+
+ if (device_is_paired(device))
return btd_error_already_exists(msg);
dbus_message_iter_recurse(&args, &data);
+ /*
+ * TODO
+ * Should device object be destroyed if parsing or storing failed?
+ */
+
if (!parse_data(&data, &remote_data))
return btd_error_invalid_args(msg);
if (!store_data(adapter, &remote_data))
return btd_error_failed(msg, "Request failed");
- return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
+ reply = dbus_message_new_method_return(msg);
+ if (!reply)
+ return NULL;
+
+ dev_path = device_get_path(device);
+
+ dbus_message_append_args(reply, DBUS_TYPE_OBJECT_PATH, &dev_path,
+ DBUS_TYPE_INVALID);
+
+ return reply;
}
static DBusMessage *remove_remote_data(DBusConnection *conn, DBusMessage *msg,
@@ -277,7 +296,8 @@ static DBusMessage *remove_remote_data(DBusConnection *conn, DBusMessage *msg,
static const GDBusMethodTable oob_methods[] = {
{ GDBUS_METHOD("AddRemoteData",
GDBUS_ARGS({ "address", "s" }, { "data", "a{sv}"}),
- NULL, add_remote_data) },
+ GDBUS_ARGS({ "device", "o" }),
+ add_remote_data) },
{ GDBUS_METHOD("RemoveRemoteData",
GDBUS_ARGS({ "address", "s" }), NULL,
remove_remote_data) },
--
1.7.9.5
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox