bluetooth: load bluetooth device with connected profile
authorMarc-André Lureau <marc-andre.lureau@nokia.com>
Thu, 19 Mar 2009 12:15:38 +0000 (14:15 +0200)
committerMarc-André Lureau <marc-andre.lureau@nokia.com>
Thu, 19 Mar 2009 15:33:33 +0000 (17:33 +0200)
src/modules/bluetooth/module-bluetooth-discover.c

index 521a9127b629c78241eb59da041a7b85736ecf18..4586d8ca36e44d9506ad3588dd0c921186cb8a70 100644 (file)
@@ -75,7 +75,7 @@ static void load_module_for_device(struct userdata *u, pa_bluetooth_device *d, p
 
             /* Oh, awesome, a new device has shown up and been connected! */
 
-            args = pa_sprintf_malloc("address=\"%s\" path=\"%s\"", d->address, d->path);
+            args = pa_sprintf_malloc("address=\"%s\" path=\"%s\" profile=\"%s\"", d->address, d->path, d->headset_connected ? "hsp" : "a2dp");
 
             if (pa_modargs_get_value(u->modargs, "sco_sink", NULL) &&
                 pa_modargs_get_value(u->modargs, "sco_source", NULL)) {