udev-detect: Add fixed_latency_msec parameter 21/301021/5 accepted/tizen/unified/20231115.024821
authorJaechul Lee <jcsing.lee@samsung.com>
Tue, 7 Nov 2023 06:51:12 +0000 (15:51 +0900)
committerJaechul Lee <jcsing.lee@samsung.com>
Mon, 13 Nov 2023 01:12:39 +0000 (10:12 +0900)
fixed_latency_msec param was added to the udev-detect module.
The default value of the param is 50msec.

[Version] 15.0-25
[Issue Type] Update

Change-Id: I67fe4e1bbdc1f45d29aecbb8fbeab7a8d7b2288f
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
packaging/pulseaudio.spec
src/modules/alsa/module-alsa-card.c
src/modules/module-udev-detect.c

index aad2aec..324acde 100644 (file)
@@ -4,7 +4,7 @@
 Name:             pulseaudio
 Summary:          Improved Linux sound server
 Version:          15.0
-Release:          24
+Release:          25
 Group:            Multimedia/Audio
 License:          LGPL-2.1
 URL:              http://pulseaudio.org
index 8ffc03a..cbdc99d 100755 (executable)
@@ -76,6 +76,7 @@ PA_MODULE_USAGE(
         "control=<name of mixer control> "
 #ifdef __TIZEN__
         "use_tizen_hal=<use tizen hal through tizenaudio-sink2/source2>"
+        "fixed_latency_msec=<use fixed latency in milliseconds>"
 #endif
 );
 
@@ -108,6 +109,7 @@ static const char* const valid_modargs[] = {
     "control",
 #ifdef __TIZEN__
     "use_tizen_hal",
+    "fixed_latency_msec",
 #endif
     NULL
 };
index ad76f12..b7b57ea 100644 (file)
 #include <pulsecore/ratelimit.h>
 #include <pulsecore/strbuf.h>
 
+#ifdef __TIZEN__
+#define DEFAULT_FRAGMENT_MSEC                50
+#endif
+
 PA_MODULE_AUTHOR("Lennart Poettering");
 PA_MODULE_DESCRIPTION("Detect available audio hardware and load matching drivers");
 PA_MODULE_VERSION(PACKAGE_VERSION);
@@ -50,6 +54,7 @@ PA_MODULE_USAGE(
         "avoid_resampling=<use stream original sample rate if possible?>"
 #ifdef __TIZEN__
         "use_tizen_hal=<use tizen hal through tizenaudio-sink2/source2, it must be 'both', 'sink', 'source'>"
+        "fixed_latency_msec=<use fixed latency based on millisecond>"
 #endif
         );
 
@@ -85,6 +90,7 @@ struct userdata {
     pa_io_event *inotify_io;
 #ifdef __TIZEN__
     char *use_tizen_hal;
+    uint32_t fixed_latency_msec;
 #endif
 };
 
@@ -98,6 +104,7 @@ static const char* const valid_modargs[] = {
     "avoid_resampling",
 #ifdef __TIZEN__
     "use_tizen_hal",
+    "fixed_latency_msec",
 #endif
     NULL
 };
@@ -420,6 +427,7 @@ static void card_changed(struct userdata *u, struct udev_device *dev) {
                      "card_name=\"%s\" "
 #ifdef __TIZEN__
                      "use_tizen_hal=\"%s\" "
+                     "fixed_latency_msec=%d "
 #endif
                      "namereg_fail=false "
                      "tsched=%s "
@@ -434,6 +442,7 @@ static void card_changed(struct userdata *u, struct udev_device *dev) {
                      d->card_name,
 #ifdef __TIZEN__
                      u->use_tizen_hal,
+                     u->fixed_latency_msec,
 #endif
                      pa_yes_no(u->use_tsched),
                      pa_yes_no(u->fixed_latency_range),
@@ -923,6 +932,8 @@ int pa__init(pa_module *m) {
 
 #ifdef __TIZEN__
     u->use_tizen_hal = pa_xstrdup(pa_modargs_get_value(ma, "use_tizen_hal", "empty"));
+    u->fixed_latency_msec = DEFAULT_FRAGMENT_MSEC;
+    pa_modargs_get_value_u32(ma, "fixed_latency_msec", &u->fixed_latency_msec);
 #endif
 
     if (!(u->udev = udev_new())) {