]> code.delx.au - pulseaudio/blobdiff - src/modules/alsa/module-alsa-source.c
volume: Rename 'sync volume' to 'deferred volume'.
[pulseaudio] / src / modules / alsa / module-alsa-source.c
index e6b27b3dce947af8a71a72f2ee02d278de33226a..628e6313a95c12e0cf2f48f89cc79a1cf83ff327 100644 (file)
 #include <valgrind/memcheck.h>
 #endif
 
-#include <pulse/xmalloc.h>
-#include <pulse/util.h>
-#include <pulse/timeval.h>
-
-#include <pulsecore/core-error.h>
-#include <pulsecore/core.h>
 #include <pulsecore/module.h>
-#include <pulsecore/memchunk.h>
-#include <pulsecore/sink.h>
 #include <pulsecore/modargs.h>
-#include <pulsecore/core-util.h>
-#include <pulsecore/sample-util.h>
 #include <pulsecore/log.h>
 #include <pulsecore/macro.h>
-#include <pulsecore/thread.h>
-#include <pulsecore/core-error.h>
-#include <pulsecore/thread-mq.h>
-#include <pulsecore/rtpoll.h>
-#include <pulsecore/time-smoother.h>
-#include <pulsecore/rtclock.h>
 
 #include "alsa-util.h"
 #include "alsa-source.h"
@@ -64,6 +48,8 @@ PA_MODULE_LOAD_ONCE(FALSE);
 PA_MODULE_USAGE(
         "name=<name for the source, to be prefixed> "
         "source_name=<name for the source> "
+        "source_properties=<properties for the source> "
+        "namereg_fail=<when false attempt to synthesise new source_name if it is already taken> "
         "device=<ALSA device> "
         "device_id=<ALSA card index> "
         "format=<sample format> "
@@ -77,11 +63,16 @@ PA_MODULE_USAGE(
         "tsched_buffer_size=<buffer size when using timer based scheduling> "
         "tsched_buffer_watermark=<upper fill watermark> "
         "ignore_dB=<ignore dB information from the device?> "
-        "control=<name of mixer control>");
+        "control=<name of mixer control>"
+        "deferred_volume=<Synchronize software and hardware volume changes to avoid momentary jumps?> "
+        "deferred_volume_safety_margin=<usec adjustment depending on volume direction> "
+        "deferred_volume_extra_delay=<usec adjustment to HW volume changes>");
 
 static const char* const valid_modargs[] = {
     "name",
     "source_name",
+    "source_properties",
+    "namereg_fail",
     "device",
     "device_id",
     "format",
@@ -96,6 +87,9 @@ static const char* const valid_modargs[] = {
     "tsched_buffer_watermark",
     "ignore_dB",
     "control",
+    "deferred_volume",
+    "deferred_volume_safety_margin",
+    "deferred_volume_extra_delay",
     NULL
 };
 
@@ -104,8 +98,7 @@ int pa__init(pa_module*m) {
 
     pa_assert(m);
 
-    pa_alsa_redirect_errors_inc();
-    snd_config_update_free_global();
+    pa_alsa_refcnt_inc();
 
     if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
         pa_log("Failed to parse module arguments");
@@ -146,6 +139,5 @@ void pa__done(pa_module*m) {
     if ((source = m->userdata))
         pa_alsa_source_free(source);
 
-    snd_config_update_free_global();
-    pa_alsa_redirect_errors_dec();
+    pa_alsa_refcnt_dec();
 }