]> code.delx.au - pulseaudio/blobdiff - src/modules/module-switch-on-port-available.c
bluetooth: Don't mark device valid before it has an adapter
[pulseaudio] / src / modules / module-switch-on-port-available.c
index 35cecea85abff62e76211821eec1c91953df7922..dac599fa29435c391c6d669b99630f9c9e23de55 100644 (file)
@@ -121,7 +121,7 @@ static int try_to_switch_profile(pa_device_port *port) {
         return -1;
     }
 
-    if (pa_card_set_profile(port->card, best_profile->name, FALSE) != 0) {
+    if (pa_card_set_profile(port->card, best_profile->name, false) != 0) {
         pa_log_debug("Could not set profile %s", best_profile->name);
         return -1;
     }
@@ -129,8 +129,7 @@ static int try_to_switch_profile(pa_device_port *port) {
     return 0;
 }
 
-static void find_sink_and_source(pa_card *card, pa_device_port *port, pa_sink **si, pa_source **so)
-{
+static void find_sink_and_source(pa_card *card, pa_device_port *port, pa_sink **si, pa_source **so) {
     pa_sink *sink = NULL;
     pa_source *source = NULL;
     uint32_t state;
@@ -158,7 +157,7 @@ static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port
     pa_card* card;
     pa_sink *sink;
     pa_source *source;
-    pa_bool_t is_active_profile, is_active_port;
+    bool is_active_profile, is_active_port;
 
     if (port->available == PA_AVAILABLE_UNKNOWN)
         return PA_HOOK_OK;
@@ -197,9 +196,9 @@ static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port
         }
 
         if (source)
-            pa_source_set_port(source, port->name, FALSE);
+            pa_source_set_port(source, port->name, false);
         if (sink)
-            pa_sink_set_port(sink, port->name, FALSE);
+            pa_sink_set_port(sink, port->name, false);
     }
 
     if (port->available == PA_AVAILABLE_NO) {
@@ -207,7 +206,7 @@ static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port
             pa_device_port *p2 = find_best_port(sink->ports);
 
             if (p2 && p2->available != PA_AVAILABLE_NO)
-                pa_sink_set_port(sink, p2->name, FALSE);
+                pa_sink_set_port(sink, p2->name, false);
             else {
                 /* Maybe try to switch to another profile? */
             }
@@ -217,7 +216,7 @@ static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port
             pa_device_port *p2 = find_best_port(source->ports);
 
             if (p2 && p2->available != PA_AVAILABLE_NO)
-                pa_source_set_port(source, p2->name, FALSE);
+                pa_source_set_port(source, p2->name, false);
             else {
                 /* Maybe try to switch to another profile? */
             }
@@ -287,7 +286,6 @@ static pa_hook_result_t source_new_hook_callback(pa_core *c, pa_source_new_data
     return PA_HOOK_OK;
 }
 
-
 int pa__init(pa_module*m) {
     struct userdata *u;