]> code.delx.au - pulseaudio/commitdiff
bluetooth: Create ports before card profiles
authorMikel Astiz <mikel.astiz@bmw-carit.de>
Mon, 20 May 2013 09:48:32 +0000 (11:48 +0200)
committerDavid Henningsson <david.henningsson@canonical.com>
Tue, 21 May 2013 12:46:31 +0000 (14:46 +0200)
Both operations are currently independent and their order can therefore
be swapped.

src/modules/bluetooth/module-bluetooth-device.c

index c877df28e5d69bd1b90e2b2854d5bede9dbc3d7d..47bed2ff1fb57ee44e4b6c555ed2865250ad284b 100644 (file)
@@ -2252,6 +2252,8 @@ static int add_card(struct userdata *u) {
         return -1;
     }
 
+    create_card_ports(u, data.ports);
+
     PA_LLIST_FOREACH(uuid, device->uuids) {
         p = create_card_profile(u, uuid->uuid);
 
@@ -2268,8 +2270,6 @@ static int add_card(struct userdata *u) {
 
     pa_assert(!pa_hashmap_isempty(data.profiles));
 
-    create_card_ports(u, data.ports);
-
     p = pa_card_profile_new("off", _("Off"), sizeof(enum profile));
     p->available = PA_AVAILABLE_YES;
     d = PA_CARD_PROFILE_DATA(p);