[pulseaudio-commits] 2 commits - src/modules
Tanu Kaskinen
tanuk at kemper.freedesktop.org
Sun May 25 03:09:03 PDT 2014
src/modules/bluetooth/module-bluetooth-policy.c | 15 ++++++++++-----
src/modules/bluetooth/module-bluez5-device.c | 4 +---
2 files changed, 11 insertions(+), 8 deletions(-)
New commits:
commit 09933e582bf2c17b7cff0e3bb21992fd6539868c
Author: João Paulo Rechi Vita <jprvita at gmail.com>
Date: Tue Feb 4 19:03:47 2014 -0300
bluetooth: Change BlueZ 5 card profile name from a2dp to a2dp_sink
This name is more acurate with regards of what role we're currently
playing and we've already been using it in
pa_bluetooth_profile_to_string() since 449d6cb.
diff --git a/src/modules/bluetooth/module-bluetooth-policy.c b/src/modules/bluetooth/module-bluetooth-policy.c
index 0031ccf..6837f0d 100644
--- a/src/modules/bluetooth/module-bluetooth-policy.c
+++ b/src/modules/bluetooth/module-bluetooth-policy.c
@@ -172,7 +172,8 @@ static pa_hook_result_t profile_available_hook_callback(pa_core *c, pa_card_prof
return PA_HOOK_OK;
/* Do not automatically switch profiles for headsets, just in case */
- if (pa_streq(profile->name, "hsp") || pa_streq(profile->name, "a2dp"))
+ /* TODO: remove a2dp when we decide to remove support for BlueZ 4 */
+ if (pa_streq(profile->name, "hsp") || pa_streq(profile->name, "a2dp") || pa_streq(profile->name, "a2dp_sink"))
return PA_HOOK_OK;
is_active_profile = card->active_profile == profile;
diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
index 857a972..1967325 100644
--- a/src/modules/bluetooth/module-bluez5-device.c
+++ b/src/modules/bluetooth/module-bluez5-device.c
@@ -1524,9 +1524,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
pa_assert_se(output_port = pa_hashmap_get(ports, u->output_port_name));
if (pa_streq(uuid, PA_BLUETOOTH_UUID_A2DP_SINK)) {
- /* TODO: Change this profile's name to a2dp_sink, to reflect the remote
- * device's role and be consistent with the a2dp source profile */
- cp = pa_card_profile_new("a2dp", _("High Fidelity Playback (A2DP Sink)"), sizeof(pa_bluetooth_profile_t));
+ cp = pa_card_profile_new("a2dp_sink", _("High Fidelity Playback (A2DP Sink)"), sizeof(pa_bluetooth_profile_t));
cp->priority = 10;
cp->n_sinks = 1;
cp->n_sources = 0;
commit 7fe34cff61f575bdd420b8f8b373c14177e04a0b
Author: João Paulo Rechi Vita <jprvita at gmail.com>
Date: Tue Feb 4 19:03:46 2014 -0300
bluetooth: Fix lines going over column 128
diff --git a/src/modules/bluetooth/module-bluetooth-policy.c b/src/modules/bluetooth/module-bluetooth-policy.c
index 06f9f1c..0031ccf 100644
--- a/src/modules/bluetooth/module-bluetooth-policy.c
+++ b/src/modules/bluetooth/module-bluetooth-policy.c
@@ -89,7 +89,8 @@ static pa_hook_result_t source_put_hook_callback(pa_core *c, pa_source *source,
}
/* Load module-loopback */
- args = pa_sprintf_malloc("source=\"%s\" source_dont_move=\"true\" sink_input_properties=\"media.role=%s\"", source->name, role);
+ args = pa_sprintf_malloc("source=\"%s\" source_dont_move=\"true\" sink_input_properties=\"media.role=%s\"", source->name,
+ role);
(void) pa_module_load(c, "module-loopback", args);
pa_xfree(args);
@@ -126,7 +127,8 @@ static pa_hook_result_t sink_put_hook_callback(pa_core *c, pa_sink *sink, void *
}
/* Load module-loopback */
- args = pa_sprintf_malloc("sink=\"%s\" sink_dont_move=\"true\" source_output_properties=\"media.role=%s\"", sink->name, role);
+ args = pa_sprintf_malloc("sink=\"%s\" sink_dont_move=\"true\" source_output_properties=\"media.role=%s\"", sink->name,
+ role);
(void) pa_module_load(c, "module-loopback", args);
pa_xfree(args);
@@ -239,9 +241,11 @@ int pa__init(pa_module *m) {
goto fail;
}
- u->source_put_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_PUT], PA_HOOK_NORMAL, (pa_hook_cb_t) source_put_hook_callback, u);
+ u->source_put_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_PUT], PA_HOOK_NORMAL,
+ (pa_hook_cb_t) source_put_hook_callback, u);
- u->sink_put_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_PUT], PA_HOOK_NORMAL, (pa_hook_cb_t) sink_put_hook_callback, u);
+ u->sink_put_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_PUT], PA_HOOK_NORMAL,
+ (pa_hook_cb_t) sink_put_hook_callback, u);
u->profile_available_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_CARD_PROFILE_AVAILABLE_CHANGED],
PA_HOOK_NORMAL, (pa_hook_cb_t) profile_available_hook_callback, u);
More information about the pulseaudio-commits
mailing list