summaryrefslogtreecommitdiffstats
path: root/src/modules/module-hal-detect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/module-hal-detect.c')
-rw-r--r--src/modules/module-hal-detect.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/src/modules/module-hal-detect.c b/src/modules/module-hal-detect.c
index 79758b92..18519131 100644
--- a/src/modules/module-hal-detect.c
+++ b/src/modules/module-hal-detect.c
@@ -55,16 +55,16 @@ PA_MODULE_AUTHOR("Shahms King");
PA_MODULE_DESCRIPTION("Detect available audio hardware and load matching drivers");
PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_LOAD_ONCE(TRUE);
-#if defined(HAVE_ALSA) && defined(HAVE_OSS)
+#if defined(HAVE_ALSA) && defined(HAVE_OSS_OUTPUT)
PA_MODULE_USAGE("api=<alsa or oss> "
"tsched=<enable system timer based scheduling mode?>"
- "subdevs=<init all subdevices>");
+ "subdevices=<init all subdevices>");
#elif defined(HAVE_ALSA)
PA_MODULE_USAGE("api=<alsa> "
"tsched=<enable system timer based scheduling mode?>");
-#elif defined(HAVE_OSS)
+#elif defined(HAVE_OSS_OUTPUT)
PA_MODULE_USAGE("api=<oss>"
- "subdevs=<init all subdevices>");
+ "subdevices=<init all subdevices>");
#endif
PA_MODULE_DEPRECATED("Please use module-udev-detect instead of module-hal-detect!");
@@ -84,7 +84,7 @@ struct userdata {
#ifdef HAVE_ALSA
pa_bool_t use_tsched;
#endif
-#ifdef HAVE_OSS
+#ifdef HAVE_OSS_OUTPUT
pa_bool_t init_subdevs;
#endif
};
@@ -97,8 +97,8 @@ static const char* const valid_modargs[] = {
#ifdef HAVE_ALSA
"tsched",
#endif
-#ifdef HAVE_OSS
- "subdevs",
+#ifdef HAVE_OSS_OUTPUT
+ "subdevices",
#endif
NULL
};
@@ -270,7 +270,7 @@ fail:
#endif
-#ifdef HAVE_OSS
+#ifdef HAVE_OSS_OUTPUT
static pa_bool_t hal_oss_device_is_pcm(LibHalContext *context, const char *udi, pa_bool_t init_subdevices) {
char *class = NULL, *dev = NULL, *e;
@@ -402,7 +402,7 @@ static struct device* hal_device_add(struct userdata *u, const char *udi) {
if (pa_streq(u->capability, CAPABILITY_ALSA))
r = hal_device_load_alsa(u, udi, d);
#endif
-#ifdef HAVE_OSS
+#ifdef HAVE_OSS_OUTPUT
if (pa_streq(u->capability, CAPABILITY_OSS))
r = hal_device_load_oss(u, udi, d);
#endif
@@ -435,9 +435,7 @@ static int hal_device_add_all(struct userdata *u) {
int i;
for (i = 0; i < n; i++) {
- struct device *d;
-
- if ((d = hal_device_add(u, udis[i]))) {
+ if (hal_device_add(u, udis[i])) {
count++;
pa_log_debug("Loaded device %s", udis[i]);
} else
@@ -623,8 +621,6 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, vo
}
- return DBUS_HANDLER_RESULT_HANDLED;
-
} else if (dbus_message_is_signal(message, "org.pulseaudio.Server", "DirtyGiveUpMessage")) {
/* We use this message to avoid a dirty race condition when we
get an ACLAdded message before the previously owning PA
@@ -668,7 +664,6 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, vo
/* Yes, we don't check the UDI for validity, but hopefully HAL will */
device_added_cb(u->context, udi);
- return DBUS_HANDLER_RESULT_HANDLED;
}
finish:
@@ -761,7 +756,7 @@ int pa__init(pa_module*m) {
api = pa_modargs_get_value(ma, "api", "oss");
#endif
-#ifdef HAVE_OSS
+#ifdef HAVE_OSS_OUTPUT
if (pa_streq(api, "oss"))
u->capability = CAPABILITY_OSS;
#endif
@@ -771,9 +766,9 @@ int pa__init(pa_module*m) {
goto fail;
}
-#ifdef HAVE_OSS
- if (pa_modargs_get_value_boolean(ma, "subdevs", &u->init_subdevs) < 0) {
- pa_log("Failed to parse subdevs argument.");
+#ifdef HAVE_OSS_OUTPUT
+ if (pa_modargs_get_value_boolean(ma, "subdevices", &u->init_subdevs) < 0) {
+ pa_log("Failed to parse subdevices= argument.");
goto fail;
}
#endif