[PATCH] bluetooth: set availability for the ports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: poljar <poljarinho@xxxxxxxxx>

The ports on the bluetooth device should be always available since
there is only one port per profile for both directions.
---
 src/modules/bluetooth/module-bluetooth-device.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index d62cf06..a7b8cb6 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -2767,6 +2767,7 @@ static void create_ports_for_profile(struct userdata *u, pa_card_new_data *card_
             port->is_output = 1;
             port->is_input = 0;
             port->priority = profile->priority * 100;
+            pa_device_port_set_available(port, PA_PORT_AVAILABLE_YES);
             pa_hashmap_put(port->profiles, profile->name, profile);
             break;
 
@@ -2776,6 +2777,7 @@ static void create_ports_for_profile(struct userdata *u, pa_card_new_data *card_
             port->is_output = 0;
             port->is_input = 1;
             port->priority = profile->priority * 100;
+            pa_device_port_set_available(port, PA_PORT_AVAILABLE_YES);
             pa_hashmap_put(port->profiles, profile->name, profile);
             break;
 
@@ -2785,6 +2787,7 @@ static void create_ports_for_profile(struct userdata *u, pa_card_new_data *card_
             port->is_output = 1;
             port->is_input = 0;
             port->priority = profile->priority * 100;
+            pa_device_port_set_available(port, PA_PORT_AVAILABLE_YES);
             pa_hashmap_put(port->profiles, profile->name, profile);
 
             pa_assert_se(port = pa_device_port_new(u->core, "hsp-input", _("Bluetooth Telephony (HSP/HFP)"), 0));
@@ -2792,6 +2795,7 @@ static void create_ports_for_profile(struct userdata *u, pa_card_new_data *card_
             port->is_output = 0;
             port->is_input = 1;
             port->priority = profile->priority * 100;
+            pa_device_port_set_available(port, PA_PORT_AVAILABLE_YES);
             pa_hashmap_put(port->profiles, profile->name, profile);
             break;
 
@@ -2801,6 +2805,7 @@ static void create_ports_for_profile(struct userdata *u, pa_card_new_data *card_
             port->is_output = 1;
             port->is_input = 0;
             port->priority = profile->priority * 100;
+            pa_device_port_set_available(port, PA_PORT_AVAILABLE_YES);
             pa_hashmap_put(port->profiles, profile->name, profile);
 
             pa_assert_se(port = pa_device_port_new(u->core, "hfgw-input", _("Bluetooth Handsfree Gateway"), 0));
@@ -2808,6 +2813,7 @@ static void create_ports_for_profile(struct userdata *u, pa_card_new_data *card_
             port->is_output = 0;
             port->is_input = 1;
             port->priority = profile->priority * 100;
+            pa_device_port_set_available(port, PA_PORT_AVAILABLE_YES);
             pa_hashmap_put(port->profiles, profile->name, profile);
             break;
 
-- 
1.7.10.4



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux