[pulseaudio-discuss] [RFC 19/24] bluetooth: Create sink and source for PROFILE_HFP_AG
jprvita at gmail.com
jprvita at gmail.com
Tue Mar 26 22:16:58 PDT 2013
From: João Paulo Rechi Vita <jprvita at openbossa.org>
---
src/modules/bluetooth/module-bluetooth-device.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index 1ec4f79..1027dd5 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -1585,6 +1585,7 @@ static int add_sink(struct userdata *u) {
pa_assert_not_reached(); /* Profile switch should have failed */
break;
case PROFILE_HFGW:
+ case PROFILE_HFP_AG:
data.suspend_cause = PA_SUSPEND_USER;
break;
case PROFILE_A2DP_SOURCE:
@@ -1657,6 +1658,7 @@ static int add_source(struct userdata *u) {
break;
case PROFILE_A2DP_SOURCE:
case PROFILE_HFGW:
+ case PROFILE_HFP_AG:
data.suspend_cause = PA_SUSPEND_USER;
break;
case PROFILE_A2DP:
@@ -1677,7 +1679,7 @@ static int add_source(struct userdata *u) {
u->source->set_port = source_set_port_cb;
}
- if ((u->profile == PROFILE_HSP) || (u->profile == PROFILE_HFGW)) {
+ if ((u->profile == PROFILE_HSP) || (u->profile == PROFILE_HFGW) || (u->profile == PROFILE_HFP_AG)) {
pa_bluetooth_transport *t = u->transport;
pa_proplist_sets(u->source->proplist, "bluetooth.nrec", t->nrec ? "1" : "0");
}
@@ -1869,13 +1871,15 @@ static int init_profile(struct userdata *u) {
if (u->profile == PROFILE_A2DP ||
u->profile == PROFILE_HSP ||
- u->profile == PROFILE_HFGW)
+ u->profile == PROFILE_HFGW ||
+ u->profile == PROFILE_HFP_AG)
if (add_sink(u) < 0)
r = -1;
if (u->profile == PROFILE_HSP ||
u->profile == PROFILE_A2DP_SOURCE ||
- u->profile == PROFILE_HFGW)
+ u->profile == PROFILE_HFGW ||
+ u->profile == PROFILE_HFP_AG)
if (add_source(u) < 0)
r = -1;
--
1.7.11.7
More information about the pulseaudio-discuss
mailing list