if we get access to a device we don't know yet, add it to our tree instead of ignoring it
authorLennart Poettering <lennart@poettering.net>
Thu, 9 Aug 2007 21:06:08 +0000 (21:06 +0000)
committerLennart Poettering <lennart@poettering.net>
Thu, 9 Aug 2007 21:06:08 +0000 (21:06 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1601 fefdeb5f-60dc-0310-8127-8f9354f1896f

src/modules/module-hal-detect.c

index ca22d70..6e1697f 100644 (file)
@@ -551,7 +551,9 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, vo
                     if ((source = pa_namereg_get(u->core, d->source_name, PA_NAMEREG_SOURCE, 0)))
                         pa_source_suspend(source, suspend);
                 }
-            }
+                
+            } else if (!suspend)
+                hal_device_add(u, udi);
 
         }
         
@@ -643,7 +645,7 @@ int pa__init(pa_core *c, pa_module*m) {
     n = hal_device_add_all(u, CAPABILITY_ALSA);
 #endif
 #if defined(HAVE_ALSA) && defined(HAVE_OSS)
-    if (n <= 0)
+    if (!u->capability)
 #endif        
 #ifdef HAVE_OSS
         n += hal_device_add_all(u, CAPABILITY_OSS);