Changes of Revision 7

pipewire-aptx.changes Changed
x
 
1
@@ -1,4 +1,9 @@
2
 -------------------------------------------------------------------
3
+Wed Apr 20 11:17:00 UTC 2022 - Bjørn Lie <zaitor@opensuse.org>
4
+
5
+- Update to version 0.3.50
6
+
7
+-------------------------------------------------------------------
8
 Mon Apr  4 15:18:29 UTC 2022 - Bjørn Lie <zaitor@opensuse.org>
9
 
10
 - Update to version 0.3.49
11
pipewire-aptx.spec Changed
10
 
1
@@ -7,7 +7,7 @@
2
 %define soversion 0_2
3
 
4
 Name:           pipewire-aptx
5
-Version:        0.3.49
6
+Version:        0.3.50
7
 Release:        0
8
 Summary:        PipeWire Bluetooth aptX codec plugin
9
 License:        MIT
10
pipewire-0.3.49.tar.gz/spa/plugins/alsa/dll.h Deleted
73
 
1
@@ -1,71 +0,0 @@
2
-/* Simple DLL
3
- *
4
- * Copyright © 2019 Wim Taymans
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a
7
- * copy of this software and associated documentation files (the "Software"),
8
- * to deal in the Software without restriction, including without limitation
9
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
- * and/or sell copies of the Software, and to permit persons to whom the
11
- * Software is furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice (including the next
14
- * paragraph) shall be included in all copies or substantial portions of the
15
- * Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
20
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23
- * DEALINGS IN THE SOFTWARE.
24
- */
25
-
26
-#ifndef SPA_DLL_H
27
-#define SPA_DLL_H
28
-
29
-#ifdef __cplusplus
30
-extern "C" {
31
-#endif
32
-
33
-#include <stddef.h>
34
-#include <math.h>
35
-
36
-#define SPA_DLL_BW_MAX     0.128
37
-#define SPA_DLL_BW_MIN     0.016
38
-
39
-struct spa_dll {
40
-   double bw;
41
-   double z1, z2, z3;
42
-   double w0, w1, w2;
43
-};
44
-
45
-static inline void spa_dll_init(struct spa_dll *dll)
46
-{
47
-   dll->bw = 0.0;
48
-   dll->z1 = dll->z2 = dll->z3 = 0.0;
49
-}
50
-
51
-static inline void spa_dll_set_bw(struct spa_dll *dll, double bw, uint32_t period, uint32_t rate)
52
-{
53
-   double w = 2 * M_PI * bw * period / rate;
54
-   dll->w0 = 1.0 - exp (-20.0 * w);
55
-   dll->w1 = w * 1.5 / period;
56
-   dll->w2 = w / 1.5;
57
-   dll->bw = bw;
58
-}
59
-
60
-static inline double spa_dll_update(struct spa_dll *dll, double err)
61
-{
62
-   dll->z1 += dll->w0 * (dll->w1 * err - dll->z1);
63
-   dll->z2 += dll->w0 * (dll->z1 - dll->z2);
64
-   dll->z3 += dll->w2 * dll->z2;
65
-   return 1.0 - (dll->z2 + dll->z3);
66
-}
67
-
68
-#ifdef __cplusplus
69
-} /* extern "C" */
70
-#endif
71
-
72
-#endif /* SPA_DLL_H */
73
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/registry.h Deleted
56
 
1
@@ -1,54 +0,0 @@
2
-/* PipeWire
3
- *
4
- * Copyright © 2021 Wim Taymans <wim.taymans@gmail.com>
5
- * Copyright © 2021 Arun Raghavan <arun@asymptotic.io>
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a
8
- * copy of this software and associated documentation files (the "Software"),
9
- * to deal in the Software without restriction, including without limitation
10
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11
- * and/or sell copies of the Software, and to permit persons to whom the
12
- * Software is furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice (including the next
15
- * paragraph) shall be included in all copies or substantial portions of the
16
- * Software.
17
- *
18
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
21
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24
- * DEALINGS IN THE SOFTWARE.
25
- */
26
-
27
-#ifndef PIPEWIRE_PULSE_MODULE_REGISTRY_H
28
-#define PIPEWIRE_PULSE_MODULE_REGISTRY_H
29
-
30
-struct impl;
31
-
32
-struct module *create_module_always_sink(struct impl *impl, const char *argument);
33
-struct module *create_module_combine_sink(struct impl *impl, const char *argument);
34
-struct module *create_module_echo_cancel(struct impl *impl, const char *argument);
35
-struct module *create_module_ladspa_sink(struct impl *impl, const char *argument);
36
-struct module *create_module_ladspa_source(struct impl *impl, const char *argument);
37
-struct module *create_module_loopback(struct impl *impl, const char *argument);
38
-struct module *create_module_native_protocol_tcp(struct impl *impl, const char *argument);
39
-struct module *create_module_null_sink(struct impl *impl, const char *argument);
40
-struct module *create_module_raop_discover(struct impl *impl, const char *argument);
41
-struct module *create_module_remap_sink(struct impl *impl, const char *argument);
42
-struct module *create_module_remap_source(struct impl *impl, const char *argument);
43
-struct module *create_module_tunnel_sink(struct impl *impl, const char *argument);
44
-struct module *create_module_tunnel_source(struct impl *impl, const char *argument);
45
-struct module *create_module_simple_protocol_tcp(struct impl *impl, const char *argument);
46
-struct module *create_module_switch_on_connect(struct impl *impl, const char *argument);
47
-struct module *create_module_pipe_source(struct impl *impl, const char *argument);
48
-struct module *create_module_pipe_sink(struct impl *impl, const char *argument);
49
-struct module *create_module_zeroconf_discover(struct impl *impl, const char *argument);
50
-struct module *create_module_zeroconf_publish(struct impl *impl, const char *argument);
51
-struct module *create_module_roc_sink(struct impl *impl, const char *argument);
52
-struct module *create_module_roc_source(struct impl *impl, const char *argument);
53
-struct module *create_module_x11_bell(struct impl *impl, const char *argument);
54
-
55
-#endif
56
pipewire-0.3.49.tar.gz/NEWS -> pipewire-0.3.50.tar.gz/NEWS Changed
108
 
1
@@ -1,4 +1,95 @@
2
-# PipeWire 0.3.49 (2022-03-31)
3
+# PipeWire 0.3.50 (2022-04-13)
4
+
5
+This is a bugfix release that is API and ABI compatible with previous
6
+0.3.x releases.
7
+
8
+## Highlights
9
+  - pw-stream can now report more timing information and can suggest
10
+    the optimal number of samples to queue for playback.
11
+  - pw-dot now works again..
12
+  - module-pulse-tunnel latency was improved.
13
+  - WINE applications using the JACK backend should no longer crash.
14
+  - The channelmixer defaults are improved and the muffled sound when
15
+    playing back 5.1 and 7.1 material has been fixed.
16
+  - Many fixes and improvements.
17
+
18
+
19
+## PipeWire
20
+  - pw-stream now places a suggested amount of samples in the pw-buffer
21
+    for playback. This allows you to remove some places where
22
+    spa_io_rate_match was needed to get this information.
23
+  - pw-stream has new API to request a timing update. New fields are
24
+    added in the timing info, such as number of buffered samples in
25
+    the resampler and the number of queued and dequeued buffers.
26
+  - pw-stream has support for double controls now. More controls are
27
+    exposed such as the Rate control to do adaptive resampling.
28
+  - The thread-utils object was moved to the context to avoid some
29
+    concurrent use cases that caused crashes. (#2252)
30
+  - Deactivating an exported node/stream will now remove the node from
31
+    the data-thread immediately so that the process function will not
32
+    be called anymore and resources can be safely freed. This could
33
+    fix some of the last remaining crashes when streams are stopped.
34
+  - PipeWire will now fail to load a module that tries to register
35
+    the same export type twice instead of silently doing the wrong
36
+    thing. (#2281)
37
+
38
+## Modules
39
+  - Many modules now use the NODE_WANT_DRIVER instead of the
40
+    pipewire.dummy NODE_GROUP property. This makes it possible to use
41
+    them with any other driver and can avoid resampling in some
42
+    cases.
43
+  - module-pulse-tunnel now uses an adaptive resampler to keep the
44
+    latency under control. Latency should be much better than before
45
+    and stay constant even when there are network delays.
46
+  - There is now an option for packages to disable building the RTKit
47
+    module, which is still built by default for backwards compatibility
48
+    reasons.
49
+  - A leak was fixed in filter-chain. (#2220)
50
+  - Module node names are now made more unique with the pid.
51
+
52
+## tools
53
+  - pw-cat verbose output has been improved.
54
+  - pw-link now has a man page. (#2263)
55
+  - pw-reserve now has an -r option to make it issue a RequestRelease
56
+    command on the owner of the device. This makes it possible to ask
57
+    WirePlumber to close and release a device.
58
+  - Fix pw-dot again. It didn't work anymore because of stray done
59
+    events that were emitted to notify the client of object serials.
60
+    (#2253)
61
+
62
+## SPA
63
+  - The channelmixer now has PSD upmixing enabled again. We used the
64
+    simple upmixing in the previous release but that just sounds too
65
+    aweful to be a good default. (#861) and (#2219)
66
+  - The channelmixer will not upmix FC and LFE anymore when upmixing is
67
+    explicitly disabled. (#2266)
68
+  - The channelmixer will only lowpass filter FC and LFE channels when
69
+    they were upmixed. (#2280)
70
+  - The defaults of the channelmixer were tweaked a little. There is now
71
+    a little bit more bass in the LFE channel and more high fequencies
72
+    in the FC channel when upmixing. Also the channel widening has been
73
+    disabled by default.
74
+  - Locale independent float parsing now uses a more portable solution
75
+    with uselocale.
76
+  - ALSA will now only allocate a buffer size big enough to hold 4
77
+    times the quantum limit instead of as large as possible.
78
+
79
+## pulse-server
80
+  - Internal cleanups in handling of modules.
81
+  - A quirk to force s16 sample formats for teams-insider has been added.
82
+
83
+## JACK
84
+  - The data-loop is now started in activate and stopped in deactivate.
85
+    This makes the data-loop respect any custom thread functions you
86
+    configure. This also makes WINE apps using the JACK backend work.
87
+    (#1495).
88
+  - Port sorting was improved/fixed. (#2260)
89
+
90
+
91
+Older versions:
92
+
93
+
94
+# PipeWire 0.3.49 (2022-03-29)
95
 
96
 This is a bugfix release that is API and ABI compatible with previous
97
 0.3.x releases.
98
@@ -69,9 +160,6 @@
99
     adding a track would fail after some time. (#1714)
100
 
101
 
102
-Older versions:
103
-
104
-
105
 # PipeWire 0.3.48 (2022-03-03)
106
 
107
 This is a bugfix release that is API and ABI compatible with previous
108
pipewire-0.3.49.tar.gz/man/meson.build -> pipewire-0.3.50.tar.gz/man/meson.build Changed
9
 
1
@@ -13,6 +13,7 @@
2
   'pw-cat.1.rst.in',
3
   'pw-cli.1.rst.in',
4
   'pw-dot.1.rst.in',
5
+  'pw-link.1.rst.in',
6
   'pw-metadata.1.rst.in',
7
   'pw-mididump.1.rst.in',
8
   'pw-mon.1.rst.in',
9
pipewire-0.3.50.tar.gz/man/pw-link.1.rst.in Added
141
 
1
@@ -0,0 +1,139 @@
2
+pw-link
3
+#######
4
+
5
+-------------------------
6
+The PipeWire Link Command
7
+-------------------------
8
+
9
+:Manual section: 1
10
+:Manual group: General Commands Manual
11
+
12
+SYNOPSIS
13
+========
14
+
15
+| **pw-link** *options* -o|-i|-l *out-pattern* *in-pattern*
16
+
17
+| **pw-link** *options* *output* *input*
18
+
19
+| **pw-link** *options* -d *output* *input*
20
+
21
+| **pw-link** *options* -d *link-id*
22
+
23
+DESCRIPTION
24
+===========
25
+
26
+List, create and destroy links between PipeWire ports.
27
+
28
+COMMON OPTIONS
29
+==============
30
+
31
+-r | --remote=NAME
32
+  The name the *remote* instance to monitor. If left unspecified,
33
+  a connection is made to the default PipeWire instance.
34
+
35
+-h | --help
36
+  Show help.
37
+
38
+--version
39
+  Show version information.
40
+
41
+LISTING PORTS AND LINKS
42
+=======================
43
+
44
+Specify one of -o, -i or -l to list the matching optional input and
45
+output ports and their links.
46
+
47
+-o | --output
48
+  List output ports
49
+
50
+-i | --input
51
+  List output ports
52
+
53
+-l | --links
54
+  List links
55
+
56
+-m | --monitor
57
+  Monitor links and ports. **pw-link** will not exit but monitor and
58
+  print new and destroyed ports or links.
59
+
60
+-I | --id
61
+  List IDs. Also list the unique link and port ids.
62
+
63
+-v | --verbose
64
+  Verbose port properties. Also list the port-object-path and the port-alias.
65
+
66
+CONNECTING PORTS
67
+================
68
+
69
+Whithout any list option (-i, -o or -l), the given ports will be linked.
70
+Valid port specifications are:
71
+
72
+*port-id*
73
+  As obtained with the -I option when listing ports.
74
+
75
+*node-name:port-name*
76
+  As obtained when listing ports.
77
+
78
+*port-object-path*
79
+  As obtained from the first alternative name for the port when listing
80
+  them with the -v option.
81
+
82
+*port-alias*
83
+  As obtained from the second alternative name for the ports when listing
84
+  them with the -v option.
85
+
86
+Extra options when linking can be given:
87
+
88
+-L | --linger
89
+  Linger. Will create a link that exists after **pw-link** is destroyed.
90
+  This is the default behaviour, unless the -m option is given.
91
+
92
+-P | --passive
93
+  Passive link. A passive link will keep both nodes it links inactive
94
+  unless another non-passive link is activating the nodes. You can use this
95
+  to link a sink to a filter and have them both suspended when nothing else
96
+  is linked to either of them.
97
+
98
+-p | --props=PROPS
99
+  Properties as JSON object. Give extra properties when creaing the link.
100
+
101
+DISCONNECTING PORTS
102
+===================
103
+
104
+When the -d option is given, an existing link between port is destroyed.
105
+
106
+To disconnect port, a single *link-id*, as obtained when listing links with
107
+the -I option, or two port specifications can be given. See the connecting
108
+ports section for valid port specifications.
109
+
110
+-d | --disconnect
111
+  Disconnect ports
112
+
113
+EXAMPLES
114
+========
115
+
116
+**pw-link** -iol
117
+  List all port and their links.
118
+
119
+**pw-link** -lm
120
+  List all links and monitor changes until **pw-link** is stopped.
121
+
122
+**pw-link** paplay:output_FL alsa_output.pci-0000_00_1b.0.analog-stereo:playback_FL
123
+  Link the given output port to the input port.
124
+
125
+**pw-link** -lI
126
+  List links and their Id.
127
+
128
+**pw-link** -d 89
129
+  Destroy the link with id 89.
130
+
131
+AUTHORS
132
+=======
133
+
134
+The PipeWire Developers <@PACKAGE_BUGREPORT@>; PipeWire is available from @PACKAGE_URL@
135
+
136
+SEE ALSO
137
+========
138
+
139
+``pipewire(1)``,
140
+``pw-cli(1)``,
141
pipewire-0.3.49.tar.gz/meson.build -> pipewire-0.3.50.tar.gz/meson.build Changed
8
 
1
@@ -1,5 +1,5 @@
2
 project('pipewire', 'c' ,
3
-  version : '0.3.49',
4
+  version : '0.3.50',
5
   license :  'MIT', 'LGPL-2.1-or-later', 'GPL-2.0-only' ,
6
   meson_version : '>= 0.59.0',
7
   default_options :  'warning_level=3',
8
pipewire-0.3.49.tar.gz/meson_options.txt -> pipewire-0.3.50.tar.gz/meson_options.txt Changed
9
 
1
@@ -237,3 +237,7 @@
2
        description: 'Enable code that depends on libcanberra',
3
        type: 'feature',
4
        value: 'auto')
5
+option('legacy-rtkit',
6
+       description: 'Build legacy rtkit module',
7
+       type: 'boolean',
8
+       value: 'true')
9
pipewire-0.3.49.tar.gz/pipewire-alsa/alsa-plugins/pcm_pipewire.c -> pipewire-0.3.50.tar.gz/pipewire-alsa/alsa-plugins/pcm_pipewire.c Changed
55
 
1
@@ -90,7 +90,6 @@
2
    struct spa_hook stream_listener;
3
 
4
    struct pw_time time;
5
-   struct spa_io_rate_match *rate_match;
6
 
7
    struct spa_audio_info_raw format;
8
 } snd_pcm_pipewire_t;
9
@@ -374,19 +373,6 @@
10
    pw_stream_update_params(pw->stream, params, n_params);
11
 }
12
 
13
-static void on_stream_io_changed(void *data, uint32_t id, void *area, uint32_t size)
14
-{
15
-   snd_pcm_pipewire_t *pw = data;
16
-   switch (id) {
17
-   case SPA_IO_RateMatch:
18
-       if (pw->io.stream == SND_PCM_STREAM_PLAYBACK)
19
-           pw->rate_match = area;
20
-       break;
21
-   default:
22
-       break;
23
-   }
24
-}
25
-
26
 static void on_stream_drained(void *data)
27
 {
28
    snd_pcm_pipewire_t *pw = data;
29
@@ -403,7 +389,7 @@
30
    struct pw_buffer *b;
31
    snd_pcm_uframes_t hw_avail, before, want, xfer;
32
 
33
-   pw_stream_get_time(pw->stream, &pw->time);
34
+   pw_stream_get_time_n(pw->stream, &pw->time, sizeof(pw->time));
35
 
36
    if (pw->time.rate.num != 0) {
37
        pw->time.delay = pw->time.delay * io->rate * pw->time.rate.num / pw->time.rate.denom;
38
@@ -422,7 +408,7 @@
39
    if (b == NULL)
40
        return;
41
 
42
-   want = pw->rate_match ? pw->rate_match->size : hw_avail;
43
+   want = b->requested ? b->requested : hw_avail;
44
 
45
    xfer = snd_pcm_pipewire_process(pw, b, &hw_avail, want);
46
 
47
@@ -451,7 +437,6 @@
48
 static const struct pw_stream_events stream_events = {
49
    PW_VERSION_STREAM_EVENTS,
50
    .param_changed = on_stream_param_changed,
51
-   .io_changed = on_stream_io_changed,
52
    .process = on_stream_process,
53
    .drained = on_stream_drained,
54
 };
55
pipewire-0.3.49.tar.gz/pipewire-jack/src/pipewire-jack.c -> pipewire-0.3.50.tar.gz/pipewire-jack/src/pipewire-jack.c Changed
201
 
1
@@ -261,6 +261,8 @@
2
    struct pw_thread_loop *loop;    /* thread_lock protects all below */
3
    struct pw_context *context;
4
 
5
+   struct spa_thread_utils *old_thread_utils;
6
+   struct spa_thread_utils thread_utils;
7
    pthread_mutex_t lock;       /* protects map and lists below, in addition to thread_lock */
8
    struct spa_list objects;
9
    uint32_t free_count;
10
@@ -2486,6 +2488,72 @@
11
    .port_set_mix_info = client_node_port_set_mix_info,
12
 };
13
 
14
+#define CHECK(expression,label)                        \
15
+do {                                   \
16
+   if ((errno = expression) != 0) {                \
17
+       res = -errno;                       \
18
+       pw_log_error(#expression ": %s", strerror(errno));  \
19
+       goto label;                     \
20
+   }                               \
21
+} while(false);
22
+
23
+static struct spa_thread *impl_create(void *data,
24
+           const struct spa_dict *props,
25
+           void *(*start)(void*), void *arg)
26
+{
27
+   struct client *c = (struct client *) data;
28
+   struct spa_thread *thr;
29
+   int res = 0;
30
+
31
+   pw_log_info("create thread");
32
+   if (globals.creator != NULL) {
33
+       pthread_t pt;
34
+       pthread_attr_t attributes;
35
+
36
+       pthread_attr_init(&attributes);
37
+       CHECK(pthread_attr_setdetachstate(&attributes, PTHREAD_CREATE_JOINABLE), error);
38
+       CHECK(pthread_attr_setscope(&attributes, PTHREAD_SCOPE_SYSTEM), error);
39
+       CHECK(pthread_attr_setinheritsched(&attributes, PTHREAD_EXPLICIT_SCHED), error);
40
+       CHECK(pthread_attr_setstacksize(&attributes, THREAD_STACK), error);
41
+
42
+       res = -globals.creator(&pt, &attributes, start, arg);
43
+
44
+       pthread_attr_destroy(&attributes);
45
+       if (res != 0)
46
+           goto error;
47
+       thr = (struct spa_thread*)pt;
48
+   } else {
49
+       thr = spa_thread_utils_create(c->context.old_thread_utils, NULL, start, arg);
50
+   }
51
+   return thr;
52
+error:
53
+   pw_log_warn("create RT thread failed: %s", strerror(res));
54
+   errno = -res;
55
+   return NULL;
56
+
57
+}
58
+
59
+static int impl_join(void *data,
60
+       struct spa_thread *thread, void **retval)
61
+{
62
+   struct client *c = (struct client *) data;
63
+   pw_log_info("join thread");
64
+   return spa_thread_utils_join(c->context.old_thread_utils, thread, retval);
65
+}
66
+
67
+static int impl_acquire_rt(void *data, struct spa_thread *thread, int priority)
68
+{
69
+   struct client *c = (struct client *) data;
70
+   return spa_thread_utils_acquire_rt(c->context.old_thread_utils, thread, priority);
71
+}
72
+
73
+static struct spa_thread_utils_methods thread_utils_impl = {
74
+   SPA_VERSION_THREAD_UTILS_METHODS,
75
+   .create = impl_create,
76
+   .join = impl_join,
77
+   .acquire_rt = impl_acquire_rt,
78
+};
79
+
80
 static jack_port_type_id_t string_to_type(const char *port_type)
81
 {
82
    if (spa_streq(JACK_DEFAULT_AUDIO_TYPE, port_type))
83
@@ -3205,7 +3273,23 @@
84
            mix2 = mix2_sse;
85
 #endif
86
    }
87
+   client->context.old_thread_utils =
88
+       pw_context_get_object(client->context.context,
89
+               SPA_TYPE_INTERFACE_ThreadUtils);
90
+   if (client->context.old_thread_utils == NULL)
91
+       client->context.old_thread_utils = pw_thread_utils_get();
92
+
93
+   client->context.thread_utils.iface = SPA_INTERFACE_INIT(
94
+           SPA_TYPE_INTERFACE_ThreadUtils,
95
+           SPA_VERSION_THREAD_UTILS,
96
+           &thread_utils_impl, client);
97
+
98
    client->loop = client->context.context->data_loop_impl;
99
+   pw_data_loop_stop(client->loop);
100
+
101
+   pw_context_set_object(client->context.context,
102
+           SPA_TYPE_INTERFACE_ThreadUtils,
103
+           &client->context.thread_utils);
104
 
105
    spa_list_init(&client->links);
106
    spa_list_init(&client->rt.target_links);
107
@@ -3568,6 +3652,7 @@
108
        return 0;
109
 
110
    pw_thread_loop_lock(c->context.loop);
111
+   pw_data_loop_start(c->loop);
112
 
113
    if ((res = do_activate(c)) < 0)
114
        goto done;
115
@@ -3575,15 +3660,17 @@
116
    c->activation->pending_new_pos = true;
117
    c->activation->pending_sync = true;
118
 
119
-
120
    c->active = true;
121
 
122
    do_callback(c, graph_callback, c->graph_arg);
123
 
124
 done:
125
+   if (res < 0)
126
+       pw_data_loop_stop(c->loop);
127
+
128
    pw_thread_loop_unlock(c->context.loop);
129
 
130
-   return 0;
131
+   return res;
132
 }
133
 
134
 SPA_EXPORT
135
@@ -3617,7 +3704,6 @@
136
 
137
    res = do_sync(c);
138
 
139
-   pw_data_loop_start(c->loop);
140
    pw_thread_loop_unlock(c->context.loop);
141
 
142
    if (res < 0)
143
@@ -5325,15 +5411,14 @@
144
        res = is_def2 - is_def1;
145
    else if ((*o1)->port.priority != (*o2)->port.priority)
146
        res = (*o2)->port.priority - (*o1)->port.priority;
147
-   else if ((res = strcmp((*o1)->port.alias1, (*o2)->port.alias1)) == 0) {
148
-       res = (*o1)->port.node_id - (*o2)->port.node_id;
149
+   else if ((res = (*o1)->port.node_id - (*o2)->port.node_id) == 0) {
150
+       if ((*o1)->port.is_monitor != (*o2)->port.is_monitor)
151
+           res = (*o1)->port.is_monitor - (*o2)->port.is_monitor;
152
        if (res == 0)
153
            res = (*o1)->port.system_id - (*o2)->port.system_id;
154
        if (res == 0)
155
            res = (*o1)->serial - (*o2)->serial;
156
    }
157
-
158
-
159
    pw_log_debug("port %s<->%s type:%d<->%d def:%d<->%d prio:%d<->%d id:%d<->%d res:%d",
160
            (*o1)->port.name, (*o2)->port.name,
161
            (*o1)->port.type_id, (*o2)->port.type_id,
162
@@ -5964,19 +6049,10 @@
163
 
164
    spa_return_val_if_fail(c != NULL, -1);
165
 
166
-   pw_thread_utils_get_rt_range(NULL, &min, &max);
167
+   spa_thread_utils_get_rt_range(&c->context.thread_utils, NULL, &min, &max);
168
    return SPA_MIN(max, c->rt_max) - 1;
169
 }
170
 
171
-#define CHECK(expression,label)                        \
172
-do {                                   \
173
-   if ((errno = expression) != 0) {                \
174
-       res = -errno;                       \
175
-       pw_log_error(#expression ": %s", strerror(errno));  \
176
-       goto label;                     \
177
-   }                               \
178
-} while(false);
179
-
180
 SPA_EXPORT
181
 int jack_acquire_real_time_scheduling (jack_native_thread_t thread, int priority)
182
 {
183
@@ -6015,55 +6091,45 @@
184
                                void *(*start_routine)(void*),
185
                                void *arg)
186
 {
187
+   struct client *c = (struct client *) client;
188
    int res = 0;
189
+   struct spa_thread *thr;
190
 
191
    spa_return_val_if_fail(client != NULL, -EINVAL);
192
+   spa_return_val_if_fail(thread != NULL, -EINVAL);
193
+   spa_return_val_if_fail(start_routine != NULL, -EINVAL);
194
 
195
    pw_log_info("client %p: create thread rt:%d prio:%d", client, realtime, priority);
196
-   if (globals.creator != NULL) {
197
-       pthread_attr_t attributes;
198
 
199
-       pthread_attr_init(&attributes);
200
-       CHECK(pthread_attr_setdetachstate(&attributes, PTHREAD_CREATE_JOINABLE), error);
201
pipewire-0.3.49.tar.gz/po/hr.po -> pipewire-0.3.50.tar.gz/po/hr.po Changed
201
 
1
@@ -6,10 +6,9 @@
2
 msgid ""
3
 msgstr ""
4
 "Project-Id-Version: pipewire\n"
5
-"Report-Msgid-Bugs-To: https://gitlab.freedesktop.org/pipewire/pipewire/"
6
-"issues/new\n"
7
-"POT-Creation-Date: 2021-04-18 16:54+0800\n"
8
-"PO-Revision-Date: 2021-11-17 15:36+0100\n"
9
+"Report-Msgid-Bugs-To: \n"
10
+"POT-Creation-Date: 2022-04-03 12:56+0200\n"
11
+"PO-Revision-Date: 2022-04-03 12:57+0200\n"
12
 "Last-Translator: gogo <trebelnik2@gmail.com>\n"
13
 "Language-Team: Croatian <https://translate.fedoraproject.org/projects/"
14
 "pipewire/pipewire/hr/>\n"
15
@@ -22,7 +21,7 @@
16
 "X-Generator: Poedit 2.3\n"
17
 "X-Launchpad-Export-Date: 2017-04-20 21:04+0000\n"
18
 
19
-#: src/daemon/pipewire.c:45
20
+#: src/daemon/pipewire.c:46
21
 #, c-format
22
 msgid ""
23
 "%s options\n"
24
@@ -35,32 +34,36 @@
25
 "      --version                         Prikaži inačicu\n"
26
 "  -c, --config                          Učitaj podešavanje (Zadano %s)\n"
27
 
28
-#: src/modules/module-protocol-pulse/modules/module-tunnel-sink.c:185
29
-#: src/modules/module-protocol-pulse/modules/module-tunnel-source.c:185
30
+#: src/modules/module-protocol-pulse/modules/module-tunnel-sink.c:190
31
+#: src/modules/module-protocol-pulse/modules/module-tunnel-source.c:190
32
 #, c-format
33
 msgid "Tunnel to %s/%s"
34
 msgstr "Tunel do %s/%s"
35
 
36
-#: src/modules/module-pulse-tunnel.c:536
37
+#: src/modules/module-fallback-sink.c:51
38
+msgid "Dummy Output"
39
+msgstr "Lažni izlaz"
40
+
41
+#: src/modules/module-pulse-tunnel.c:545
42
 #, c-format
43
 msgid "Tunnel for %s@%s"
44
 msgstr "Tunel za %s@%s"
45
 
46
-#: src/modules/module-zeroconf-discover.c:332
47
+#: src/modules/module-zeroconf-discover.c:313
48
 msgid "Unknown device"
49
 msgstr "Nepoznat uređaj"
50
 
51
-#: src/modules/module-zeroconf-discover.c:344
52
+#: src/modules/module-zeroconf-discover.c:325
53
 #, c-format
54
 msgid "%s on %s@%s"
55
 msgstr "%s na %s@%s"
56
 
57
-#: src/modules/module-zeroconf-discover.c:348
58
+#: src/modules/module-zeroconf-discover.c:329
59
 #, c-format
60
 msgid "%s on %s"
61
 msgstr "%s na %s"
62
 
63
-#: src/tools/pw-cat.c:1058
64
+#: src/tools/pw-cat.c:1087
65
 #, c-format
66
 msgid ""
67
 "%s options <file>\n"
68
@@ -75,7 +78,7 @@
69
 "  -v, --verbose                         Omogući opširnije radnje\n"
70
 "\n"
71
 
72
-#: src/tools/pw-cat.c:1065
73
+#: src/tools/pw-cat.c:1094
74
 #, c-format
75
 msgid ""
76
 "  -R, --remote                          Remote daemon name\n"
77
@@ -112,7 +115,7 @@
78
 "target\n"
79
 "\n"
80
 
81
-#: src/tools/pw-cat.c:1083
82
+#: src/tools/pw-cat.c:1112
83
 #, c-format
84
 msgid ""
85
 "      --rate                            Sample rate (req. for rec) (default "
86
@@ -148,7 +151,7 @@
87
 "15) (zadano je %d)\n"
88
 "\n"
89
 
90
-#: src/tools/pw-cat.c:1100
91
+#: src/tools/pw-cat.c:1129
92
 msgid ""
93
 "  -p, --playback                        Playback mode\n"
94
 "  -r, --record                          Recording mode\n"
95
@@ -162,7 +165,7 @@
96
 "  -d, --dsd                             DSD način\n"
97
 "\n"
98
 
99
-#: src/tools/pw-cli.c:3018
100
+#: src/tools/pw-cli.c:3051
101
 #, c-format
102
 msgid ""
103
 "%s options command\n"
104
@@ -186,7 +189,7 @@
105
 msgstr "Pro Audio"
106
 
107
 #: spa/plugins/alsa/acp/acp.c:444 spa/plugins/alsa/acp/alsa-mixer.c:4648
108
-#: spa/plugins/bluez5/bluez5-device.c:1145
109
+#: spa/plugins/bluez5/bluez5-device.c:1159
110
 msgid "Off"
111
 msgstr "Isključeno"
112
 
113
@@ -213,7 +216,7 @@
114
 
115
 #: spa/plugins/alsa/acp/alsa-mixer.c:2657
116
 #: spa/plugins/alsa/acp/alsa-mixer.c:2741
117
-#: spa/plugins/bluez5/bluez5-device.c:1302
118
+#: spa/plugins/bluez5/bluez5-device.c:1328
119
 msgid "Microphone"
120
 msgstr "Mikrofon"
121
 
122
@@ -279,7 +282,7 @@
123
 msgstr "Bez pojačanja basa"
124
 
125
 #: spa/plugins/alsa/acp/alsa-mixer.c:2672
126
-#: spa/plugins/bluez5/bluez5-device.c:1307
127
+#: spa/plugins/bluez5/bluez5-device.c:1333
128
 msgid "Speaker"
129
 msgstr "Zvučnik"
130
 
131
@@ -394,7 +397,7 @@
132
 
133
 #: spa/plugins/alsa/acp/alsa-mixer.c:4484
134
 #: spa/plugins/alsa/acp/alsa-mixer.c:4642
135
-#: spa/plugins/bluez5/bluez5-device.c:1292
136
+#: spa/plugins/bluez5/bluez5-device.c:1318
137
 msgid "Headset"
138
 msgstr "Slušalice s mikrofonom"
139
 
140
@@ -508,17 +511,18 @@
141
 msgid "Mono Chat + 7.1 Surround"
142
 msgstr "Mono razgovor + 7.1 Surround"
143
 
144
-#: spa/plugins/alsa/acp/alsa-mixer.c:4750
145
+#: spa/plugins/alsa/acp/alsa-mixer.c:4754
146
 #, c-format
147
 msgid "%s Output"
148
 msgstr "%s izlaz"
149
 
150
-#: spa/plugins/alsa/acp/alsa-mixer.c:4757
151
+#: spa/plugins/alsa/acp/alsa-mixer.c:4761
152
 #, c-format
153
 msgid "%s Input"
154
 msgstr "%s ulaz"
155
 
156
-#: spa/plugins/alsa/acp/alsa-util.c:1173 spa/plugins/alsa/acp/alsa-util.c:1267
157
+#: spa/plugins/alsa/acp/alsa-util.c:1173
158
+#: spa/plugins/alsa/acp/alsa-util.c:1267
159
 #, c-format
160
 msgid ""
161
 "snd_pcm_avail() returned a value that is exceptionally large: %lu byte (%lu "
162
@@ -627,62 +631,62 @@
163
 msgid "Modem"
164
 msgstr "Modem"
165
 
166
-#: spa/plugins/bluez5/bluez5-device.c:1155
167
+#: spa/plugins/bluez5/bluez5-device.c:1170
168
 msgid "Audio Gateway (A2DP Source & HSP/HFP AG)"
169
 msgstr "Zvučni pristupnik (A2DP izvor i HSP/HFP AG)"
170
 
171
-#: spa/plugins/bluez5/bluez5-device.c:1178
172
+#: spa/plugins/bluez5/bluez5-device.c:1195
173
 #, c-format
174
 msgid "High Fidelity Playback (A2DP Sink, codec %s)"
175
 msgstr "Reprodukcija visoke autentičnosti (A2DP slivnik, kôdek %s)"
176
 
177
-#: spa/plugins/bluez5/bluez5-device.c:1181
178
+#: spa/plugins/bluez5/bluez5-device.c:1198
179
 #, c-format
180
 msgid "High Fidelity Duplex (A2DP Source/Sink, codec %s)"
181
 msgstr "Telefonija visoke autentičnosti (A2DP slivnik, kôdek %s)"
182
 
183
-#: spa/plugins/bluez5/bluez5-device.c:1188
184
+#: spa/plugins/bluez5/bluez5-device.c:1206
185
 msgid "High Fidelity Playback (A2DP Sink)"
186
 msgstr "Reprodukcija visoke autentičnosti (A2DP slivnik)"
187
 
188
-#: spa/plugins/bluez5/bluez5-device.c:1190
189
+#: spa/plugins/bluez5/bluez5-device.c:1208
190
 msgid "High Fidelity Duplex (A2DP Source/Sink)"
191
 msgstr "Telefonija visoke autentičnosti (A2DP izvor/slivnik)"
192
 
193
-#: spa/plugins/bluez5/bluez5-device.c:1217
194
+#: spa/plugins/bluez5/bluez5-device.c:1236
195
 #, c-format
196
 msgid "Headset Head Unit (HSP/HFP, codec %s)"
197
 msgstr "Jedinica slušalice s mikrofonom (HSP/HFP, kôdek %s)"
198
 
199
-#: spa/plugins/bluez5/bluez5-device.c:1221
200
+#: spa/plugins/bluez5/bluez5-device.c:1241
201
pipewire-0.3.49.tar.gz/po/pipewire.pot -> pipewire-0.3.50.tar.gz/po/pipewire.pot Changed
201
 
1
@@ -8,7 +8,7 @@
2
 msgstr ""
3
 "Project-Id-Version: pipewire\n"
4
 "Report-Msgid-Bugs-To: https://gitlab.freedesktop.org/pipewire/pipewire/issues/new\n"
5
-"POT-Creation-Date: 2021-11-17 15:06+0100\n"
6
+"POT-Creation-Date: 2022-04-03 12:56+0200\n"
7
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
 "Language-Team: LANGUAGE <LL@li.org>\n"
10
@@ -18,7 +18,7 @@
11
 "Content-Transfer-Encoding: 8bit\n"
12
 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
13
 
14
-#: src/daemon/pipewire.c:45
15
+#: src/daemon/pipewire.c:46
16
 #, c-format
17
 msgid ""
18
 "%s options\n"
19
@@ -27,32 +27,36 @@
20
 "  -c, --config                          Load config (Default %s)\n"
21
 msgstr ""
22
 
23
-#: src/modules/module-protocol-pulse/modules/module-tunnel-sink.c:185
24
-#: src/modules/module-protocol-pulse/modules/module-tunnel-source.c:185
25
+#: src/modules/module-protocol-pulse/modules/module-tunnel-sink.c:190
26
+#: src/modules/module-protocol-pulse/modules/module-tunnel-source.c:190
27
 #, c-format
28
 msgid "Tunnel to %s/%s"
29
 msgstr ""
30
 
31
-#: src/modules/module-pulse-tunnel.c:536
32
+#: src/modules/module-fallback-sink.c:51
33
+msgid "Dummy Output"
34
+msgstr ""
35
+
36
+#: src/modules/module-pulse-tunnel.c:545
37
 #, c-format
38
 msgid "Tunnel for %s@%s"
39
 msgstr ""
40
 
41
-#: src/modules/module-zeroconf-discover.c:332
42
+#: src/modules/module-zeroconf-discover.c:313
43
 msgid "Unknown device"
44
 msgstr ""
45
 
46
-#: src/modules/module-zeroconf-discover.c:344
47
+#: src/modules/module-zeroconf-discover.c:325
48
 #, c-format
49
 msgid "%s on %s@%s"
50
 msgstr ""
51
 
52
-#: src/modules/module-zeroconf-discover.c:348
53
+#: src/modules/module-zeroconf-discover.c:329
54
 #, c-format
55
 msgid "%s on %s"
56
 msgstr ""
57
 
58
-#: src/tools/pw-cat.c:1058
59
+#: src/tools/pw-cat.c:1087
60
 #, c-format
61
 msgid ""
62
 "%s options <file>\n"
63
@@ -62,7 +66,7 @@
64
 "\n"
65
 msgstr ""
66
 
67
-#: src/tools/pw-cat.c:1065
68
+#: src/tools/pw-cat.c:1094
69
 #, c-format
70
 msgid ""
71
 "  -R, --remote                          Remote daemon name\n"
72
@@ -80,7 +84,7 @@
73
 "\n"
74
 msgstr ""
75
 
76
-#: src/tools/pw-cat.c:1083
77
+#: src/tools/pw-cat.c:1112
78
 #, c-format
79
 msgid ""
80
 "      --rate                            Sample rate (req. for rec) (default "
81
@@ -100,7 +104,7 @@
82
 "\n"
83
 msgstr ""
84
 
85
-#: src/tools/pw-cat.c:1100
86
+#: src/tools/pw-cat.c:1129
87
 msgid ""
88
 "  -p, --playback                        Playback mode\n"
89
 "  -r, --record                          Recording mode\n"
90
@@ -109,7 +113,7 @@
91
 "\n"
92
 msgstr ""
93
 
94
-#: src/tools/pw-cli.c:3018
95
+#: src/tools/pw-cli.c:3051
96
 #, c-format
97
 msgid ""
98
 "%s options command\n"
99
@@ -125,7 +129,7 @@
100
 msgstr ""
101
 
102
 #: spa/plugins/alsa/acp/acp.c:444 spa/plugins/alsa/acp/alsa-mixer.c:4648
103
-#: spa/plugins/bluez5/bluez5-device.c:1145
104
+#: spa/plugins/bluez5/bluez5-device.c:1159
105
 msgid "Off"
106
 msgstr ""
107
 
108
@@ -152,7 +156,7 @@
109
 
110
 #: spa/plugins/alsa/acp/alsa-mixer.c:2657
111
 #: spa/plugins/alsa/acp/alsa-mixer.c:2741
112
-#: spa/plugins/bluez5/bluez5-device.c:1302
113
+#: spa/plugins/bluez5/bluez5-device.c:1328
114
 msgid "Microphone"
115
 msgstr ""
116
 
117
@@ -218,7 +222,7 @@
118
 msgstr ""
119
 
120
 #: spa/plugins/alsa/acp/alsa-mixer.c:2672
121
-#: spa/plugins/bluez5/bluez5-device.c:1307
122
+#: spa/plugins/bluez5/bluez5-device.c:1333
123
 msgid "Speaker"
124
 msgstr ""
125
 
126
@@ -333,7 +337,7 @@
127
 
128
 #: spa/plugins/alsa/acp/alsa-mixer.c:4484
129
 #: spa/plugins/alsa/acp/alsa-mixer.c:4642
130
-#: spa/plugins/bluez5/bluez5-device.c:1292
131
+#: spa/plugins/bluez5/bluez5-device.c:1318
132
 msgid "Headset"
133
 msgstr ""
134
 
135
@@ -447,12 +451,12 @@
136
 msgid "Mono Chat + 7.1 Surround"
137
 msgstr ""
138
 
139
-#: spa/plugins/alsa/acp/alsa-mixer.c:4750
140
+#: spa/plugins/alsa/acp/alsa-mixer.c:4754
141
 #, c-format
142
 msgid "%s Output"
143
 msgstr ""
144
 
145
-#: spa/plugins/alsa/acp/alsa-mixer.c:4757
146
+#: spa/plugins/alsa/acp/alsa-mixer.c:4761
147
 #, c-format
148
 msgid "%s Input"
149
 msgstr ""
150
@@ -524,61 +528,61 @@
151
 msgid "Modem"
152
 msgstr ""
153
 
154
-#: spa/plugins/bluez5/bluez5-device.c:1155
155
+#: spa/plugins/bluez5/bluez5-device.c:1170
156
 msgid "Audio Gateway (A2DP Source & HSP/HFP AG)"
157
 msgstr ""
158
 
159
-#: spa/plugins/bluez5/bluez5-device.c:1178
160
+#: spa/plugins/bluez5/bluez5-device.c:1195
161
 #, c-format
162
 msgid "High Fidelity Playback (A2DP Sink, codec %s)"
163
 msgstr ""
164
 
165
-#: spa/plugins/bluez5/bluez5-device.c:1181
166
+#: spa/plugins/bluez5/bluez5-device.c:1198
167
 #, c-format
168
 msgid "High Fidelity Duplex (A2DP Source/Sink, codec %s)"
169
 msgstr ""
170
 
171
-#: spa/plugins/bluez5/bluez5-device.c:1188
172
+#: spa/plugins/bluez5/bluez5-device.c:1206
173
 msgid "High Fidelity Playback (A2DP Sink)"
174
 msgstr ""
175
 
176
-#: spa/plugins/bluez5/bluez5-device.c:1190
177
+#: spa/plugins/bluez5/bluez5-device.c:1208
178
 msgid "High Fidelity Duplex (A2DP Source/Sink)"
179
 msgstr ""
180
 
181
-#: spa/plugins/bluez5/bluez5-device.c:1217
182
+#: spa/plugins/bluez5/bluez5-device.c:1236
183
 #, c-format
184
 msgid "Headset Head Unit (HSP/HFP, codec %s)"
185
 msgstr ""
186
 
187
-#: spa/plugins/bluez5/bluez5-device.c:1221
188
+#: spa/plugins/bluez5/bluez5-device.c:1241
189
 msgid "Headset Head Unit (HSP/HFP)"
190
 msgstr ""
191
 
192
-#: spa/plugins/bluez5/bluez5-device.c:1297
193
+#: spa/plugins/bluez5/bluez5-device.c:1323
194
 msgid "Handsfree"
195
 msgstr ""
196
 
197
-#: spa/plugins/bluez5/bluez5-device.c:1312
198
+#: spa/plugins/bluez5/bluez5-device.c:1338
199
 msgid "Headphone"
200
 msgstr ""
201
pipewire-0.3.49.tar.gz/po/pt.po -> pipewire-0.3.50.tar.gz/po/pt.po Changed
201
 
1
@@ -1,17 +1,19 @@
2
-#
3
+# Portuguese translation for pipewire.
4
+# Copyright © 2008-2022 the pipewire authors.
5
+# This file is distributed under the same license as the pipewire package.
6
 # Rui Gouveia <rui.gouveia@globaltek.pt>, 2012.
7
 # Rui Gouveia <rui.gouveia@globaltek.pt>, 2012, 2015.
8
 # Pedro Albuquerque <palbuquerque73@openmailbox.com>, 2015.
9
 # Juliano de Souza Camargo <julianosc@pm.me>, 2020.
10
-# Hugo Carvalho <hugokarvalho@hotmail.com>, 2021.
11
+# Hugo Carvalho <hugokarvalho@hotmail.com>, 2021 2022.
12
 #
13
 msgid ""
14
 msgstr ""
15
 "Project-Id-Version: pipewire\n"
16
 "Report-Msgid-Bugs-To: https://gitlab.freedesktop.org/pipewire/pipewire/"
17
 "issues/new\n"
18
-"POT-Creation-Date: 2021-04-18 16:54+0800\n"
19
-"PO-Revision-Date: 2021-08-02 15:28+0100\n"
20
+"POT-Creation-Date: 2021-11-17 15:06+0100\n"
21
+"PO-Revision-Date: 2022-03-30 19:37+0100\n"
22
 "Last-Translator: Hugo Carvalho <hugokarvalho@hotmail.com>\n"
23
 "Language-Team: Portuguese <https://l10n.gnome.org/teams/pt/>\n"
24
 "Language: pt\n"
25
@@ -19,9 +21,9 @@
26
 "Content-Type: text/plain; charset=UTF-8\n"
27
 "Content-Transfer-Encoding: 8bit\n"
28
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
29
-"X-Generator: Poedit 3.0\n"
30
+"X-Generator: Poedit 3.0.1\n"
31
 
32
-#: src/daemon/pipewire.c:43
33
+#: src/daemon/pipewire.c:45
34
 #, c-format
35
 msgid ""
36
 "%s options\n"
37
@@ -35,29 +37,32 @@
38
 "  -c, --config                          Carrega uma configuração (Padrão "
39
 "%s)\n"
40
 
41
-#: src/daemon/pipewire.desktop.in:4
42
-msgid "PipeWire Media System"
43
-msgstr "Sistema de Multimédia PipeWire"
44
-
45
-#: src/daemon/pipewire.desktop.in:5
46
-msgid "Start the PipeWire Media System"
47
-msgstr "Iniciar o Sistema de Multimédia PipeWire"
48
-
49
-#: src/examples/media-session/alsa-monitor.c:526
50
-#: spa/plugins/alsa/acp/compat.c:187
51
-msgid "Built-in Audio"
52
-msgstr "Áudio interno"
53
+#: src/modules/module-protocol-pulse/modules/module-tunnel-sink.c:185
54
+#: src/modules/module-protocol-pulse/modules/module-tunnel-source.c:185
55
+#, c-format
56
+msgid "Tunnel to %s/%s"
57
+msgstr "Túnel para %s/%s"
58
 
59
-#: src/examples/media-session/alsa-monitor.c:530
60
-#: spa/plugins/alsa/acp/compat.c:192
61
-msgid "Modem"
62
-msgstr "Modem"
63
+#: src/modules/module-pulse-tunnel.c:536
64
+#, c-format
65
+msgid "Tunnel for %s@%s"
66
+msgstr "Túnel para %s@%s"
67
 
68
-#: src/examples/media-session/alsa-monitor.c:539
69
+#: src/modules/module-zeroconf-discover.c:332
70
 msgid "Unknown device"
71
 msgstr "Dispositivo desconhecido"
72
 
73
-#: src/tools/pw-cat.c:991
74
+#: src/modules/module-zeroconf-discover.c:344
75
+#, c-format
76
+msgid "%s on %s@%s"
77
+msgstr "%s em %s@%s"
78
+
79
+#: src/modules/module-zeroconf-discover.c:348
80
+#, c-format
81
+msgid "%s on %s"
82
+msgstr "%s em %s"
83
+
84
+#: src/tools/pw-cat.c:1058
85
 #, c-format
86
 msgid ""
87
 "%s options <file>\n"
88
@@ -72,7 +77,7 @@
89
 "  -v, --verbose                         Ativa operações descritivas\n"
90
 "\n"
91
 
92
-#: src/tools/pw-cat.c:998
93
+#: src/tools/pw-cat.c:1065
94
 #, c-format
95
 msgid ""
96
 "  -R, --remote                          Remote daemon name\n"
97
@@ -106,7 +111,7 @@
98
 "target\n"
99
 "\n"
100
 
101
-#: src/tools/pw-cat.c:1016
102
+#: src/tools/pw-cat.c:1083
103
 #, c-format
104
 msgid ""
105
 "      --rate                            Sample rate (req. for rec) (default "
106
@@ -143,19 +148,21 @@
107
 "(padrão: %d)\n"
108
 "\n"
109
 
110
-#: src/tools/pw-cat.c:1033
111
+#: src/tools/pw-cat.c:1100
112
 msgid ""
113
 "  -p, --playback                        Playback mode\n"
114
 "  -r, --record                          Recording mode\n"
115
 "  -m, --midi                            Midi mode\n"
116
+"  -d, --dsd                             DSD mode\n"
117
 "\n"
118
 msgstr ""
119
 "  -p, --playback                        Modo de reprodução\n"
120
 "  -r, --record                          Modo de gravação\n"
121
 "  -m, --midi                            Modo midi\n"
122
+"  -d, --dsd                             Modo DSD\n"
123
 "\n"
124
 
125
-#: src/tools/pw-cli.c:2932
126
+#: src/tools/pw-cli.c:3018
127
 #, c-format
128
 msgid ""
129
 "%s options command\n"
130
@@ -167,205 +174,201 @@
131
 msgstr ""
132
 "%s options command\n"
133
 "  -h, --help                            Mostra esta ajuda\n"
134
-"      --version                         Mostra versão\n"
135
-"  -d, --daemon                          Inicia como daemon (Falso por "
136
+"      --version                         Mostra a versão\n"
137
+"  -d, --daemon                          Inicia como daemon (falso por "
138
 "padrão)\n"
139
 "  -r, --remote                          Nome do daemon remoto\n"
140
 "\n"
141
 
142
-#: spa/plugins/alsa/acp/acp.c:290
143
+#: spa/plugins/alsa/acp/acp.c:321
144
 msgid "Pro Audio"
145
 msgstr "Pró áudio"
146
 
147
-#: spa/plugins/alsa/acp/acp.c:411 spa/plugins/alsa/acp/alsa-mixer.c:4704
148
-#: spa/plugins/bluez5/bluez5-device.c:1000
149
+#: spa/plugins/alsa/acp/acp.c:444 spa/plugins/alsa/acp/alsa-mixer.c:4648
150
+#: spa/plugins/bluez5/bluez5-device.c:1145
151
 msgid "Off"
152
 msgstr "Desligado"
153
 
154
-#: spa/plugins/alsa/acp/channelmap.h:466
155
-msgid "(invalid)"
156
-msgstr "(inválido)"
157
-
158
-#: spa/plugins/alsa/acp/alsa-mixer.c:2709
159
+#: spa/plugins/alsa/acp/alsa-mixer.c:2652
160
 msgid "Input"
161
 msgstr "Entrada"
162
 
163
-#: spa/plugins/alsa/acp/alsa-mixer.c:2710
164
+#: spa/plugins/alsa/acp/alsa-mixer.c:2653
165
 msgid "Docking Station Input"
166
 msgstr "Base de entrada da estação"
167
 
168
-#: spa/plugins/alsa/acp/alsa-mixer.c:2711
169
+#: spa/plugins/alsa/acp/alsa-mixer.c:2654
170
 msgid "Docking Station Microphone"
171
 msgstr "Base de microfone da estação"
172
 
173
-#: spa/plugins/alsa/acp/alsa-mixer.c:2712
174
+#: spa/plugins/alsa/acp/alsa-mixer.c:2655
175
 msgid "Docking Station Line In"
176
 msgstr "Base de linha de entrada da estação"
177
 
178
-#: spa/plugins/alsa/acp/alsa-mixer.c:2713
179
-#: spa/plugins/alsa/acp/alsa-mixer.c:2804
180
+#: spa/plugins/alsa/acp/alsa-mixer.c:2656
181
+#: spa/plugins/alsa/acp/alsa-mixer.c:2747
182
 msgid "Line In"
183
 msgstr "Linha de entrada"
184
 
185
-#: spa/plugins/alsa/acp/alsa-mixer.c:2714
186
-#: spa/plugins/alsa/acp/alsa-mixer.c:2798
187
-#: spa/plugins/bluez5/bluez5-device.c:1145
188
+#: spa/plugins/alsa/acp/alsa-mixer.c:2657
189
+#: spa/plugins/alsa/acp/alsa-mixer.c:2741
190
+#: spa/plugins/bluez5/bluez5-device.c:1302
191
 msgid "Microphone"
192
 msgstr "Microfone"
193
 
194
-#: spa/plugins/alsa/acp/alsa-mixer.c:2715
195
-#: spa/plugins/alsa/acp/alsa-mixer.c:2799
196
+#: spa/plugins/alsa/acp/alsa-mixer.c:2658
197
+#: spa/plugins/alsa/acp/alsa-mixer.c:2742
198
 msgid "Front Microphone"
199
 msgstr "Microfone frontal"
200
 
201
pipewire-0.3.50.tar.gz/spa/include/spa/utils/dll.h Added
73
 
1
@@ -0,0 +1,71 @@
2
+/* Simple DLL
3
+ *
4
+ * Copyright © 2019 Wim Taymans
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a
7
+ * copy of this software and associated documentation files (the "Software"),
8
+ * to deal in the Software without restriction, including without limitation
9
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
+ * and/or sell copies of the Software, and to permit persons to whom the
11
+ * Software is furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice (including the next
14
+ * paragraph) shall be included in all copies or substantial portions of the
15
+ * Software.
16
+ *
17
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
20
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23
+ * DEALINGS IN THE SOFTWARE.
24
+ */
25
+
26
+#ifndef SPA_DLL_H
27
+#define SPA_DLL_H
28
+
29
+#ifdef __cplusplus
30
+extern "C" {
31
+#endif
32
+
33
+#include <stddef.h>
34
+#include <math.h>
35
+
36
+#define SPA_DLL_BW_MAX     0.128
37
+#define SPA_DLL_BW_MIN     0.016
38
+
39
+struct spa_dll {
40
+   double bw;
41
+   double z1, z2, z3;
42
+   double w0, w1, w2;
43
+};
44
+
45
+static inline void spa_dll_init(struct spa_dll *dll)
46
+{
47
+   dll->bw = 0.0;
48
+   dll->z1 = dll->z2 = dll->z3 = 0.0;
49
+}
50
+
51
+static inline void spa_dll_set_bw(struct spa_dll *dll, double bw, unsigned period, unsigned rate)
52
+{
53
+   double w = 2 * M_PI * bw * period / rate;
54
+   dll->w0 = 1.0 - exp (-20.0 * w);
55
+   dll->w1 = w * 1.5 / period;
56
+   dll->w2 = w / 1.5;
57
+   dll->bw = bw;
58
+}
59
+
60
+static inline double spa_dll_update(struct spa_dll *dll, double err)
61
+{
62
+   dll->z1 += dll->w0 * (dll->w1 * err - dll->z1);
63
+   dll->z2 += dll->w0 * (dll->z1 - dll->z2);
64
+   dll->z3 += dll->w2 * dll->z2;
65
+   return 1.0 - (dll->z2 + dll->z3);
66
+}
67
+
68
+#ifdef __cplusplus
69
+} /* extern "C" */
70
+#endif
71
+
72
+#endif /* SPA_DLL_H */
73
pipewire-0.3.49.tar.gz/spa/include/spa/utils/string.h -> pipewire-0.3.50.tar.gz/spa/include/spa/utils/string.h Changed
29
 
1
@@ -279,10 +279,9 @@
2
    float v;
3
    if (SPA_UNLIKELY(locale == NULL))
4
        locale = newlocale(LC_ALL_MASK, "C", NULL);
5
-   if (locale != NULL)
6
-       v = strtof_l(str, endptr, locale);
7
-   else
8
-       v = strtof(str, endptr);
9
+   locale_t prev = uselocale(locale);
10
+   v = strtof(str, endptr);
11
+   uselocale(prev);
12
    return v;
13
 }
14
 
15
@@ -323,10 +322,9 @@
16
    double v;
17
    if (SPA_UNLIKELY(locale == NULL))
18
        locale = newlocale(LC_ALL_MASK, "C", NULL);
19
-   if (locale != NULL)
20
-       v = strtod_l(str, endptr, locale);
21
-   else
22
-       v = strtod(str, endptr);
23
+   locale_t prev = uselocale(locale);
24
+   v = strtod(str, endptr);
25
+   uselocale(prev);
26
    return v;
27
 }
28
 
29
pipewire-0.3.49.tar.gz/spa/plugins/alsa/alsa-pcm.c -> pipewire-0.3.50.tar.gz/spa/plugins/alsa/alsa-pcm.c Changed
12
 
1
@@ -1476,6 +1476,10 @@
2
        state->buffer_frames = period_size * periods;
3
    } else {
4
        CHECK(snd_pcm_hw_params_get_buffer_size_max(params, &state->buffer_frames), "get_buffer_size_max");
5
+
6
+       state->buffer_frames = SPA_MIN(state->buffer_frames, state->quantum_limit * 4);
7
+
8
+       CHECK(snd_pcm_hw_params_set_buffer_size_min(hndl, params, &state->buffer_frames), "set_buffer_size_min");
9
        CHECK(snd_pcm_hw_params_set_buffer_size_near(hndl, params, &state->buffer_frames), "set_buffer_size_near");
10
        periods = state->buffer_frames / period_size;
11
    }
12
pipewire-0.3.49.tar.gz/spa/plugins/alsa/alsa-pcm.h -> pipewire-0.3.50.tar.gz/spa/plugins/alsa/alsa-pcm.h Changed
17
 
1
@@ -39,6 +39,7 @@
2
 #include <spa/support/loop.h>
3
 #include <spa/utils/list.h>
4
 #include <spa/utils/json.h>
5
+#include <spa/utils/dll.h>
6
 
7
 #include <spa/node/node.h>
8
 #include <spa/node/utils.h>
9
@@ -50,7 +51,6 @@
10
 
11
 #include "alsa.h"
12
 
13
-#include "dll.h"
14
 
15
 #define MAX_RATES  16
16
 
17
pipewire-0.3.49.tar.gz/spa/plugins/alsa/alsa-seq-bridge.c -> pipewire-0.3.50.tar.gz/spa/plugins/alsa/alsa-seq-bridge.c Changed
10
 
1
@@ -81,7 +81,7 @@
2
            param = spa_pod_builder_add_object(&b,
3
                SPA_TYPE_OBJECT_PropInfo, id,
4
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_device),
5
-               SPA_PROP_INFO_name, SPA_POD_String("The ALSA device"),
6
+               SPA_PROP_INFO_description, SPA_POD_String("The ALSA device"),
7
                SPA_PROP_INFO_type, SPA_POD_Stringn(p->device, sizeof(p->device)));
8
            break;
9
        default:
10
pipewire-0.3.49.tar.gz/spa/plugins/alsa/alsa-seq.c -> pipewire-0.3.50.tar.gz/spa/plugins/alsa/alsa-seq.c Changed
9
 
1
@@ -39,7 +39,6 @@
2
 
3
 #include "alsa.h"
4
 
5
-#include "dll.h"
6
 #include "alsa-seq.h"
7
 
8
 #define CHECK(s,msg,...) if ((res = (s)) < 0) { spa_log_error(state->log, msg ": %s", ##__VA_ARGS__, snd_strerror(res)); return res; }
9
pipewire-0.3.49.tar.gz/spa/plugins/alsa/alsa-seq.h -> pipewire-0.3.50.tar.gz/spa/plugins/alsa/alsa-seq.h Changed
17
 
1
@@ -37,6 +37,7 @@
2
 #include <spa/support/plugin.h>
3
 #include <spa/support/loop.h>
4
 #include <spa/utils/list.h>
5
+#include <spa/utils/dll.h>
6
 
7
 #include <spa/node/node.h>
8
 #include <spa/node/utils.h>
9
@@ -47,7 +48,6 @@
10
 
11
 #include "alsa.h"
12
 
13
-#include "dll.h"
14
 
15
 struct props {
16
    char device64;
17
pipewire-0.3.49.tar.gz/spa/plugins/alsa/meson.build -> pipewire-0.3.50.tar.gz/spa/plugins/alsa/meson.build Changed
10
 
1
@@ -37,7 +37,7 @@
2
 
3
 executable('test-timer',
4
    'test-timer.c' ,
5
-  dependencies :  alsa_dep, mathlib, epoll_shim_dep ,
6
+  dependencies :  spa_dep, alsa_dep, mathlib, epoll_shim_dep ,
7
   install : false,
8
 )
9
 
10
pipewire-0.3.49.tar.gz/spa/plugins/alsa/test-timer.c -> pipewire-0.3.50.tar.gz/spa/plugins/alsa/test-timer.c Changed
10
 
1
@@ -31,7 +31,7 @@
2
 
3
 #include <alsa/asoundlib.h>
4
 
5
-#include <dll.h>
6
+#include <spa/utils/dll.h>
7
 
8
 #define DEFAULT_DEVICE "hw:0"
9
 
10
pipewire-0.3.49.tar.gz/spa/plugins/audioconvert/channelmix-ops-c.c -> pipewire-0.3.50.tar.gz/spa/plugins/audioconvert/channelmix-ops-c.c Changed
201
 
1
@@ -24,28 +24,52 @@
2
 
3
 #include "channelmix-ops.h"
4
 
5
+static inline void clear_c(float *d, uint32_t n_samples)
6
+{
7
+   memset(d, 0, n_samples * sizeof(float));
8
+}
9
+
10
+static inline void copy_c(float *d, const float *s, uint32_t n_samples)
11
+{
12
+   spa_memcpy(d, s, n_samples * sizeof(float));
13
+}
14
+
15
+static inline void vol_c(float *d, const float *s, float vol, uint32_t n_samples)
16
+{
17
+   uint32_t n;
18
+   if (vol == 0.0f) {
19
+       clear_c(d, n_samples);
20
+   } else if (vol == 1.0f) {
21
+       copy_c(d, s, n_samples);
22
+   } else {
23
+       for (n = 0; n < n_samples; n++)
24
+           dn = sn * vol;
25
+   }
26
+}
27
+
28
+static inline void add_c(float *d, const float *s0, const float *s1, uint32_t n_samples)
29
+{
30
+   uint32_t n;
31
+   for (n = 0; n < n_samples; n++)
32
+       dn = s0n + s1n;
33
+}
34
+
35
+static inline void sub_c(float *d, const float *s0, const float *s1, uint32_t n_samples)
36
+{
37
+   uint32_t n;
38
+   for (n = 0; n < n_samples; n++)
39
+       dn = s0n - s1n;
40
+}
41
+
42
 void
43
 channelmix_copy_c(struct channelmix *mix, void * SPA_RESTRICT dst,
44
        const void * SPA_RESTRICT src, uint32_t n_samples)
45
 {
46
-   uint32_t i, n, n_dst = mix->dst_chan;
47
+   uint32_t i, n_dst = mix->dst_chan;
48
    float **d = (float **)dst;
49
    const float **s = (const float **)src;
50
-
51
-   if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_ZERO)) {
52
-       for (i = 0; i < n_dst; i++)
53
-           memset(di, 0, n_samples * sizeof(float));
54
-   }
55
-   else if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_IDENTITY)) {
56
-       for (i = 0; i < n_dst; i++)
57
-           spa_memcpy(di, si, n_samples * sizeof(float));
58
-   }
59
-   else {
60
-       for (i = 0; i < n_dst; i++) {
61
-           for (n = 0; n < n_samples; n++)
62
-               din = sin * mix->matrixii;
63
-       }
64
-   }
65
+   for (i = 0; i < n_dst; i++)
66
+       vol_c(di, si, mix->matrixii, n_samples);
67
 }
68
 
69
 #define _M(ch)     (1UL << SPA_AUDIO_CHANNEL_ ## ch)
70
@@ -60,14 +84,14 @@
71
 
72
    if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_ZERO)) {
73
        for (i = 0; i < n_dst; i++)
74
-           memset(di, 0, n_samples * sizeof(float));
75
+           clear_c(di, n_samples);
76
    }
77
    else if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_COPY)) {
78
        uint32_t copy = SPA_MIN(n_dst, n_src);
79
        for (i = 0; i < copy; i++)
80
-           spa_memcpy(di, si, n_samples * sizeof(float));
81
+           copy_c(di, si, n_samples);
82
        for (; i < n_dst; i++)
83
-           memset(di, 0, n_samples * sizeof(float));
84
+           clear_c(di, n_samples);
85
    }
86
    else {
87
        for (n = 0; n < n_samples; n++) {
88
@@ -90,29 +114,13 @@
89
 channelmix_f32_1_2_c(struct channelmix *mix, void * SPA_RESTRICT dst,
90
        const void * SPA_RESTRICT src, uint32_t n_samples)
91
 {
92
-   uint32_t n;
93
    float **d = (float **)dst;
94
    const float **s = (const float **)src;
95
    const float v0 = mix->matrix00;
96
    const float v1 = mix->matrix10;
97
 
98
-   if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_ZERO)) {
99
-       memset(d0, 0, n_samples * sizeof(float));
100
-       memset(d1, 0, n_samples * sizeof(float));
101
-   } else if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_EQUAL)) {
102
-       if (v0 == 1.0f) {
103
-           for (n = 0; n < n_samples; n++)
104
-               d0n = d1n = s0n;
105
-       } else {
106
-           for (n = 0; n < n_samples; n++)
107
-               d0n = d1n = s0n * v0;
108
-       }
109
-   } else {
110
-       for (n = 0; n < n_samples; n++) {
111
-           d0n = s0n * v0;
112
-           d1n = s0n * v1;
113
-       }
114
-   }
115
+   vol_c(d0, s0, v0, n_samples);
116
+   vol_c(d1, s0, v1, n_samples);
117
 }
118
 
119
 void
120
@@ -126,7 +134,7 @@
121
    const float v1 = mix->matrix01;
122
 
123
    if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_ZERO)) {
124
-       memset(d0, 0, n_samples * sizeof(float));
125
+       clear_c(d0, n_samples);
126
    } else if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_EQUAL)) {
127
        for (n = 0; n < n_samples; n++)
128
            d0n = (s0n + s1n) * v0;
129
@@ -150,7 +158,7 @@
130
    const float v3 = mix->matrix03;
131
 
132
    if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_ZERO)) {
133
-       memset(d0, 0, n_samples * sizeof(float));
134
+       clear_c(d0, n_samples);
135
    }
136
    else if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_EQUAL)) {
137
        for (n = 0; n < n_samples; n++)
138
@@ -163,38 +171,12 @@
139
    }
140
 }
141
 
142
-void
143
-channelmix_f32_3p1_1_c(struct channelmix *mix, void * SPA_RESTRICT dst,
144
-          const void * SPA_RESTRICT src, uint32_t n_samples)
145
-{
146
-   uint32_t n;
147
-   float **d = (float **)dst;
148
-   const float **s = (const float **)src;
149
-   const float v0 = mix->matrix00;
150
-   const float v1 = mix->matrix01;
151
-   const float v2 = mix->matrix02;
152
-
153
-   if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_ZERO)) {
154
-       memset(d0, 0, n_samples * sizeof(float));
155
-   }
156
-   else if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_EQUAL)) {
157
-       for (n = 0; n < n_samples; n++)
158
-           d0n = (s0n + s1n + s2n + s3n) * v0;
159
-   }
160
-   else {
161
-       for (n = 0; n < n_samples; n++)
162
-           d0n = s0n * v0 + s1n * v1 + s2n * v2;
163
-   }
164
-}
165
-
166
-
167
 #define MASK_QUAD  _M(FL)|_M(FR)|_M(RL)|_M(RR)|_M(UNKNOWN)
168
 
169
 void
170
 channelmix_f32_2_4_c(struct channelmix *mix, void * SPA_RESTRICT dst,
171
           const void * SPA_RESTRICT src, uint32_t n_samples)
172
 {
173
-   uint32_t i, n, n_dst = mix->dst_chan;
174
    float **d = (float **)dst;
175
    const float **s = (const float **)src;
176
    const float v0 = mix->matrix00;
177
@@ -202,31 +184,10 @@
178
    const float v2 = mix->matrix20;
179
    const float v3 = mix->matrix31;
180
 
181
-   if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_ZERO)) {
182
-       for (i = 0; i < n_dst; i++)
183
-           memset(di, 0, n_samples * sizeof(float));
184
-   }
185
-   else if (v0 == v2 && v1 == v3) {
186
-       if (v0 == 1.0f && v1 == 1.0f) {
187
-           for (n = 0; n < n_samples; n++) {
188
-               d0n = d2n = s0n;
189
-               d1n = d3n = s1n;
190
-           }
191
-       } else {
192
-           for (n = 0; n < n_samples; n++) {
193
-               d0n = d2n = s0n * v0;
194
-               d1n = d3n = s1n * v1;
195
-           }
196
-       }
197
-   }
198
-   else {
199
-       for (n = 0; n < n_samples; n++) {
200
-           d0n = s0n * v0;
201
pipewire-0.3.49.tar.gz/spa/plugins/audioconvert/channelmix-ops.c -> pipewire-0.3.50.tar.gz/spa/plugins/audioconvert/channelmix-ops.c Changed
80
 
1
@@ -78,7 +78,7 @@
2
    { 1, MASK_MONO, 2, MASK_STEREO, channelmix_f32_1_2_c, 0, "f32_1_2_c" },
3
    { 2, MASK_STEREO, 1, MASK_MONO, channelmix_f32_2_1_c, 0, "f32_2_1_c" },
4
    { 4, MASK_QUAD, 1, MASK_MONO, channelmix_f32_4_1_c, 0, "f32_4_1_c" },
5
-   { 4, MASK_3_1, 1, MASK_MONO, channelmix_f32_3p1_1_c, 0, "f32_3p1_1_c" },
6
+   { 4, MASK_3_1, 1, MASK_MONO, channelmix_f32_4_1_c, 0, "f32_4_1_c" },
7
 #if defined (HAVE_SSE)
8
    { 2, MASK_STEREO, 4, MASK_QUAD, channelmix_f32_2_4_sse, SPA_CPU_FLAG_SSE, "f32_2_4_sse" },
9
 #endif
10
@@ -157,6 +157,7 @@
11
    float slev = SQRT1_2;
12
    float llev = 0.5f;
13
    float maxsum = 0.0f;
14
+   bool filter_fc = false, filter_lfe = false;
15
 #define _MATRIX(s,d)   matrix_CH(s)_CH(d)
16
 
17
    spa_log_debug(mix->log, "src-mask:%08"PRIx64" dst-mask:%08"PRIx64
18
@@ -210,15 +211,17 @@
19
    unassigned = src_mask & ~dst_mask;
20
    keep = dst_mask & ~src_mask;
21
 
22
-   if (!SPA_FLAG_IS_SET(mix->options, CHANNELMIX_OPTION_UPMIX) ||
23
-       mix->upmix == CHANNELMIX_UPMIX_NONE)
24
+   if (!SPA_FLAG_IS_SET(mix->options, CHANNELMIX_OPTION_UPMIX)) {
25
        keep = 0;
26
-
27
-   keep |= FRONT;
28
-   if (mix->lfe_cutoff > 0.0f)
29
-       keep |= _MASK(LFE);
30
-   else
31
-       keep &= ~_MASK(LFE);
32
+   } else {
33
+       if (mix->upmix == CHANNELMIX_UPMIX_NONE)
34
+           keep = 0;
35
+       keep |= FRONT;
36
+       if (mix->lfe_cutoff > 0.0f)
37
+           keep |= _MASK(LFE);
38
+       else
39
+           keep &= ~_MASK(LFE);
40
+   }
41
 
42
    spa_log_debug(mix->log, "unassigned downmix %08" PRIx64 " %08" PRIx64, unassigned, keep);
43
 
44
@@ -397,6 +400,7 @@
45
            spa_log_debug(mix->log, "produce FC from STEREO");
46
            _MATRIX(FC,FL) += clev;
47
            _MATRIX(FC,FR) += clev;
48
+           filter_fc = true;
49
        } else {
50
            spa_log_warn(mix->log, "can't produce FC");
51
        }
52
@@ -406,9 +410,11 @@
53
            spa_log_debug(mix->log, "produce LFE from STEREO");
54
            _MATRIX(LFE,FL) += llev;
55
            _MATRIX(LFE,FR) += llev;
56
+           filter_lfe = true;
57
        } else if ((src_mask & FRONT) == FRONT) {
58
            spa_log_debug(mix->log, "produce LFE from FC");
59
            _MATRIX(LFE,FC) += llev;
60
+           filter_lfe = true;
61
        } else {
62
            spa_log_warn(mix->log, "can't produce LFE");
63
        }
64
@@ -456,11 +462,11 @@
65
            sum += fabs(matrixij);
66
        }
67
        maxsum = SPA_MAX(maxsum, sum);
68
-       if (i == _CH(LFE) && mix->lfe_cutoff > 0.0f) {
69
-           spa_log_debug(mix->log, "channel %d is LFE cutoff:%f", ic, mix->lfe_cutoff);
70
+       if (i == _CH(LFE) && mix->lfe_cutoff > 0.0f && filter_lfe) {
71
+           spa_log_info(mix->log, "channel %d is LFE cutoff:%f", ic, mix->lfe_cutoff);
72
            lr4_set(&mix->lr4ic, BQ_LOWPASS, mix->lfe_cutoff / mix->freq);
73
-       } else if (i == _CH(FC) && mix->fc_cutoff > 0.0f) {
74
-           spa_log_debug(mix->log, "channel %d is FC cutoff:%f", ic, mix->fc_cutoff);
75
+       } else if (i == _CH(FC) && mix->fc_cutoff > 0.0f && filter_fc) {
76
+           spa_log_info(mix->log, "channel %d is FC cutoff:%f", ic, mix->fc_cutoff);
77
            lr4_set(&mix->lr4ic, BQ_LOWPASS, mix->fc_cutoff / mix->freq);
78
        } else {
79
            mix->lr4ic.active = false;
80
pipewire-0.3.49.tar.gz/spa/plugins/audioconvert/channelmix-ops.h -> pipewire-0.3.50.tar.gz/spa/plugins/audioconvert/channelmix-ops.h Changed
9
 
1
@@ -138,7 +138,6 @@
2
 DEFINE_FUNCTION(f32_1_2, c);
3
 DEFINE_FUNCTION(f32_2_1, c);
4
 DEFINE_FUNCTION(f32_4_1, c);
5
-DEFINE_FUNCTION(f32_3p1_1, c);
6
 DEFINE_FUNCTION(f32_2_4, c);
7
 DEFINE_FUNCTION(f32_2_3p1, c);
8
 DEFINE_FUNCTION(f32_2_5p1, c);
9
pipewire-0.3.49.tar.gz/spa/plugins/audioconvert/channelmix.c -> pipewire-0.3.50.tar.gz/spa/plugins/audioconvert/channelmix.c Changed
86
 
1
@@ -410,21 +410,21 @@
2
            param = spa_pod_builder_add_object(&b,
3
                SPA_TYPE_OBJECT_PropInfo, id,
4
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_volume),
5
-               SPA_PROP_INFO_name, SPA_POD_String("Volume"),
6
+               SPA_PROP_INFO_description, SPA_POD_String("Volume"),
7
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->volume, 0.0, 10.0));
8
            break;
9
        case 1:
10
            param = spa_pod_builder_add_object(&b,
11
                SPA_TYPE_OBJECT_PropInfo, id,
12
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_mute),
13
-               SPA_PROP_INFO_name, SPA_POD_String("Mute"),
14
+               SPA_PROP_INFO_description, SPA_POD_String("Mute"),
15
                SPA_PROP_INFO_type, SPA_POD_CHOICE_Bool(p->channel.mute));
16
            break;
17
        case 2:
18
            param = spa_pod_builder_add_object(&b,
19
                SPA_TYPE_OBJECT_PropInfo, id,
20
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_channelVolumes),
21
-               SPA_PROP_INFO_name, SPA_POD_String("Channel Volumes"),
22
+               SPA_PROP_INFO_description, SPA_POD_String("Channel Volumes"),
23
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->volume, 0.0, 10.0),
24
                SPA_PROP_INFO_container, SPA_POD_Id(SPA_TYPE_Array));
25
            break;
26
@@ -432,7 +432,7 @@
27
            param = spa_pod_builder_add_object(&b,
28
                SPA_TYPE_OBJECT_PropInfo, id,
29
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_channelMap),
30
-               SPA_PROP_INFO_name, SPA_POD_String("Channel Map"),
31
+               SPA_PROP_INFO_description, SPA_POD_String("Channel Map"),
32
                SPA_PROP_INFO_type, SPA_POD_Id(SPA_AUDIO_CHANNEL_UNKNOWN),
33
                SPA_PROP_INFO_container, SPA_POD_Id(SPA_TYPE_Array));
34
            break;
35
@@ -440,14 +440,14 @@
36
            param = spa_pod_builder_add_object(&b,
37
                SPA_TYPE_OBJECT_PropInfo, id,
38
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_softMute),
39
-               SPA_PROP_INFO_name, SPA_POD_String("Soft Mute"),
40
+               SPA_PROP_INFO_description, SPA_POD_String("Soft Mute"),
41
                SPA_PROP_INFO_type, SPA_POD_CHOICE_Bool(p->soft.mute));
42
            break;
43
        case 5:
44
            param = spa_pod_builder_add_object(&b,
45
                SPA_TYPE_OBJECT_PropInfo, id,
46
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_softVolumes),
47
-               SPA_PROP_INFO_name, SPA_POD_String("Soft Volumes"),
48
+               SPA_PROP_INFO_description, SPA_POD_String("Soft Volumes"),
49
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->volume, 0.0, 10.0),
50
                SPA_PROP_INFO_container, SPA_POD_Id(SPA_TYPE_Array));
51
            break;
52
@@ -455,14 +455,14 @@
53
            param = spa_pod_builder_add_object(&b,
54
                SPA_TYPE_OBJECT_PropInfo, id,
55
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_monitorMute),
56
-               SPA_PROP_INFO_name, SPA_POD_String("Monitor Mute"),
57
+               SPA_PROP_INFO_description, SPA_POD_String("Monitor Mute"),
58
                SPA_PROP_INFO_type, SPA_POD_CHOICE_Bool(p->monitor.mute));
59
            break;
60
        case 7:
61
            param = spa_pod_builder_add_object(&b,
62
                SPA_TYPE_OBJECT_PropInfo, id,
63
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_monitorVolumes),
64
-               SPA_PROP_INFO_name, SPA_POD_String("Monitor Volumes"),
65
+               SPA_PROP_INFO_description, SPA_POD_String("Monitor Volumes"),
66
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->volume, 0.0, 10.0),
67
                SPA_PROP_INFO_container, SPA_POD_Id(SPA_TYPE_Array));
68
            break;
69
@@ -1655,12 +1655,12 @@
70
    props_reset(&this->props);
71
 
72
    this->mix.options = CHANNELMIX_OPTION_UPMIX;
73
-   this->mix.upmix = CHANNELMIX_UPMIX_SIMPLE;
74
+   this->mix.upmix = CHANNELMIX_UPMIX_PSD;
75
    this->mix.log = this->log;
76
-   this->mix.lfe_cutoff = 120.0f;
77
-   this->mix.fc_cutoff = 6000.0f;
78
+   this->mix.lfe_cutoff = 150.0f;
79
+   this->mix.fc_cutoff = 12000.0f;
80
    this->mix.rear_delay = 12.0f;
81
-   this->mix.widen = 0.1f;
82
+   this->mix.widen = 0.0f;
83
 
84
    for (i = 0; info && i < info->n_items; i++) {
85
        const char *k = info->itemsi.key;
86
pipewire-0.3.49.tar.gz/spa/plugins/audioconvert/fmtconvert.c -> pipewire-0.3.50.tar.gz/spa/plugins/audioconvert/fmtconvert.c Changed
9
 
1
@@ -617,6 +617,7 @@
2
    case SPA_AUDIO_FORMAT_S16P:
3
    case SPA_AUDIO_FORMAT_S16:
4
    case SPA_AUDIO_FORMAT_S16_OE:
5
+   case SPA_AUDIO_FORMAT_U16:
6
        return 2;
7
    case SPA_AUDIO_FORMAT_S24P:
8
    case SPA_AUDIO_FORMAT_S24:
9
pipewire-0.3.49.tar.gz/spa/plugins/audioconvert/resample.c -> pipewire-0.3.50.tar.gz/spa/plugins/audioconvert/resample.c Changed
38
 
1
@@ -391,6 +391,8 @@
2
 
3
 static void update_rate_match(struct impl *this, bool passthrough, uint32_t out_size, uint32_t in_queued)
4
 {
5
+   double r = this->rate_scale / this->props.rate;
6
+
7
    if (this->io_rate_match) {
8
        uint32_t delay, match_size;
9
 
10
@@ -399,9 +401,9 @@
11
            match_size = out_size;
12
        } else {
13
            if (SPA_FLAG_IS_SET(this->io_rate_match->flags, SPA_IO_RATE_MATCH_FLAG_ACTIVE))
14
-               resample_update_rate(&this->resample, this->rate_scale * this->io_rate_match->rate);
15
+               resample_update_rate(&this->resample, r * this->io_rate_match->rate);
16
            else
17
-               resample_update_rate(&this->resample, this->rate_scale);
18
+               resample_update_rate(&this->resample, r);
19
 
20
            delay = resample_delay(&this->resample) + in_queued;
21
            match_size = resample_in_len(&this->resample, out_size);
22
@@ -412,12 +414,13 @@
23
        spa_log_trace_fp(this->log, "%p: next match:%u queued:%u delay:%u", this, match_size,
24
                in_queued, delay);
25
    } else {
26
-       resample_update_rate(&this->resample, this->rate_scale * this->props.rate);
27
+       resample_update_rate(&this->resample, r);
28
    }
29
 }
30
 static inline bool is_passthrough(struct impl *this)
31
 {
32
-   return this->resample.i_rate == this->resample.o_rate && this->rate_scale == 1.0 &&
33
+   return this->resample.i_rate == this->resample.o_rate &&
34
+       this->rate_scale == 1.0 && this->props.rate == 1.0 &&
35
        (this->io_rate_match == NULL || this->props.disabled ||
36
         !SPA_FLAG_IS_SET(this->io_rate_match->flags, SPA_IO_RATE_MATCH_FLAG_ACTIVE));
37
 }
38
pipewire-0.3.49.tar.gz/spa/plugins/audioconvert/test-channelmix.c -> pipewire-0.3.50.tar.gz/spa/plugins/audioconvert/test-channelmix.c Changed
201
 
1
@@ -51,13 +51,14 @@
2
    }
3
 }
4
 
5
-static void test_mix(uint32_t src_chan, uint32_t src_mask, uint32_t dst_chan, uint32_t dst_mask, float *coeff)
6
+static void test_mix(uint32_t src_chan, uint32_t src_mask, uint32_t dst_chan, uint32_t dst_mask, uint32_t options, float *coeff)
7
 {
8
    struct channelmix mix;
9
 
10
    spa_log_debug(&logger.log, "start %d->%d (%08x -> %08x)", src_chan, dst_chan, src_mask, dst_mask);
11
 
12
    spa_zero(mix);
13
+   mix.options = options;
14
    mix.src_chan = src_chan;
15
    mix.dst_chan = dst_chan;
16
    mix.src_mask = src_mask;
17
@@ -70,68 +71,68 @@
18
 
19
 static void test_1_N_MONO(void)
20
 {
21
-   test_mix(1, _M(MONO), 2, _M(FL)|_M(FR),
22
+   test_mix(1, _M(MONO), 2, _M(FL)|_M(FR), 0,
23
            MATRIX(1.0, 1.0));
24
-   test_mix(1, _M(MONO), 3, _M(FL)|_M(FR)|_M(LFE),
25
+   test_mix(1, _M(MONO), 3, _M(FL)|_M(FR)|_M(LFE), 0,
26
            MATRIX(1.0, 1.0, 1.0));
27
-   test_mix(1, _M(MONO), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC),
28
+   test_mix(1, _M(MONO), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 0,
29
            MATRIX(1.0, 1.0, 1.0, 1.0));
30
-   test_mix(1, _M(MONO), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR),
31
+   test_mix(1, _M(MONO), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 0,
32
            MATRIX(1.0, 1.0, 1.0, 1.0));
33
-   test_mix(1, _M(MONO), 12, 0,
34
+   test_mix(1, _M(MONO), 12, 0, 0,
35
            MATRIX(1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
36
                   1.0, 1.0, 1.0, 1.0, 1.0, 1.0));
37
 }
38
 
39
 static void test_1_N_FC(void)
40
 {
41
-   test_mix(1, _M(FC), 2, _M(FL)|_M(FR),
42
+   test_mix(1, _M(FC), 2, _M(FL)|_M(FR), 0,
43
            MATRIX(0.707107, 0.707107));
44
-   test_mix(1, _M(FC), 3, _M(FL)|_M(FR)|_M(LFE),
45
+   test_mix(1, _M(FC), 3, _M(FL)|_M(FR)|_M(LFE), 0,
46
            MATRIX(0.707107, 0.707107, 0.0));
47
-   test_mix(1, _M(FC), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC),
48
+   test_mix(1, _M(FC), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 0,
49
            MATRIX(0.0, 0.0, 1.0, 0.0));
50
-   test_mix(1, _M(FC), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR),
51
+   test_mix(1, _M(FC), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 0,
52
            MATRIX(0.707107, 0.707107, 0.0, 0.0));
53
-   test_mix(1, _M(FC), 12, 0,
54
+   test_mix(1, _M(FC), 12, 0, 0,
55
            MATRIX(1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
56
                   1.0, 1.0, 1.0, 1.0, 1.0, 1.0));
57
 }
58
 
59
 static void test_N_1(void)
60
 {
61
-   test_mix(1, _M(MONO), 1, _M(MONO),
62
+   test_mix(1, _M(MONO), 1, _M(MONO), 0,
63
            MATRIX(1.0));
64
-   test_mix(1, _M(MONO), 1, _M(FC),
65
+   test_mix(1, _M(MONO), 1, _M(FC), 0,
66
            MATRIX(1.0));
67
-   test_mix(1, _M(FC), 1, _M(MONO),
68
+   test_mix(1, _M(FC), 1, _M(MONO), 0,
69
            MATRIX(1.0));
70
-   test_mix(1, _M(FC), 1, _M(FC),
71
+   test_mix(1, _M(FC), 1, _M(FC), 0,
72
            MATRIX(1.0));
73
-   test_mix(2, _M(FL)|_M(FR), 1, _M(MONO),
74
+   test_mix(2, _M(FL)|_M(FR), 1, _M(MONO), 0,
75
            MATRIX(0.707107, 0.707107));
76
-   test_mix(12, 0, 1, _M(MONO),
77
+   test_mix(12, 0, 1, _M(MONO), 0,
78
            MATRIX(0.083333, 0.083333, 0.083333, 0.083333, 0.083333, 0.083333,
79
                   0.083333, 0.083333, 0.083333, 0.083333, 0.083333, 0.0833333));
80
 }
81
 
82
 static void test_3p1_N(void)
83
 {
84
-   test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 1, _M(MONO),
85
+   test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 1, _M(MONO), 0,
86
            MATRIX(0.707107, 0.707107, 1.0, 0.0));
87
-   test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 2, _M(FL)|_M(FR),
88
+   test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 2, _M(FL)|_M(FR), 0,
89
            MATRIX(1.0, 0.0, 0.707107, 0.0,
90
                   0.0, 1.0, 0.707107, 0.0 ));
91
-   test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 3, _M(FL)|_M(FR)|_M(LFE),
92
+   test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 3, _M(FL)|_M(FR)|_M(LFE), 0,
93
            MATRIX(1.0, 0.0, 0.707107, 0.0,
94
                   0.0, 1.0, 0.707107, 0.0,
95
                   0.0, 0.0, 0.0, 1.0 ));
96
-   test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC),
97
+   test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 0,
98
            MATRIX(1.0, 0.0, 0.0, 0.0,
99
                   0.0, 1.0, 0.0, 0.0,
100
                   0.0, 0.0, 1.0, 0.0,
101
                   0.0, 0.0, 0.0, 1.0,));
102
-   test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR),
103
+   test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 0,
104
            MATRIX(1.0, 0.0, 0.707107, 0.0,
105
                   0.0, 1.0, 0.707107, 0.0,
106
                   0.0, 0.0, 0.0, 0.0,
107
@@ -140,26 +141,31 @@
108
 
109
 static void test_4_N(void)
110
 {
111
-   test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 1, _M(MONO),
112
+   test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 1, _M(MONO), 0,
113
            MATRIX(0.707107, 0.707107, 0.5, 0.5));
114
-   test_mix(4, _M(FL)|_M(FR)|_M(SL)|_M(SR), 1, _M(MONO),
115
+   test_mix(4, _M(FL)|_M(FR)|_M(SL)|_M(SR), 1, _M(MONO), 0,
116
            MATRIX(0.707107, 0.707107, 0.5, 0.5));
117
-   test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 2, _M(FL)|_M(FR),
118
+   test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 2, _M(FL)|_M(FR), 0,
119
            MATRIX(1.0, 0.0, 0.707107, 0.0,
120
                   0.0, 1.0, 0.0, 0.707107));
121
-   test_mix(4, _M(FL)|_M(FR)|_M(SL)|_M(SR), 2, _M(FL)|_M(FR),
122
+   test_mix(4, _M(FL)|_M(FR)|_M(SL)|_M(SR), 2, _M(FL)|_M(FR), 0,
123
            MATRIX(1.0, 0.0, 0.707107, 0.0,
124
                   0.0, 1.0, 0.0, 0.707107));
125
-   test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 3, _M(FL)|_M(FR)|_M(LFE),
126
+   test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 3, _M(FL)|_M(FR)|_M(LFE), 0,
127
            MATRIX(1.0, 0.0, 0.707107, 0.0,
128
                   0.0, 1.0, 0.0, 0.707107,
129
                   0.0, 0.0, 0.0, 0.0));
130
-   test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR),
131
+   test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 0,
132
            MATRIX(1.0, 0.0, 0.0, 0.0,
133
                   0.0, 1.0, 0.0, 0.0,
134
                   0.0, 0.0, 1.0, 0.0,
135
                   0.0, 0.0, 0.0, 1.0));
136
-   test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC),
137
+   test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 0,
138
+           MATRIX(1.0, 0.0, 0.707107, 0.0,
139
+                  0.0, 1.0, 0.0, 0.707107,
140
+                  0.0, 0.0, 0.0, 0.0,
141
+                  0.0, 0.0, 0.0, 0.0));
142
+   test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), CHANNELMIX_OPTION_UPMIX,
143
            MATRIX(1.0, 0.0, 0.707107, 0.0,
144
                   0.0, 1.0, 0.0, 0.707107,
145
                   0.707107, 0.707107, 0.0, 0.0,
146
@@ -168,35 +174,35 @@
147
 
148
 static void test_5p1_N(void)
149
 {
150
-   test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 1, _M(MONO),
151
+   test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 1, _M(MONO), 0,
152
            MATRIX(0.707107, 0.707107, 1.0, 0.0, 0.5, 0.5));
153
-   test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 2, _M(FL)|_M(FR),
154
+   test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 2, _M(FL)|_M(FR), 0,
155
            MATRIX(1.0, 0.0, 0.707107, 0.0, 0.707107, 0.0,
156
                   0.0, 1.0, 0.707107, 0.0, 0.0, 0.707107));
157
-   test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(RL)|_M(RR), 2, _M(FL)|_M(FR),
158
+   test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(RL)|_M(RR), 2, _M(FL)|_M(FR), 0,
159
            MATRIX(1.0, 0.0, 0.707107, 0.0, 0.707107, 0.0,
160
                   0.0, 1.0, 0.707107, 0.0, 0.0, 0.707107));
161
-   test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 3, _M(FL)|_M(FR)|_M(LFE),
162
+   test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 3, _M(FL)|_M(FR)|_M(LFE), 0,
163
            MATRIX(1.0, 0.0, 0.707107, 0.0, 0.707107, 0.0,
164
                   0.0, 1.0, 0.707107, 0.0, 0.0, 0.707107,
165
                   0.0, 0.0, 0.0, 1.0, 0.0, 0.0));
166
-   test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC),
167
+   test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 0,
168
            MATRIX(1.0, 0.0, 0.0, 0.0, 0.707107, 0.0,
169
                   0.0, 1.0, 0.0, 0.0, 0.0, 0.707107,
170
                   0.0, 0.0, 1.0, 0.0, 0.0, 0.0,
171
                   0.0, 0.0, 0.0, 1.0, 0.0, 0.0));
172
-   test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR),
173
+   test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 0,
174
            MATRIX(1.0, 0.0, 0.707107, 0.0, 0.0, 0.0,
175
                   0.0, 1.0, 0.707107, 0.0, 0.0, 0.0,
176
                   0.0, 0.0, 0.0, 0.0, 1.0, 0.0,
177
                   0.0, 0.0, 0.0, 0.0, 0.0, 1.0));
178
-   test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 5, _M(FL)|_M(FR)|_M(FC)|_M(SL)|_M(SR),
179
+   test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 5, _M(FL)|_M(FR)|_M(FC)|_M(SL)|_M(SR), 0,
180
            MATRIX(1.0, 0.0, 0.0, 0.0, 0.0, 0.0,
181
                   0.0, 1.0, 0.0, 0.0, 0.0, 0.0,
182
                   0.0, 0.0, 1.0, 0.0, 0.0, 0.0,
183
                   0.0, 0.0, 0.0, 0.0, 1.0, 0.0,
184
                   0.0, 0.0, 0.0, 0.0, 0.0, 1.0));
185
-   test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR),
186
+   test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 0,
187
            MATRIX(1.0, 0.0, 0.0, 0.0, 0.0, 0.0,
188
                   0.0, 1.0, 0.0, 0.0, 0.0, 0.0,
189
                   0.0, 0.0, 1.0, 0.0, 0.0, 0.0,
190
@@ -207,9 +213,9 @@
191
 
192
 static void test_7p1_N(void)
193
 {
194
-   test_mix(8, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR)|_M(RL)|_M(RR), 1, _M(MONO),
195
+   test_mix(8, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR)|_M(RL)|_M(RR), 1, _M(MONO), 0,
196
            MATRIX(0.707107, 0.707107, 1.0, 0.0, 0.5, 0.5, 0.5, 0.5));
197
-   test_mix(8, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR)|_M(RL)|_M(RR), 2, _M(FL)|_M(FR),
198
+   test_mix(8, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR)|_M(RL)|_M(RR), 2, _M(FL)|_M(FR), 0,
199
            MATRIX(1.0, 0.0, 0.707107, 0.0, 0.707107, 0.0, 0.707107, 0.0,
200
                   0.0, 1.0, 0.707107, 0.0, 0.0, 0.707107, 0.0, 0.707107));
201
pipewire-0.3.49.tar.gz/spa/plugins/audioconvert/test-source.c -> pipewire-0.3.50.tar.gz/spa/plugins/audioconvert/test-source.c Changed
18
 
1
@@ -216,14 +216,14 @@
2
            param = spa_pod_builder_add_object(&b,
3
                SPA_TYPE_OBJECT_PropInfo, id,
4
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_volume),
5
-               SPA_PROP_INFO_name, SPA_POD_String("Volume"),
6
+               SPA_PROP_INFO_description, SPA_POD_String("Volume"),
7
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->volume, 0.0, 10.0));
8
            break;
9
        case 1:
10
            param = spa_pod_builder_add_object(&b,
11
                SPA_TYPE_OBJECT_PropInfo, id,
12
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_mute),
13
-               SPA_PROP_INFO_name, SPA_POD_String("Mute"),
14
+               SPA_PROP_INFO_description, SPA_POD_String("Mute"),
15
                SPA_PROP_INFO_type, SPA_POD_CHOICE_Bool(p->mute));
16
            break;
17
        default:
18
pipewire-0.3.49.tar.gz/spa/plugins/audiotestsrc/audiotestsrc.c -> pipewire-0.3.50.tar.gz/spa/plugins/audiotestsrc/audiotestsrc.c Changed
35
 
1
@@ -177,14 +177,14 @@
2
            param = spa_pod_builder_add_object(&b,
3
                SPA_TYPE_OBJECT_PropInfo, id,
4
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_live),
5
-               SPA_PROP_INFO_name, SPA_POD_String("Configure live mode of the source"),
6
+               SPA_PROP_INFO_description, SPA_POD_String("Configure live mode of the source"),
7
                SPA_PROP_INFO_type, SPA_POD_Bool(p->live));
8
            break;
9
        case 1:
10
            spa_pod_builder_push_object(&b, &f0, SPA_TYPE_OBJECT_PropInfo, id);
11
            spa_pod_builder_add(&b,
12
                SPA_PROP_INFO_id,     SPA_POD_Id(SPA_PROP_waveType),
13
-               SPA_PROP_INFO_name,   SPA_POD_String("Select the waveform"),
14
+               SPA_PROP_INFO_description,   SPA_POD_String("Select the waveform"),
15
                SPA_PROP_INFO_type,   SPA_POD_Int(p->wave),
16
                0);
17
            spa_pod_builder_prop(&b, SPA_PROP_INFO_labels, 0);
18
@@ -200,14 +200,14 @@
19
            param = spa_pod_builder_add_object(&b,
20
                SPA_TYPE_OBJECT_PropInfo, id,
21
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_frequency),
22
-               SPA_PROP_INFO_name, SPA_POD_String("Select the frequency"),
23
+               SPA_PROP_INFO_description, SPA_POD_String("Select the frequency"),
24
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->freq, 0.0, 50000000.0));
25
            break;
26
        case 3:
27
            param = spa_pod_builder_add_object(&b,
28
                SPA_TYPE_OBJECT_PropInfo, id,
29
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_volume),
30
-               SPA_PROP_INFO_name, SPA_POD_String("Select the volume"),
31
+               SPA_PROP_INFO_description, SPA_POD_String("Select the volume"),
32
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->volume, 0.0, 10.0));
33
            break;
34
        default:
35
pipewire-0.3.49.tar.gz/spa/plugins/bluez5/a2dp-codec-ldac.c -> pipewire-0.3.50.tar.gz/spa/plugins/bluez5/a2dp-codec-ldac.c Changed
10
 
1
@@ -317,7 +317,7 @@
2
            spa_pod_builder_push_object(b, &f0, SPA_TYPE_OBJECT_PropInfo, id);
3
            spa_pod_builder_prop(b, SPA_PROP_INFO_id, 0);
4
            spa_pod_builder_id(b, SPA_PROP_quality);
5
-           spa_pod_builder_prop(b, SPA_PROP_INFO_name, 0);
6
+           spa_pod_builder_prop(b, SPA_PROP_INFO_description, 0);
7
            spa_pod_builder_string(b, "LDAC quality");
8
 
9
            spa_pod_builder_prop(b, SPA_PROP_INFO_type, 0);
10
pipewire-0.3.49.tar.gz/spa/plugins/bluez5/a2dp-sink.c -> pipewire-0.3.50.tar.gz/spa/plugins/bluez5/a2dp-sink.c Changed
26
 
1
@@ -212,21 +212,21 @@
2
            param = spa_pod_builder_add_object(&b,
3
                SPA_TYPE_OBJECT_PropInfo, id,
4
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_minLatency),
5
-               SPA_PROP_INFO_name, SPA_POD_String("The minimum latency"),
6
+               SPA_PROP_INFO_description, SPA_POD_String("The minimum latency"),
7
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Int(p->min_latency, 1, INT32_MAX));
8
            break;
9
        case 1:
10
            param = spa_pod_builder_add_object(&b,
11
                SPA_TYPE_OBJECT_PropInfo, id,
12
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_maxLatency),
13
-               SPA_PROP_INFO_name, SPA_POD_String("The maximum latency"),
14
+               SPA_PROP_INFO_description, SPA_POD_String("The maximum latency"),
15
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Int(p->max_latency, 1, INT32_MAX));
16
            break;
17
        case 2:
18
            param = spa_pod_builder_add_object(&b,
19
                SPA_TYPE_OBJECT_PropInfo, id,
20
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_latencyOffsetNsec),
21
-               SPA_PROP_INFO_name, SPA_POD_String("Latency offset (ns)"),
22
+               SPA_PROP_INFO_description, SPA_POD_String("Latency offset (ns)"),
23
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Long(0LL, INT64_MIN, INT64_MAX));
24
            break;
25
        default:
26
pipewire-0.3.49.tar.gz/spa/plugins/bluez5/a2dp-source.c -> pipewire-0.3.50.tar.gz/spa/plugins/bluez5/a2dp-source.c Changed
18
 
1
@@ -206,14 +206,14 @@
2
            param = spa_pod_builder_add_object(&b,
3
                SPA_TYPE_OBJECT_PropInfo, id,
4
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_minLatency),
5
-               SPA_PROP_INFO_name, SPA_POD_String("The minimum latency"),
6
+               SPA_PROP_INFO_description, SPA_POD_String("The minimum latency"),
7
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Int(p->min_latency, 1, INT32_MAX));
8
            break;
9
        case 1:
10
            param = spa_pod_builder_add_object(&b,
11
                SPA_TYPE_OBJECT_PropInfo, id,
12
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_maxLatency),
13
-               SPA_PROP_INFO_name, SPA_POD_String("The maximum latency"),
14
+               SPA_PROP_INFO_description, SPA_POD_String("The maximum latency"),
15
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Int(p->max_latency, 1, INT32_MAX));
16
            break;
17
        default:
18
pipewire-0.3.49.tar.gz/spa/plugins/bluez5/bluez5-device.c -> pipewire-0.3.50.tar.gz/spa/plugins/bluez5/bluez5-device.c Changed
10
 
1
@@ -1523,7 +1523,7 @@
2
    /* Transport codec */
3
    spa_pod_builder_prop(b, SPA_PROP_INFO_id, 0);
4
    spa_pod_builder_id(b, SPA_PROP_bluetoothAudioCodec);
5
-   spa_pod_builder_prop(b, SPA_PROP_INFO_name, 0);
6
+   spa_pod_builder_prop(b, SPA_PROP_INFO_description, 0);
7
    spa_pod_builder_string(b, "Air codec");
8
    spa_pod_builder_prop(b, SPA_PROP_INFO_type, 0);
9
    spa_pod_builder_push_choice(b, &f1, SPA_CHOICE_Enum, 0);
10
pipewire-0.3.49.tar.gz/spa/plugins/bluez5/sco-sink.c -> pipewire-0.3.50.tar.gz/spa/plugins/bluez5/sco-sink.c Changed
18
 
1
@@ -206,14 +206,14 @@
2
            param = spa_pod_builder_add_object(&b,
3
                SPA_TYPE_OBJECT_PropInfo, id,
4
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_minLatency),
5
-               SPA_PROP_INFO_name, SPA_POD_String("The minimum latency"),
6
+               SPA_PROP_INFO_description, SPA_POD_String("The minimum latency"),
7
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Int(p->min_latency, 1, INT32_MAX));
8
            break;
9
        case 1:
10
            param = spa_pod_builder_add_object(&b,
11
                SPA_TYPE_OBJECT_PropInfo, id,
12
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_maxLatency),
13
-               SPA_PROP_INFO_name, SPA_POD_String("The maximum latency"),
14
+               SPA_PROP_INFO_description, SPA_POD_String("The maximum latency"),
15
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Int(p->max_latency, 1, INT32_MAX));
16
            break;
17
        default:
18
pipewire-0.3.49.tar.gz/spa/plugins/bluez5/sco-source.c -> pipewire-0.3.50.tar.gz/spa/plugins/bluez5/sco-source.c Changed
18
 
1
@@ -191,14 +191,14 @@
2
            param = spa_pod_builder_add_object(&b,
3
                SPA_TYPE_OBJECT_PropInfo, id,
4
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_minLatency),
5
-               SPA_PROP_INFO_name, SPA_POD_String("The minimum latency"),
6
+               SPA_PROP_INFO_description, SPA_POD_String("The minimum latency"),
7
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Int(p->min_latency, 1, INT32_MAX));
8
            break;
9
        case 1:
10
            param = spa_pod_builder_add_object(&b,
11
                SPA_TYPE_OBJECT_PropInfo, id,
12
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_maxLatency),
13
-               SPA_PROP_INFO_name, SPA_POD_String("The maximum latency"),
14
+               SPA_PROP_INFO_description, SPA_POD_String("The maximum latency"),
15
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Int(p->max_latency, 1, INT32_MAX));
16
            break;
17
        default:
18
pipewire-0.3.49.tar.gz/spa/plugins/libcamera/libcamera-source.cpp -> pipewire-0.3.50.tar.gz/spa/plugins/libcamera/libcamera-source.cpp Changed
18
 
1
@@ -205,14 +205,14 @@
2
            param = (struct spa_pod*)spa_pod_builder_add_object(&b,
3
                SPA_TYPE_OBJECT_PropInfo, id,
4
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_device),
5
-               SPA_PROP_INFO_name, SPA_POD_String("The libcamera device"),
6
+               SPA_PROP_INFO_description, SPA_POD_String("The libcamera device"),
7
                SPA_PROP_INFO_type, SPA_POD_String(p->device));
8
            break;
9
        case 1:
10
            param = (struct spa_pod*)spa_pod_builder_add_object(&b,
11
                SPA_TYPE_OBJECT_PropInfo, id,
12
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_deviceName),
13
-               SPA_PROP_INFO_name, SPA_POD_String("The libcamera device name"),
14
+               SPA_PROP_INFO_description, SPA_POD_String("The libcamera device name"),
15
                SPA_PROP_INFO_type, SPA_POD_String(p->device_name));
16
            break;
17
        default:
18
pipewire-0.3.49.tar.gz/spa/plugins/v4l2/v4l2-source.c -> pipewire-0.3.50.tar.gz/spa/plugins/v4l2/v4l2-source.c Changed
26
 
1
@@ -198,21 +198,21 @@
2
            param = spa_pod_builder_add_object(&b,
3
                SPA_TYPE_OBJECT_PropInfo, id,
4
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_device),
5
-               SPA_PROP_INFO_name, SPA_POD_String("The V4L2 device"),
6
+               SPA_PROP_INFO_description, SPA_POD_String("The V4L2 device"),
7
                SPA_PROP_INFO_type, SPA_POD_String(p->device));
8
            break;
9
        case 1:
10
            param = spa_pod_builder_add_object(&b,
11
                SPA_TYPE_OBJECT_PropInfo, id,
12
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_deviceName),
13
-               SPA_PROP_INFO_name, SPA_POD_String("The V4L2 device name"),
14
+               SPA_PROP_INFO_description, SPA_POD_String("The V4L2 device name"),
15
                SPA_PROP_INFO_type, SPA_POD_String(p->device_name));
16
            break;
17
        case 2:
18
            param = spa_pod_builder_add_object(&b,
19
                SPA_TYPE_OBJECT_PropInfo, id,
20
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_deviceFd),
21
-               SPA_PROP_INFO_name, SPA_POD_String("The V4L2 fd"),
22
+               SPA_PROP_INFO_description, SPA_POD_String("The V4L2 fd"),
23
                SPA_PROP_INFO_type, SPA_POD_Int(p->device_fd));
24
            break;
25
        default:
26
pipewire-0.3.49.tar.gz/spa/plugins/v4l2/v4l2-utils.c -> pipewire-0.3.50.tar.gz/spa/plugins/v4l2/v4l2-utils.c Changed
27
 
1
@@ -1160,14 +1160,14 @@
2
                            queryctrl.minimum,
3
                            queryctrl.maximum,
4
                            queryctrl.step),
5
-           SPA_PROP_INFO_name, SPA_POD_String(queryctrl.name));
6
+           SPA_PROP_INFO_description, SPA_POD_String(queryctrl.name));
7
        break;
8
    case V4L2_CTRL_TYPE_BOOLEAN:
9
        param = spa_pod_builder_add_object(&b,
10
            SPA_TYPE_OBJECT_PropInfo, SPA_PARAM_PropInfo,
11
            SPA_PROP_INFO_id,   SPA_POD_Id(prop_id),
12
            SPA_PROP_INFO_type, SPA_POD_CHOICE_Bool(queryctrl.default_value),
13
-           SPA_PROP_INFO_name, SPA_POD_String(queryctrl.name));
14
+           SPA_PROP_INFO_description, SPA_POD_String(queryctrl.name));
15
        break;
16
    case V4L2_CTRL_TYPE_MENU:
17
    {
18
@@ -1178,7 +1178,7 @@
19
        spa_pod_builder_add(&b,
20
            SPA_PROP_INFO_id,    SPA_POD_Id(prop_id),
21
            SPA_PROP_INFO_type,  SPA_POD_CHOICE_ENUM_Int(1, queryctrl.default_value),
22
-           SPA_PROP_INFO_name,  SPA_POD_String(queryctrl.name),
23
+           SPA_PROP_INFO_description,  SPA_POD_String(queryctrl.name),
24
            0);
25
 
26
        spa_zero(querymenu);
27
pipewire-0.3.49.tar.gz/spa/plugins/videotestsrc/videotestsrc.c -> pipewire-0.3.50.tar.gz/spa/plugins/videotestsrc/videotestsrc.c Changed
18
 
1
@@ -158,14 +158,14 @@
2
            param = spa_pod_builder_add_object(&b,
3
                SPA_TYPE_OBJECT_PropInfo, id,
4
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_live),
5
-               SPA_PROP_INFO_name, SPA_POD_String("Configure live mode of the source"),
6
+               SPA_PROP_INFO_description, SPA_POD_String("Configure live mode of the source"),
7
                SPA_PROP_INFO_type, SPA_POD_Bool(p->live));
8
            break;
9
        case 1:
10
            spa_pod_builder_push_object(&b, &f0, SPA_TYPE_OBJECT_PropInfo, id);
11
            spa_pod_builder_add(&b,
12
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_patternType),
13
-               SPA_PROP_INFO_name, SPA_POD_String("The pattern"),
14
+               SPA_PROP_INFO_description, SPA_POD_String("The pattern"),
15
                SPA_PROP_INFO_type, SPA_POD_Int(p->pattern),
16
                0);
17
            spa_pod_builder_prop(&b, SPA_PROP_INFO_labels, 0),
18
pipewire-0.3.49.tar.gz/spa/plugins/volume/volume.c -> pipewire-0.3.50.tar.gz/spa/plugins/volume/volume.c Changed
18
 
1
@@ -145,14 +145,14 @@
2
            param = spa_pod_builder_add_object(&b,
3
                SPA_TYPE_OBJECT_PropInfo, id,
4
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_volume),
5
-               SPA_PROP_INFO_name, SPA_POD_String("The volume"),
6
+               SPA_PROP_INFO_description, SPA_POD_String("The volume"),
7
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->volume, 0.0, 10.0));
8
            break;
9
        case 1:
10
            param = spa_pod_builder_add_object(&b,
11
                SPA_TYPE_OBJECT_PropInfo, id,
12
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_mute),
13
-               SPA_PROP_INFO_name, SPA_POD_String("Mute"),
14
+               SPA_PROP_INFO_description, SPA_POD_String("Mute"),
15
                SPA_PROP_INFO_type, SPA_POD_Bool(p->mute));
16
            break;
17
        default:
18
pipewire-0.3.49.tar.gz/spa/plugins/vulkan/vulkan-compute-source.c -> pipewire-0.3.50.tar.gz/spa/plugins/vulkan/vulkan-compute-source.c Changed
10
 
1
@@ -155,7 +155,7 @@
2
            param = spa_pod_builder_add_object(&b,
3
                SPA_TYPE_OBJECT_PropInfo, id,
4
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_live),
5
-               SPA_PROP_INFO_name, SPA_POD_String("Configure live mode of the source"),
6
+               SPA_PROP_INFO_description, SPA_POD_String("Configure live mode of the source"),
7
                SPA_PROP_INFO_type, SPA_POD_Bool(p->live));
8
            break;
9
        default:
10
pipewire-0.3.49.tar.gz/src/daemon/client-rt.conf.in -> pipewire-0.3.50.tar.gz/src/daemon/client-rt.conf.in Changed
16
 
1
@@ -84,10 +84,10 @@
2
     #channelmix.normalize  = false
3
     #channelmix.mix-lfe    = true
4
     #channelmix.upmix      = true
5
-    #channelmix.upmix-method = simple  # none, psd
6
-    #channelmix.lfe-cutoff = 120
7
-    #channelmix.fc-cutoff  = 6000
8
+    #channelmix.upmix-method = psd  # none, simple
9
+    #channelmix.lfe-cutoff = 150
10
+    #channelmix.fc-cutoff  = 12000
11
     #channelmix.rear-delay = 12.0
12
-    #channelmix.stereo-widen = 0.1
13
+    #channelmix.stereo-widen = 0.0
14
     #channelmix.hilbert-taps = 0
15
 }
16
pipewire-0.3.49.tar.gz/src/daemon/client.conf.in -> pipewire-0.3.50.tar.gz/src/daemon/client.conf.in Changed
16
 
1
@@ -74,10 +74,10 @@
2
     #channelmix.normalize  = false
3
     #channelmix.mix-lfe    = false
4
     #channelmix.upmix      = true
5
-    #channelmix.upmix-method = simple  # none, psd
6
-    #channelmix.lfe-cutoff = 120
7
-    #channelmix.fc-cutoff  = 6000
8
+    #channelmix.upmix-method = psd  # none, simple
9
+    #channelmix.lfe-cutoff = 150
10
+    #channelmix.fc-cutoff  = 12000
11
     #channelmix.rear-delay = 12.0
12
-    #channelmix.stereo-widen = 0.1
13
+    #channelmix.stereo-widen = 0.0
14
     #channelmix.hilbert-taps = 0
15
 }
16
pipewire-0.3.49.tar.gz/src/daemon/minimal.conf.in -> pipewire-0.3.50.tar.gz/src/daemon/minimal.conf.in Changed
33
 
1
@@ -205,11 +205,11 @@
2
             #channelmix.normalize   = false
3
             #channelmix.mix-lfe     = false
4
             #channelmix.upmix       = true
5
-            #channelmix.upmix-method = simple  # none, psd
6
-            #channelmix.lfe-cutoff  = 120
7
-            #channelmix.fc-cutoff   = 6000
8
+            #channelmix.upmix-method = psd  # none, simple
9
+            #channelmix.lfe-cutoff  = 150
10
+            #channelmix.fc-cutoff   = 12000
11
             #channelmix.rear-delay  = 12.0
12
-            #channelmix.stereo-widen = 0.1
13
+            #channelmix.stereo-widen = 0.0
14
             #channelmix.hilbert-taps = 0
15
             channelmix.disable     = true
16
             #node.param.Props      = {
17
@@ -265,11 +265,11 @@
18
             #channelmix.normalize  = false
19
             #channelmix.mix-lfe    = false
20
             #channelmix.upmix      = true
21
-            #channelmix.upmix-method = simple  # none, psd
22
-            #channelmix.lfe-cutoff = 120
23
-            #channelmix.fc-cutoff  = 6000
24
+            #channelmix.upmix-method = psd  # none, simple
25
+            #channelmix.lfe-cutoff = 150
26
+            #channelmix.fc-cutoff  = 12000
27
             #channelmix.rear-delay = 12.0
28
-            #channelmix.stereo-widen = 0.1
29
+            #channelmix.stereo-widen = 0.0
30
             #channelmix.hilbert-taps = 0
31
             channelmix.disable     = true
32
             #node.param.Props      = {
33
pipewire-0.3.49.tar.gz/src/daemon/pipewire-pulse.conf.in -> pipewire-0.3.50.tar.gz/src/daemon/pipewire-pulse.conf.in Changed
25
 
1
@@ -60,11 +60,11 @@
2
     #channelmix.normalize  = false
3
     #channelmix.mix-lfe    = false
4
     #channelmix.upmix      = true
5
-    #channelmix.upmix-method = simple  # none, psd
6
-    #channelmix.lfe-cutoff = 120
7
-    #channelmix.fc-cutoff  = 6000
8
+    #channelmix.upmix-method = psd  # none, simple
9
+    #channelmix.lfe-cutoff = 150
10
+    #channelmix.fc-cutoff  = 12000
11
     #channelmix.rear-delay = 12.0
12
-    #channelmix.stereo-widen = 0.1
13
+    #channelmix.stereo-widen = 0.0
14
     #channelmix.hilbert-taps = 0
15
 }
16
 
17
@@ -122,6 +122,7 @@
18
         # skype does not want to use devices that don't have an S16 sample format.
19
         matches = 
20
              { application.process.binary = "teams" }
21
+             { application.process.binary = "teams-insiders" }
22
              { application.process.binary = "skypeforlinux" }
23
         
24
         actions = { quirks =  force-s16-info  }
25
pipewire-0.3.49.tar.gz/src/modules/meson.build -> pipewire-0.3.50.tar.gz/src/modules/meson.build Changed
10
 
1
@@ -139,7 +139,7 @@
2
   dependencies : dbus_dep, mathlib, dl_lib, pipewire_dep,
3
 )
4
 
5
-build_module_rtkit = dbus_dep.found()
6
+build_module_rtkit = dbus_dep.found() and (get_option('legacy-rtkit') == true)
7
 if build_module_rtkit
8
 # TODO: This serves as a temporary alias to prevent breaking existing setups
9
 #       while `module-rtkit` is being migrated to `module-rt`
10
pipewire-0.3.49.tar.gz/src/modules/module-client-device.c -> pipewire-0.3.50.tar.gz/src/modules/module-client-device.c Changed
32
 
1
@@ -175,6 +175,7 @@
2
    struct pw_context *context = pw_impl_module_get_context(module);
3
    struct pw_impl_factory *factory;
4
    struct factory_data *data;
5
+   int res;
6
 
7
    PW_LOG_TOPIC_INIT(mod_topic);
8
    factory = pw_context_create_factory(context,
9
@@ -198,15 +199,19 @@
10
                      &impl_factory,
11
                      data);
12
 
13
-   pw_protocol_native_ext_client_device_init(context);
14
-
15
    data->export_spadevice.type = SPA_TYPE_INTERFACE_Device;
16
    data->export_spadevice.func = pw_core_spa_device_export;
17
-   pw_context_register_export_type(context, &data->export_spadevice);
18
+   if ((res = pw_context_register_export_type(context, &data->export_spadevice)) < 0)
19
+       goto error;
20
+
21
+   pw_protocol_native_ext_client_device_init(context);
22
 
23
    pw_impl_module_add_listener(module, &data->module_listener, &module_events, data);
24
 
25
    pw_impl_module_update_properties(module, &SPA_DICT_INIT_ARRAY(module_props));
26
 
27
    return 0;
28
+error:
29
+   pw_impl_factory_destroy(data->this);
30
+   return res;
31
 }
32
pipewire-0.3.49.tar.gz/src/modules/module-client-node.c -> pipewire-0.3.50.tar.gz/src/modules/module-client-node.c Changed
42
 
1
@@ -163,6 +163,7 @@
2
    struct pw_context *context = pw_impl_module_get_context(module);
3
    struct pw_impl_factory *factory;
4
    struct factory_data *data;
5
+   int res;
6
 
7
    PW_LOG_TOPIC_INIT(mod_topic);
8
 
9
@@ -185,20 +186,27 @@
10
                      &impl_factory,
11
                      data);
12
 
13
-   pw_protocol_native_ext_client_node_init(context);
14
-   pw_protocol_native_ext_client_node0_init(context);
15
-
16
    data->export_node.type = PW_TYPE_INTERFACE_Node;
17
    data->export_node.func = pw_core_node_export;
18
-   pw_context_register_export_type(context, &data->export_node);
19
+   if ((res = pw_context_register_export_type(context, &data->export_node)) < 0)
20
+       goto error;
21
 
22
    data->export_spanode.type = SPA_TYPE_INTERFACE_Node;
23
    data->export_spanode.func = pw_core_spa_node_export;
24
-   pw_context_register_export_type(context, &data->export_spanode);
25
+   if ((res = pw_context_register_export_type(context, &data->export_spanode)) < 0)
26
+       goto error_remove;
27
+
28
+   pw_protocol_native_ext_client_node_init(context);
29
+   pw_protocol_native_ext_client_node0_init(context);
30
 
31
    pw_impl_module_add_listener(module, &data->module_listener, &module_events, data);
32
 
33
    pw_impl_module_update_properties(module, &SPA_DICT_INIT_ARRAY(module_props));
34
 
35
    return 0;
36
+error_remove:
37
+   spa_list_remove(&data->export_node.link);
38
+error:
39
+   pw_impl_factory_destroy(data->this);
40
+   return res;
41
 }
42
pipewire-0.3.49.tar.gz/src/modules/module-echo-cancel.c -> pipewire-0.3.50.tar.gz/src/modules/module-echo-cancel.c Changed
152
 
1
@@ -153,8 +153,6 @@
2
    struct pw_impl_module *module;
3
    struct spa_hook module_listener;
4
 
5
-   uint32_t id;
6
-
7
    struct pw_core *core;
8
    struct spa_hook core_proxy_listener;
9
    struct spa_hook core_listener;
10
@@ -169,7 +167,6 @@
11
    void *rec_bufferSPA_AUDIO_MAX_CHANNELS;
12
    uint32_t rec_ringsize;
13
    struct spa_ringbuffer rec_ring;
14
-   struct spa_io_rate_match *rec_rate_match;
15
 
16
    struct pw_stream *playback;
17
    struct spa_hook playback_listener;
18
@@ -180,7 +177,6 @@
19
    uint32_t play_ringsize;
20
    struct spa_ringbuffer play_ring;
21
    struct spa_ringbuffer play_delayed_ring;
22
-   struct spa_io_rate_match *play_rate_match;
23
 
24
    void *out_bufferSPA_AUDIO_MAX_CHANNELS;
25
    uint32_t out_ringsize;
26
@@ -338,17 +334,6 @@
27
    impl->capture = NULL;
28
 }
29
 
30
-static void capture_io_changed(void *data, uint32_t id, void *area, uint32_t size)
31
-{
32
-   struct impl *impl = data;
33
-
34
-   switch (id) {
35
-   case SPA_IO_RateMatch:
36
-       impl->rec_rate_match = area;
37
-       break;
38
-   }
39
-}
40
-
41
 static void capture_process(void *data)
42
 {
43
    struct impl *impl = data;
44
@@ -382,7 +367,7 @@
45
     * if it has a specific requirement, else keep the block size the same
46
     * on input and output or what the resampler needs */
47
    if (impl->aec_blocksize == 0) {
48
-       impl->aec_blocksize = SPA_MAX(size, impl->rec_rate_match->size);
49
+       impl->aec_blocksize = size;
50
        pw_log_debug("Setting AEC block size to %u", impl->aec_blocksize);
51
    }
52
 
53
@@ -454,7 +439,6 @@
54
    PW_VERSION_STREAM_EVENTS,
55
    .destroy = capture_destroy,
56
    .state_changed = input_state_changed,
57
-   .io_changed = capture_io_changed,
58
    .process = capture_process,
59
    .param_changed = input_param_changed
60
 };
61
@@ -523,17 +507,6 @@
62
    impl->sink = NULL;
63
 }
64
 
65
-static void sink_io_changed(void *data, uint32_t id, void *area, uint32_t size)
66
-{
67
-   struct impl *impl = data;
68
-
69
-   switch (id) {
70
-   case SPA_IO_RateMatch:
71
-       impl->play_rate_match = area;
72
-       break;
73
-   }
74
-}
75
-
76
 static void sink_process(void *data)
77
 {
78
    struct impl *impl = data;
79
@@ -567,7 +540,7 @@
80
    }
81
 
82
    if (impl->aec_blocksize == 0) {
83
-       impl->aec_blocksize = SPA_MAX(size, impl->rec_rate_match->size);
84
+       impl->aec_blocksize = size;
85
        pw_log_debug("Setting AEC block size to %u", impl->aec_blocksize);
86
    }
87
 
88
@@ -608,7 +581,6 @@
89
 static const struct pw_stream_events sink_events = {
90
    PW_VERSION_STREAM_EVENTS,
91
    .destroy = sink_destroy,
92
-   .io_changed = sink_io_changed,
93
    .process = sink_process,
94
    .state_changed = output_state_changed,
95
    .param_changed = output_param_changed
96
@@ -638,6 +610,10 @@
97
        pw_properties_set(props, PW_KEY_NODE_LATENCY, str);
98
    else if (impl->aec->latency)
99
        pw_properties_set(props, PW_KEY_NODE_LATENCY, impl->aec->latency);
100
+   if ((str = pw_properties_get(impl->source_props, SPA_KEY_AUDIO_CHANNELS)) != NULL)
101
+       pw_properties_set(props, SPA_KEY_AUDIO_CHANNELS, str);
102
+   if ((str = pw_properties_get(impl->source_props, SPA_KEY_AUDIO_POSITION)) != NULL)
103
+       pw_properties_set(props, SPA_KEY_AUDIO_POSITION, str);
104
 
105
    impl->capture = pw_stream_new(impl->core,
106
            "Echo-Cancel Capture", props);
107
@@ -671,6 +647,10 @@
108
        pw_properties_set(props, PW_KEY_NODE_LATENCY, str);
109
    else if (impl->aec->latency)
110
        pw_properties_set(props, PW_KEY_NODE_LATENCY, impl->aec->latency);
111
+   if ((str = pw_properties_get(impl->sink_props, SPA_KEY_AUDIO_CHANNELS)) != NULL)
112
+       pw_properties_set(props, SPA_KEY_AUDIO_CHANNELS, str);
113
+   if ((str = pw_properties_get(impl->sink_props, SPA_KEY_AUDIO_POSITION)) != NULL)
114
+       pw_properties_set(props, SPA_KEY_AUDIO_POSITION, str);
115
 
116
    impl->playback = pw_stream_new(impl->core,
117
            "Echo-Cancel Playback", props);
118
@@ -877,6 +857,7 @@
119
    struct pw_properties *props, *aec_props;
120
    struct impl *impl;
121
    uint32_t id = pw_global_get_id(pw_impl_module_get_global(module));
122
+   uint32_t pid = getpid();
123
    const char *str;
124
    const char *path;
125
    int res = 0;
126
@@ -909,14 +890,13 @@
127
        goto error;
128
    }
129
 
130
-   impl->id = id;
131
    impl->module = module;
132
    impl->context = context;
133
 
134
    if (pw_properties_get(props, PW_KEY_NODE_GROUP) == NULL)
135
-       pw_properties_setf(props, PW_KEY_NODE_GROUP, "echo-cancel-%u", id);
136
+       pw_properties_setf(props, PW_KEY_NODE_GROUP, "echo-cancel-%u-%u", pid, id);
137
    if (pw_properties_get(props, PW_KEY_NODE_LINK_GROUP) == NULL)
138
-       pw_properties_setf(props, PW_KEY_NODE_LINK_GROUP, "echo-cancel-%u", id);
139
+       pw_properties_setf(props, PW_KEY_NODE_LINK_GROUP, "echo-cancel-%u-%u", pid, id);
140
    if (pw_properties_get(props, PW_KEY_NODE_VIRTUAL) == NULL)
141
        pw_properties_set(props, PW_KEY_NODE_VIRTUAL, "true");
142
 
143
@@ -1052,6 +1032,8 @@
144
    copy_props(impl, props, PW_KEY_NODE_LINK_GROUP);
145
    copy_props(impl, props, PW_KEY_NODE_VIRTUAL);
146
    copy_props(impl, props, PW_KEY_NODE_LATENCY);
147
+   copy_props(impl, props, SPA_KEY_AUDIO_CHANNELS);
148
+   copy_props(impl, props, SPA_KEY_AUDIO_POSITION);
149
 
150
    impl->max_buffer_size = pw_properties_get_uint32(props,"buffer.max_size", MAX_BUFSIZE_MS);
151
 
152
pipewire-0.3.49.tar.gz/src/modules/module-example-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-example-sink.c Changed
37
 
1
@@ -366,6 +366,7 @@
2
    struct pw_context *context = pw_impl_module_get_context(module);
3
    struct pw_properties *props = NULL;
4
    uint32_t id = pw_global_get_id(pw_impl_module_get_global(module));
5
+   uint32_t pid = getpid();
6
    struct impl *impl;
7
    const char *str;
8
    int res;
9
@@ -400,8 +401,8 @@
10
    impl->context = context;
11
    impl->work = pw_context_get_work_queue(context);
12
 
13
-   if (pw_properties_get(props, PW_KEY_NODE_GROUP) == NULL)
14
-       pw_properties_set(props, PW_KEY_NODE_GROUP, "pipewire.dummy");
15
+   if (pw_properties_get(props, PW_KEY_NODE_WANT_DRIVER) == NULL)
16
+       pw_properties_set(props, PW_KEY_NODE_WANT_DRIVER, "true");
17
    if (pw_properties_get(props, PW_KEY_NODE_VIRTUAL) == NULL)
18
        pw_properties_set(props, PW_KEY_NODE_VIRTUAL, "true");
19
 
20
@@ -409,7 +410,7 @@
21
        pw_properties_set(props, PW_KEY_MEDIA_CLASS, "Audio/Sink");
22
 
23
    if (pw_properties_get(props, PW_KEY_NODE_NAME) == NULL)
24
-       pw_properties_setf(props, PW_KEY_NODE_NAME, "example-sink-%u", id);
25
+       pw_properties_setf(props, PW_KEY_NODE_NAME, "example-sink-%u-%u", pid, id);
26
    if (pw_properties_get(props, PW_KEY_NODE_DESCRIPTION) == NULL)
27
        pw_properties_set(props, PW_KEY_NODE_DESCRIPTION,
28
                pw_properties_get(props, PW_KEY_NODE_NAME));
29
@@ -423,6 +424,7 @@
30
    copy_props(impl, props, PW_KEY_NODE_NAME);
31
    copy_props(impl, props, PW_KEY_NODE_DESCRIPTION);
32
    copy_props(impl, props, PW_KEY_NODE_GROUP);
33
+   copy_props(impl, props, PW_KEY_NODE_WANT_DRIVER);
34
    copy_props(impl, props, PW_KEY_NODE_LATENCY);
35
    copy_props(impl, props, PW_KEY_NODE_VIRTUAL);
36
    copy_props(impl, props, PW_KEY_MEDIA_CLASS);
37
pipewire-0.3.49.tar.gz/src/modules/module-example-source.c -> pipewire-0.3.50.tar.gz/src/modules/module-example-source.c Changed
84
 
1
@@ -95,7 +95,6 @@
2
    struct pw_properties *stream_props;
3
    struct pw_stream *stream;
4
    struct spa_hook stream_listener;
5
-   struct spa_io_rate_match *rate_match;
6
    struct spa_audio_info_raw info;
7
    uint32_t frame_size;
8
 
9
@@ -157,10 +156,7 @@
10
    bd = &buf->buffer->datas0;
11
 
12
    data = bd->data;
13
-   if (impl->rate_match)
14
-       size = SPA_MIN(impl->rate_match->size * impl->frame_size, bd->maxsize);
15
-   else
16
-       size = bd->maxsize;
17
+   size = buf->requested ? buf->requested * impl->frame_size : bd->maxsize;
18
 
19
    /* fill buffer contents here */
20
    pw_log_info("fill buffer data %p with up to %u bytes", data, size);
21
@@ -168,25 +164,15 @@
22
    bd->chunk->size = size;
23
    bd->chunk->stride = impl->frame_size;
24
    bd->chunk->offset = 0;
25
+   buf->size = size / impl->frame_size;
26
 
27
    pw_stream_queue_buffer(impl->stream, buf);
28
 }
29
 
30
-static void stream_io_changed(void *data, uint32_t id, void *area, uint32_t size)
31
-{
32
-   struct impl *impl = data;
33
-   switch (id) {
34
-   case SPA_IO_RateMatch:
35
-       impl->rate_match = area;
36
-       break;
37
-   }
38
-}
39
-
40
 static const struct pw_stream_events capture_stream_events = {
41
    PW_VERSION_STREAM_EVENTS,
42
    .destroy = stream_destroy,
43
    .state_changed = stream_state_changed,
44
-   .io_changed = stream_io_changed,
45
    .process = capture_stream_process
46
 };
47
 
48
@@ -385,6 +371,7 @@
49
 {
50
    struct pw_context *context = pw_impl_module_get_context(module);
51
    uint32_t id = pw_global_get_id(pw_impl_module_get_global(module));
52
+   uint32_t pid = getpid();
53
    struct pw_properties *props = NULL;
54
    struct impl *impl;
55
    const char *str;
56
@@ -420,8 +407,8 @@
57
    impl->context = context;
58
    impl->work = pw_context_get_work_queue(context);
59
 
60
-   if (pw_properties_get(props, PW_KEY_NODE_GROUP) == NULL)
61
-       pw_properties_set(props, PW_KEY_NODE_GROUP, "pipewire.dummy");
62
+   if (pw_properties_get(props, PW_KEY_NODE_WANT_DRIVER) == NULL)
63
+       pw_properties_set(props, PW_KEY_NODE_WANT_DRIVER, "true");
64
    if (pw_properties_get(props, PW_KEY_NODE_VIRTUAL) == NULL)
65
        pw_properties_set(props, PW_KEY_NODE_VIRTUAL, "true");
66
 
67
@@ -429,7 +416,7 @@
68
        pw_properties_set(props, PW_KEY_MEDIA_CLASS, "Audio/Source");
69
 
70
    if (pw_properties_get(props, PW_KEY_NODE_NAME) == NULL)
71
-       pw_properties_setf(props, PW_KEY_NODE_NAME, "example-source-%u", id);
72
+       pw_properties_setf(props, PW_KEY_NODE_NAME, "example-source-%u-%u", pid, id);
73
    if (pw_properties_get(props, PW_KEY_NODE_DESCRIPTION) == NULL)
74
        pw_properties_set(props, PW_KEY_NODE_DESCRIPTION,
75
                pw_properties_get(props, PW_KEY_NODE_NAME));
76
@@ -443,6 +430,7 @@
77
    copy_props(impl, props, PW_KEY_NODE_NAME);
78
    copy_props(impl, props, PW_KEY_NODE_DESCRIPTION);
79
    copy_props(impl, props, PW_KEY_NODE_GROUP);
80
+   copy_props(impl, props, PW_KEY_NODE_WANT_DRIVER);
81
    copy_props(impl, props, PW_KEY_NODE_LATENCY);
82
    copy_props(impl, props, PW_KEY_NODE_VIRTUAL);
83
    copy_props(impl, props, PW_KEY_MEDIA_CLASS);
84
pipewire-0.3.49.tar.gz/src/modules/module-filter-chain.c -> pipewire-0.3.50.tar.gz/src/modules/module-filter-chain.c Changed
49
 
1
@@ -816,6 +816,8 @@
2
 
3
    spa_list_remove(&desc->link);
4
    plugin_unref(desc->plugin);
5
+   if (desc->desc)
6
+       fc_descriptor_free(desc->desc);
7
    free(desc->input);
8
    free(desc->output);
9
    free(desc->control);
10
@@ -1723,6 +1725,7 @@
11
    struct pw_properties *props;
12
    struct impl *impl;
13
    uint32_t id = pw_global_get_id(pw_impl_module_get_global(module));
14
+   uint32_t pid = getpid();
15
    const char *str;
16
    int res;
17
 
18
@@ -1761,14 +1764,13 @@
19
    spa_list_init(&impl->plugin_list);
20
 
21
    if (pw_properties_get(props, PW_KEY_NODE_GROUP) == NULL)
22
-       pw_properties_setf(props, PW_KEY_NODE_GROUP, "filter-chain-%u", id);
23
+       pw_properties_setf(props, PW_KEY_NODE_GROUP, "filter-chain-%u-%u", pid, id);
24
    if (pw_properties_get(props, PW_KEY_NODE_LINK_GROUP) == NULL)
25
-       pw_properties_setf(props, PW_KEY_NODE_LINK_GROUP, "filter-chain-%u", id);
26
+       pw_properties_setf(props, PW_KEY_NODE_LINK_GROUP, "filter-chain-%u-%u", pid, id);
27
    if (pw_properties_get(props, PW_KEY_NODE_VIRTUAL) == NULL)
28
        pw_properties_set(props, PW_KEY_NODE_VIRTUAL, "true");
29
-
30
    if (pw_properties_get(props, PW_KEY_NODE_DESCRIPTION) == NULL)
31
-       pw_properties_setf(props, PW_KEY_NODE_DESCRIPTION, "filter-chain-%u", id);
32
+       pw_properties_setf(props, PW_KEY_NODE_DESCRIPTION, "filter-chain-%u-%u", pid, id);
33
 
34
    if ((str = pw_properties_get(props, "capture.props")) != NULL)
35
        pw_properties_update_string(impl->capture_props, str, strlen(str));
36
@@ -1790,10 +1792,10 @@
37
 
38
    if (pw_properties_get(impl->capture_props, PW_KEY_NODE_NAME) == NULL)
39
        pw_properties_setf(impl->capture_props, PW_KEY_NODE_NAME,
40
-               "input.filter-chain-%u", id);
41
+               "input.filter-chain-%u-%u", pid, id);
42
    if (pw_properties_get(impl->playback_props, PW_KEY_NODE_NAME) == NULL)
43
        pw_properties_setf(impl->playback_props, PW_KEY_NODE_NAME,
44
-               "output.filter-chain-%u", id);
45
+               "output.filter-chain-%u-%u", pid, id);
46
 
47
    if (pw_properties_get(impl->capture_props, PW_KEY_MEDIA_NAME) == NULL)
48
        pw_properties_setf(impl->capture_props, PW_KEY_MEDIA_NAME, "%s input",
49
pipewire-0.3.49.tar.gz/src/modules/module-filter-chain/ladspa_plugin.c -> pipewire-0.3.50.tar.gz/src/modules/module-filter-chain/ladspa_plugin.c Changed
10
 
1
@@ -136,7 +136,7 @@
2
    port->max = upper;
3
 }
4
 
5
-static void ladspa_free(struct fc_descriptor *desc)
6
+static void ladspa_free(const struct fc_descriptor *desc)
7
 {
8
    struct descriptor *d = (struct descriptor*)desc;
9
    free(d->desc.ports);
10
pipewire-0.3.49.tar.gz/src/modules/module-filter-chain/lv2_plugin.c -> pipewire-0.3.50.tar.gz/src/modules/module-filter-chain/lv2_plugin.c Changed
10
 
1
@@ -380,7 +380,7 @@
2
        i->work_iface->end_run(i->instance);
3
 }
4
 
5
-static void lv2_free(struct fc_descriptor *desc)
6
+static void lv2_free(const struct fc_descriptor *desc)
7
 {
8
    struct descriptor *d = (struct descriptor*)desc;
9
    free((char*)d->desc.name);
10
pipewire-0.3.49.tar.gz/src/modules/module-filter-chain/plugin.h -> pipewire-0.3.50.tar.gz/src/modules/module-filter-chain/plugin.h Changed
19
 
1
@@ -66,7 +66,7 @@
2
 #define FC_DESCRIPTOR_SUPPORTS_NULL_DATA   (1ULL << 0)
3
    uint64_t flags;
4
 
5
-   void (*free) (struct fc_descriptor *desc);
6
+   void (*free) (const struct fc_descriptor *desc);
7
 
8
    uint32_t n_ports;
9
    struct fc_port *ports;
10
@@ -90,7 +90,7 @@
11
        plugin->unload(plugin);
12
 }
13
 
14
-static inline void fc_descriptor_free(struct fc_descriptor *desc)
15
+static inline void fc_descriptor_free(const struct fc_descriptor *desc)
16
 {
17
    if (desc->free)
18
        desc->free(desc);
19
pipewire-0.3.49.tar.gz/src/modules/module-loopback.c -> pipewire-0.3.50.tar.gz/src/modules/module-loopback.c Changed
41
 
1
@@ -398,6 +398,7 @@
2
    struct pw_properties *props;
3
    struct impl *impl;
4
    uint32_t id = pw_global_get_id(pw_impl_module_get_global(module));
5
+   uint32_t pid = getpid();
6
    const char *str;
7
    int res;
8
 
9
@@ -431,15 +432,15 @@
10
    impl->context = context;
11
 
12
    if (pw_properties_get(props, PW_KEY_NODE_GROUP) == NULL)
13
-       pw_properties_setf(props, PW_KEY_NODE_GROUP, "loopback-%u", id);
14
+       pw_properties_setf(props, PW_KEY_NODE_GROUP, "loopback-%u-%u", pid, id);
15
    if (pw_properties_get(props, PW_KEY_NODE_LINK_GROUP) == NULL)
16
-       pw_properties_setf(props, PW_KEY_NODE_LINK_GROUP, "loopback-%u", id);
17
+       pw_properties_setf(props, PW_KEY_NODE_LINK_GROUP, "loopback-%u-%u", pid, id);
18
    if (pw_properties_get(props, PW_KEY_NODE_VIRTUAL) == NULL)
19
        pw_properties_set(props, PW_KEY_NODE_VIRTUAL, "true");
20
 
21
    if (pw_properties_get(props, PW_KEY_NODE_DESCRIPTION) == NULL)
22
        pw_properties_setf(props, PW_KEY_NODE_DESCRIPTION,
23
-               "loopback-%u", id);
24
+               "loopback-%u-%u", pid, id);
25
 
26
    if ((str = pw_properties_get(props, "capture.props")) != NULL)
27
        pw_properties_update_string(impl->capture_props, str, strlen(str));
28
@@ -458,10 +459,10 @@
29
 
30
    if (pw_properties_get(impl->capture_props, PW_KEY_NODE_NAME) == NULL)
31
        pw_properties_setf(impl->capture_props, PW_KEY_NODE_NAME,
32
-               "input.loopback-%u", id);
33
+               "input.loopback-%u-%u", pid, id);
34
    if (pw_properties_get(impl->playback_props, PW_KEY_NODE_NAME) == NULL)
35
        pw_properties_setf(impl->playback_props, PW_KEY_NODE_NAME,
36
-               "output.loopback-%u", id);
37
+               "output.loopback-%u-%u", pid, id);
38
 
39
    parse_audio_info(impl->capture_props, &impl->capture_info);
40
    parse_audio_info(impl->playback_props, &impl->playback_info);
41
pipewire-0.3.49.tar.gz/src/modules/module-metadata.c -> pipewire-0.3.50.tar.gz/src/modules/module-metadata.c Changed
18
 
1
@@ -212,11 +212,15 @@
2
 
3
    data->export_metadata.type = PW_TYPE_INTERFACE_Metadata;
4
    data->export_metadata.func = pw_core_metadata_export;
5
-   pw_context_register_export_type(context, &data->export_metadata);
6
+   if ((res = pw_context_register_export_type(context, &data->export_metadata)) < 0)
7
+       goto error;
8
 
9
    pw_impl_module_add_listener(module, &data->module_listener, &module_events, data);
10
 
11
    pw_impl_module_update_properties(module, &SPA_DICT_INIT_ARRAY(module_props));
12
 
13
    return 0;
14
+error:
15
+   pw_impl_factory_destroy(data->this);
16
+   return res;
17
 }
18
pipewire-0.3.49.tar.gz/src/modules/module-protocol-native/protocol-native.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-native/protocol-native.c Changed
11
 
1
@@ -347,6 +347,9 @@
2
                SPA_POD_Int(&seq)) < 0)
3
        return -EINVAL;
4
 
5
+   if (id == SPA_ID_INVALID)
6
+       return 0;
7
+
8
    return pw_proxy_notify(proxy, struct pw_core_events, done, 0, id, seq);
9
 }
10
 
11
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/module.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/module.c Changed
131
 
1
@@ -59,7 +59,7 @@
2
    module->unloading = true;
3
 }
4
 
5
-struct module *module_new(struct impl *impl, const struct module_methods *methods, size_t user_data)
6
+struct module *module_new(struct impl *impl, size_t user_data)
7
 {
8
    struct module *module;
9
 
10
@@ -69,7 +69,6 @@
11
 
12
    module->index = SPA_ID_INVALID;
13
    module->impl = impl;
14
-   module->methods = methods;
15
    spa_hook_list_init(&module->listener_list);
16
    module->user_data = SPA_PTROFF(module, sizeof(*module), void);
17
    module->loaded = false;
18
@@ -86,12 +85,12 @@
19
 
20
 int module_load(struct client *client, struct module *module)
21
 {
22
-   pw_log_info("load module index:%u name:%s", module->index, module->name);
23
-   if (module->methods->load == NULL)
24
+   pw_log_info("load module index:%u name:%s", module->index, module->info->name);
25
+   if (module->info->load == NULL)
26
        return -ENOTSUP;
27
    /* subscription event is sent when the module does a
28
     * module_emit_loaded() */
29
-   return module->methods->load(client, module);
30
+   return module->info->load(client, module);
31
 }
32
 
33
 void module_free(struct module *module)
34
@@ -109,7 +108,6 @@
35
    spa_hook_list_clean(&module->listener_list);
36
    pw_properties_free(module->props);
37
 
38
-   free((char*)module->name);
39
    free((char*)module->args);
40
 
41
    free(module);
42
@@ -123,10 +121,10 @@
43
    /* Note that client can be NULL (when the module is being unloaded
44
     * internally and not by a client request */
45
 
46
-   pw_log_info("unload module index:%u name:%s", module->index, module->name);
47
+   pw_log_info("unload module index:%u name:%s", module->index, module->info->name);
48
 
49
-   if (module->methods->unload)
50
-       res = module->methods->unload(module);
51
+   if (module->info->unload)
52
+       res = module->info->unload(module);
53
 
54
    if (module->loaded)
55
        broadcast_subscribe_event(impl,
56
@@ -260,44 +258,20 @@
57
    return false;
58
 }
59
 
60
-#include "modules/registry.h"
61
-
62
-static const struct module_info module_list = {
63
-   { "module-always-sink", 1, create_module_always_sink, },
64
-   { "module-combine-sink", 0, create_module_combine_sink, },
65
-   { "module-echo-cancel", 0, create_module_echo_cancel, },
66
-   { "module-ladspa-sink", 0, create_module_ladspa_sink, },
67
-   { "module-ladspa-source", 0, create_module_ladspa_source, },
68
-   { "module-loopback", 0, create_module_loopback, },
69
-   { "module-null-sink", 0, create_module_null_sink, },
70
-   { "module-native-protocol-tcp", 0, create_module_native_protocol_tcp, },
71
-   { "module-pipe-source", 0, create_module_pipe_source, },
72
-   { "module-pipe-sink", 0, create_module_pipe_sink, },
73
-   { "module-raop-discover", 1, create_module_raop_discover, },
74
-   { "module-remap-sink", 0, create_module_remap_sink, },
75
-   { "module-remap-source", 0, create_module_remap_source, },
76
-   { "module-simple-protocol-tcp", 0, create_module_simple_protocol_tcp, },
77
-   { "module-switch-on-connect", 1, create_module_switch_on_connect, },
78
-   { "module-tunnel-sink", 0, create_module_tunnel_sink, },
79
-   { "module-tunnel-source", 0, create_module_tunnel_source, },
80
-   { "module-zeroconf-discover", 1, create_module_zeroconf_discover, },
81
-#ifdef HAVE_AVAHI
82
-   { "module-zeroconf-publish", 0, create_module_zeroconf_publish, },
83
-#endif
84
-   { "module-roc-sink", 0, create_module_roc_sink, },
85
-   { "module-roc-source", 0, create_module_roc_source, },
86
-   { "module-x11-bell", 0, create_module_x11_bell, },
87
-};
88
-
89
 static const struct module_info *find_module_info(const char *name)
90
 {
91
-   const struct module_info *info;
92
+   extern const struct module_info __start_pw_mod_pulse_modules;
93
+   extern const struct module_info __stop_pw_mod_pulse_modules;
94
 
95
-   SPA_FOR_EACH_ELEMENT(module_list, info) {
96
+   const struct module_info *info = __start_pw_mod_pulse_modules;
97
+
98
+   for (; info < __stop_pw_mod_pulse_modules; info++) {
99
        if (spa_streq(info->name, name))
100
            return info;
101
    }
102
 
103
+   spa_assert(info == __stop_pw_mod_pulse_modules);
104
+
105
    return NULL;
106
 }
107
 
108
@@ -305,7 +279,7 @@
109
 {
110
    const char *name = data;
111
    const struct module *module = item_data;
112
-   return spa_streq(module->name, name) ? 1 : 0;
113
+   return spa_streq(module->info->name, name) ? 1 : 0;
114
 }
115
 
116
 struct module *module_create(struct client *client, const char *name, const char *args)
117
@@ -334,12 +308,12 @@
118
    if (module == NULL)
119
        return NULL;
120
 
121
+   module->info = info;
122
    module->index = pw_map_insert_new(&impl->modules, module);
123
    if (module->index == SPA_ID_INVALID) {
124
        module_unload(module);
125
        return NULL;
126
    }
127
-   module->name = strdup(name);
128
    module->args = args ? strdup(args) : NULL;
129
    module->index |= MODULE_FLAG;
130
    return module;
131
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/module.h -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/module.h Changed
54
 
1
@@ -37,10 +37,20 @@
2
 
3
 struct module_info {
4
    const char *name;
5
+
6
    unsigned int load_once:1;
7
+
8
    struct module *(*create) (struct impl *impl, const char *args);
9
+   int (*load) (struct client *client, struct module *module);
10
+   int (*unload) (struct module *module);
11
 };
12
 
13
+#define DEFINE_MODULE_INFO(name)                   \
14
+   __attribute__((used))                       \
15
+   __attribute__((section("pw_mod_pulse_modules")))        \
16
+   __attribute__((aligned(__alignof__(struct module_info))))   \
17
+   const struct module_info name
18
+
19
 struct module_events {
20
 #define VERSION_MODULE_EVENTS  0
21
    uint32_t version;
22
@@ -49,21 +59,12 @@
23
    void (*destroy) (void *data);
24
 };
25
 
26
-struct module_methods {
27
-#define VERSION_MODULE_METHODS 0
28
-   uint32_t version;
29
-
30
-   int (*load) (struct client *client, struct module *module);
31
-   int (*unload) (struct module *module);
32
-};
33
-
34
 struct module {
35
    uint32_t index;
36
-   const char *name;
37
    const char *args;
38
    struct pw_properties *props;
39
    struct impl *impl;
40
-   const struct module_methods *methods;
41
+   const struct module_info *info;
42
    struct spa_hook_list listener_list;
43
    void *user_data;
44
    unsigned int loaded:1;
45
@@ -75,7 +76,7 @@
46
 
47
 struct module *module_create(struct client *client, const char *name, const char *args);
48
 void module_free(struct module *module);
49
-struct module *module_new(struct impl *impl, const struct module_methods *methods, size_t user_data);
50
+struct module *module_new(struct impl *impl, size_t user_data);
51
 int module_load(struct client *client, struct module *module);
52
 int module_unload(struct module *module);
53
 void module_schedule_unload(struct module *module);
54
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-always-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-always-sink.c Changed
35
 
1
@@ -94,12 +94,6 @@
2
    return 0;
3
 }
4
 
5
-static const struct module_methods module_always_sink_methods = {
6
-   VERSION_MODULE_METHODS,
7
-   .load = module_always_sink_load,
8
-   .unload = module_always_sink_unload,
9
-};
10
-
11
 static const struct spa_dict_item module_always_sink_info = {
12
    { PW_KEY_MODULE_AUTHOR, "Pauli Virtanen <pav@iki.fi>" },
13
    { PW_KEY_MODULE_DESCRIPTION, "Always keeps at least one sink loaded even if it's a null one" },
14
@@ -123,7 +117,7 @@
15
    if (argument)
16
        module_args_add_props(props, argument);
17
 
18
-   module = module_new(impl, &module_always_sink_methods, sizeof(struct module_always_sink_data));
19
+   module = module_new(impl, sizeof(struct module_always_sink_data));
20
    if (module == NULL) {
21
        res = -errno;
22
        goto out;
23
@@ -136,3 +130,11 @@
24
    errno = -res;
25
    return NULL;
26
 }
27
+
28
+DEFINE_MODULE_INFO(module_always_sink) = {
29
+   .name = "module-always-sink",
30
+   .load_once = true,
31
+   .create = create_module_always_sink,
32
+   .load = module_always_sink_load,
33
+   .unload = module_always_sink_unload,
34
+};
35
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-combine-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-combine-sink.c Changed
42
 
1
@@ -30,7 +30,6 @@
2
 
3
 #include "../manager.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #define NAME "combine-sink"
8
 
9
@@ -500,12 +499,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_combine_sink_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_combine_sink_load,
16
-   .unload = module_combine_sink_unload,
17
-};
18
-
19
 struct module *create_module_combine_sink(struct impl *impl, const char *argument)
20
 {
21
    struct module *module;
22
@@ -554,7 +547,7 @@
23
        goto out;
24
    }
25
 
26
-   module = module_new(impl, &module_combine_sink_methods, sizeof(*d));
27
+   module = module_new(impl, sizeof(*d));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -580,3 +573,10 @@
32
    errno = -res;
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_combine_sink) = {
37
+   .name = "module-combine-sink",
38
+   .create = create_module_combine_sink,
39
+   .load = module_combine_sink_load,
40
+   .unload = module_combine_sink_unload,
41
+};
42
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-echo-cancel.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-echo-cancel.c Changed
42
 
1
@@ -31,7 +31,6 @@
2
 
3
 #include "../defs.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #define NAME "echo-cancel"
8
 
9
@@ -127,12 +126,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_echo_cancel_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_echo_cancel_load,
16
-   .unload = module_echo_cancel_unload,
17
-};
18
-
19
 static const struct spa_dict_item module_echo_cancel_info = {
20
    { PW_KEY_MODULE_AUTHOR, "Arun Raghavan <arun@asymptotic.io>" },
21
    { PW_KEY_MODULE_DESCRIPTION, "Acoustic echo canceller" },
22
@@ -240,7 +233,7 @@
23
        pw_properties_set(props, "aec_args", NULL);
24
    }
25
 
26
-   module = module_new(impl, &module_echo_cancel_methods, sizeof(*d));
27
+   module = module_new(impl, sizeof(*d));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -264,3 +257,10 @@
32
 
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_echo_cancel) = {
37
+   .name = "module-echo-cancel",
38
+   .create = create_module_echo_cancel,
39
+   .load = module_echo_cancel_load,
40
+   .unload = module_echo_cancel_unload,
41
+};
42
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-ladspa-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-ladspa-sink.c Changed
42
 
1
@@ -30,7 +30,6 @@
2
 
3
 #include "../defs.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #define NAME "ladspa-sink"
8
 
9
@@ -144,12 +143,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_ladspa_sink_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_ladspa_sink_load,
16
-   .unload = module_ladspa_sink_unload,
17
-};
18
-
19
 static const struct spa_dict_item module_ladspa_sink_info = {
20
    { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
21
    { PW_KEY_MODULE_DESCRIPTION, "Virtual LADSPA sink" },
22
@@ -245,7 +238,7 @@
23
    if (pw_properties_get(playback_props, PW_KEY_NODE_PASSIVE) == NULL)
24
        pw_properties_set(playback_props, PW_KEY_NODE_PASSIVE, "true");
25
 
26
-   module = module_new(impl, &module_ladspa_sink_methods, sizeof(*d));
27
+   module = module_new(impl, sizeof(*d));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -265,3 +258,10 @@
32
    errno = -res;
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_ladspa_sink) = {
37
+   .name = "module-ladspa-sink",
38
+   .create = create_module_ladspa_sink,
39
+   .load = module_ladspa_sink_load,
40
+   .unload = module_ladspa_sink_unload,
41
+};
42
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-ladspa-source.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-ladspa-source.c Changed
42
 
1
@@ -30,7 +30,6 @@
2
 
3
 #include "../defs.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #define NAME "ladspa-source"
8
 
9
@@ -144,12 +143,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_ladspa_source_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_ladspa_source_load,
16
-   .unload = module_ladspa_source_unload,
17
-};
18
-
19
 static const struct spa_dict_item module_ladspa_source_info = {
20
    { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
21
    { PW_KEY_MODULE_DESCRIPTION, "Virtual LADSPA source" },
22
@@ -245,7 +238,7 @@
23
    if (pw_properties_get(capture_props, PW_KEY_NODE_PASSIVE) == NULL)
24
        pw_properties_set(capture_props, PW_KEY_NODE_PASSIVE, "true");
25
 
26
-   module = module_new(impl, &module_ladspa_source_methods, sizeof(*d));
27
+   module = module_new(impl, sizeof(*d));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -265,3 +258,10 @@
32
    errno = -res;
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_ladspa_source) = {
37
+   .name = "module-ladspa-source",
38
+   .create = create_module_ladspa_source,
39
+   .load = module_ladspa_source_load,
40
+   .unload = module_ladspa_source_unload,
41
+};
42
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-loopback.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-loopback.c Changed
42
 
1
@@ -31,7 +31,6 @@
2
 
3
 #include "../defs.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #define NAME "loopback"
8
 
9
@@ -127,12 +126,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_loopback_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_loopback_load,
16
-   .unload = module_loopback_unload,
17
-};
18
-
19
 static const struct spa_dict_item module_loopback_info = {
20
    { PW_KEY_MODULE_AUTHOR, "Arun Raghavan <arun@asymptotic.io>" },
21
    { PW_KEY_MODULE_DESCRIPTION, "Loopback from source to sink" },
22
@@ -234,7 +227,7 @@
23
        pw_properties_set(props, "source_output_properties", NULL);
24
    }
25
 
26
-   module = module_new(impl, &module_loopback_methods, sizeof(*d));
27
+   module = module_new(impl, sizeof(*d));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -256,3 +249,10 @@
32
 
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_loopback) = {
37
+   .name = "module-loopback",
38
+   .create = create_module_loopback,
39
+   .load = module_loopback_load,
40
+   .unload = module_loopback_unload,
41
+};
42
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-native-protocol-tcp.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-native-protocol-tcp.c Changed
42
 
1
@@ -27,7 +27,6 @@
2
 #include "../module.h"
3
 #include "../pulse-server.h"
4
 #include "../server.h"
5
-#include "registry.h"
6
 
7
 #define NAME "protocol-tcp"
8
 
9
@@ -71,12 +70,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_native_protocol_tcp_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_native_protocol_tcp_load,
16
-   .unload = module_native_protocol_tcp_unload,
17
-};
18
-
19
 static const struct spa_dict_item module_native_protocol_tcp_info = {
20
    { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
21
    { PW_KEY_MODULE_DESCRIPTION, "Native protocol (TCP sockets)" },
22
@@ -111,7 +104,7 @@
23
    pw_properties_setf(props, "pulse.tcp", " \"tcp:%s%s%s\" ",
24
               listen ? listen : "", listen ? ":" : "", port);
25
 
26
-   module = module_new(impl, &module_native_protocol_tcp_methods, sizeof(*d));
27
+   module = module_new(impl, sizeof(*d));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -127,3 +120,10 @@
32
    errno = -res;
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_native_protocol_tcp) = {
37
+   .name = "module-native-protocol-tcp",
38
+   .create = create_module_native_protocol_tcp,
39
+   .load = module_native_protocol_tcp_load,
40
+   .unload = module_native_protocol_tcp_unload,
41
+};
42
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-null-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-null-sink.c Changed
42
 
1
@@ -26,7 +26,6 @@
2
 
3
 #include "../manager.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #define NAME "null-sink"
8
 
9
@@ -147,12 +146,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_null_sink_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_null_sink_load,
16
-   .unload = module_null_sink_unload,
17
-};
18
-
19
 static const struct spa_dict_item module_null_sink_info = {
20
    { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
21
    { PW_KEY_MODULE_DESCRIPTION, "A NULL sink" },
22
@@ -234,7 +227,7 @@
23
    if (pw_properties_get(props, "monitor.channel-volumes") == NULL)
24
        pw_properties_set(props, "monitor.channel-volumes", "true");
25
 
26
-   module = module_new(impl, &module_null_sink_methods, sizeof(struct module_null_sink_data));
27
+   module = module_new(impl, sizeof(struct module_null_sink_data));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -247,3 +240,10 @@
32
    errno = -res;
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_null_sink) = {
37
+   .name = "module-null-sink",
38
+   .create = create_module_null_sink,
39
+   .load = module_null_sink_load,
40
+   .unload = module_null_sink_unload,
41
+};
42
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-pipe-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-pipe-sink.c Changed
79
 
1
@@ -34,7 +34,6 @@
2
 
3
 #include "../defs.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #define NAME "pipe-sink"
8
 
9
@@ -140,7 +139,7 @@
10
    .process = capture_process
11
 };
12
 
13
-static int module_pipesink_load(struct client *client, struct module *module)
14
+static int module_pipe_sink_load(struct client *client, struct module *module)
15
 {
16
    struct module_pipesink_data *data = module->user_data;
17
    int res;
18
@@ -187,7 +186,7 @@
19
    return 0;
20
 }
21
 
22
-static int module_pipesink_unload(struct module *module)
23
+static int module_pipe_sink_unload(struct module *module)
24
 {
25
    struct module_pipesink_data *d = module->user_data;
26
 
27
@@ -207,13 +206,7 @@
28
    return 0;
29
 }
30
 
31
-static const struct module_methods module_pipesink_methods = {
32
-   VERSION_MODULE_METHODS,
33
-   .load = module_pipesink_load,
34
-   .unload = module_pipesink_unload,
35
-};
36
-
37
-static const struct spa_dict_item module_pipesink_info = {
38
+static const struct spa_dict_item module_pipe_sink_info = {
39
    { PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" },
40
    { PW_KEY_MODULE_DESCRIPTION, "Pipe sink" },
41
    { PW_KEY_MODULE_USAGE, "file=<name of the FIFO special file to use> "
42
@@ -240,7 +233,7 @@
43
 
44
    PW_LOG_TOPIC_INIT(mod_topic);
45
 
46
-   props = pw_properties_new_dict(&SPA_DICT_INIT_ARRAY(module_pipesink_info));
47
+   props = pw_properties_new_dict(&SPA_DICT_INIT_ARRAY(module_pipe_sink_info));
48
    capture_props = pw_properties_new(NULL, NULL);
49
    if (!props || !capture_props) {
50
        res = -EINVAL;
51
@@ -305,13 +298,13 @@
52
        goto out;
53
    }
54
 
55
-   if (pw_properties_get(capture_props, PW_KEY_NODE_GROUP) == NULL)
56
-       pw_properties_set(capture_props, PW_KEY_NODE_GROUP, "pipewire.dummy");
57
+   if (pw_properties_get(capture_props, PW_KEY_NODE_WANT_DRIVER) == NULL)
58
+       pw_properties_set(capture_props, PW_KEY_NODE_WANT_DRIVER, "true");
59
    if (pw_properties_get(capture_props, PW_KEY_NODE_VIRTUAL) == NULL)
60
        pw_properties_set(capture_props, PW_KEY_NODE_VIRTUAL, "true");
61
    pw_properties_set(capture_props, PW_KEY_MEDIA_CLASS, "Audio/Sink");
62
 
63
-   module = module_new(impl, &module_pipesink_methods, sizeof(*d));
64
+   module = module_new(impl, sizeof(*d));
65
    if (module == NULL) {
66
        res = -errno;
67
        goto out;
68
@@ -343,3 +336,10 @@
69
 
70
    return NULL;
71
 }
72
+
73
+DEFINE_MODULE_INFO(module_pipe_sink) = {
74
+   .name = "module-pipe-sink",
75
+   .create = create_module_pipe_sink,
76
+   .load = module_pipe_sink_load,
77
+   .unload = module_pipe_sink_unload,
78
+};
79
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-pipe-source.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-pipe-source.c Changed
79
 
1
@@ -34,7 +34,6 @@
2
 
3
 #include "../defs.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #define NAME "pipe-source"
8
 
9
@@ -161,7 +160,7 @@
10
    .process = playback_process
11
 };
12
 
13
-static int module_pipesource_load(struct client *client, struct module *module)
14
+static int module_pipe_source_load(struct client *client, struct module *module)
15
 {
16
    struct module_pipesrc_data *data = module->user_data;
17
    int res;
18
@@ -209,7 +208,7 @@
19
    return 0;
20
 }
21
 
22
-static int module_pipesource_unload(struct module *module)
23
+static int module_pipe_source_unload(struct module *module)
24
 {
25
    struct module_pipesrc_data *d = module->user_data;
26
 
27
@@ -227,13 +226,7 @@
28
    return 0;
29
 }
30
 
31
-static const struct module_methods module_pipesource_methods = {
32
-   VERSION_MODULE_METHODS,
33
-   .load = module_pipesource_load,
34
-   .unload = module_pipesource_unload,
35
-};
36
-
37
-static const struct spa_dict_item module_pipesource_info = {
38
+static const struct spa_dict_item module_pipe_source_info = {
39
    { PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" },
40
    { PW_KEY_MODULE_DESCRIPTION, "Pipe source" },
41
    { PW_KEY_MODULE_USAGE, "file=<name of the FIFO special file to use> "
42
@@ -260,7 +253,7 @@
43
 
44
    PW_LOG_TOPIC_INIT(mod_topic);
45
 
46
-   props = pw_properties_new_dict(&SPA_DICT_INIT_ARRAY(module_pipesource_info));
47
+   props = pw_properties_new_dict(&SPA_DICT_INIT_ARRAY(module_pipe_source_info));
48
    playback_props = pw_properties_new(NULL, NULL);
49
    if (!props || !playback_props) {
50
        res = -errno;
51
@@ -364,13 +357,13 @@
52
        goto out;
53
    }
54
 
55
-   if (pw_properties_get(playback_props, PW_KEY_NODE_GROUP) == NULL)
56
-       pw_properties_set(playback_props, PW_KEY_NODE_GROUP, "pipewire.dummy");
57
+   if (pw_properties_get(playback_props, PW_KEY_NODE_WANT_DRIVER) == NULL)
58
+       pw_properties_set(playback_props, PW_KEY_NODE_WANT_DRIVER, "true");
59
    if (pw_properties_get(playback_props, PW_KEY_NODE_VIRTUAL) == NULL)
60
        pw_properties_set(playback_props, PW_KEY_NODE_VIRTUAL, "true");
61
    pw_properties_set(playback_props, PW_KEY_MEDIA_CLASS, "Audio/Source");
62
 
63
-   module = module_new(impl, &module_pipesource_methods, sizeof(*d) + stride);
64
+   module = module_new(impl, sizeof(*d) + stride);
65
    if (module == NULL) {
66
        res = -errno;
67
        goto out;
68
@@ -401,3 +394,10 @@
69
 
70
    return NULL;
71
 }
72
+
73
+DEFINE_MODULE_INFO(module_pipe_source) = {
74
+   .name = "module-pipe-source",
75
+   .create = create_module_pipe_source,
76
+   .load = module_pipe_source_load,
77
+   .unload = module_pipe_source_unload,
78
+};
79
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-raop-discover.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-raop-discover.c Changed
43
 
1
@@ -28,7 +28,6 @@
2
 
3
 #include "../defs.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #define NAME "raop-discover"
8
 
9
@@ -86,12 +85,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_raop_discover_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_raop_discover_load,
16
-   .unload = module_raop_discover_unload,
17
-};
18
-
19
 static const struct spa_dict_item module_raop_discover_info = {
20
    { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.con>" },
21
    { PW_KEY_MODULE_DESCRIPTION, "mDNS/DNS-SD Service Discovery of RAOP devices" },
22
@@ -116,7 +109,7 @@
23
    if (argument != NULL)
24
        module_args_add_props(props, argument);
25
 
26
-   module = module_new(impl, &module_raop_discover_methods, sizeof(*d));
27
+   module = module_new(impl, sizeof(*d));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -132,3 +125,11 @@
32
    errno = -res;
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_raop_discover) = {
37
+   .name = "module-raop-discover",
38
+   .load_once = true,
39
+   .create = create_module_raop_discover,
40
+   .load = module_raop_discover_load,
41
+   .unload = module_raop_discover_unload,
42
+};
43
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-remap-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-remap-sink.c Changed
42
 
1
@@ -30,7 +30,6 @@
2
 
3
 #include "../defs.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #define NAME "remap-sink"
8
 
9
@@ -115,12 +114,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_remap_sink_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_remap_sink_load,
16
-   .unload = module_remap_sink_unload,
17
-};
18
-
19
 static const struct spa_dict_item module_remap_sink_info = {
20
    { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
21
    { PW_KEY_MODULE_DESCRIPTION, "Remap sink channels" },
22
@@ -242,7 +235,7 @@
23
    if (pw_properties_get(playback_props, PW_KEY_NODE_PASSIVE) == NULL)
24
        pw_properties_set(playback_props, PW_KEY_NODE_PASSIVE, "true");
25
 
26
-   module = module_new(impl, &module_remap_sink_methods, sizeof(*d));
27
+   module = module_new(impl, sizeof(*d));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -262,3 +255,10 @@
32
    errno = -res;
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_remap_sink) = {
37
+   .name = "module-remap-sink",
38
+   .create = create_module_remap_sink,
39
+   .load = module_remap_sink_load,
40
+   .unload = module_remap_sink_unload,
41
+};
42
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-remap-source.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-remap-source.c Changed
42
 
1
@@ -30,7 +30,6 @@
2
 
3
 #include "../defs.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #define NAME "remap-sink"
8
 
9
@@ -115,12 +114,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_remap_source_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_remap_source_load,
16
-   .unload = module_remap_source_unload,
17
-};
18
-
19
 static const struct spa_dict_item module_remap_source_info = {
20
    { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
21
    { PW_KEY_MODULE_DESCRIPTION, "Remap source channels" },
22
@@ -242,7 +235,7 @@
23
    if (pw_properties_get(capture_props, PW_KEY_NODE_PASSIVE) == NULL)
24
        pw_properties_set(capture_props, PW_KEY_NODE_PASSIVE, "true");
25
 
26
-   module = module_new(impl, &module_remap_source_methods, sizeof(*d));
27
+   module = module_new(impl, sizeof(*d));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -262,3 +255,10 @@
32
    errno = -res;
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_remap_source) = {
37
+   .name = "module-remap-source",
38
+   .create = create_module_remap_source,
39
+   .load = module_remap_source_load,
40
+   .unload = module_remap_source_unload,
41
+};
42
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-roc-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-roc-sink.c Changed
42
 
1
@@ -29,7 +29,6 @@
2
 
3
 #include "../defs.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #define NAME "roc-sink"
8
 
9
@@ -115,12 +114,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_roc_sink_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_roc_sink_load,
16
-   .unload = module_roc_sink_unload,
17
-};
18
-
19
 static const struct spa_dict_item module_roc_sink_info = {
20
    { PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" },
21
    { PW_KEY_MODULE_DESCRIPTION, "roc sink" },
22
@@ -197,7 +190,7 @@
23
        pw_properties_set(roc_props, "remote.repair.port", ROC_DEFAULT_REPAIR_PORT);
24
    }
25
 
26
-   module = module_new(impl, &module_roc_sink_methods, sizeof(*d));
27
+   module = module_new(impl, sizeof(*d));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -217,3 +210,10 @@
32
    errno = -res;
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_roc_sink) = {
37
+   .name = "module-roc-sink",
38
+   .create = create_module_roc_sink,
39
+   .load = module_roc_sink_load,
40
+   .unload = module_roc_sink_unload,
41
+};
42
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-roc-source.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-roc-source.c Changed
42
 
1
@@ -29,7 +29,6 @@
2
 
3
 #include "../defs.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #define NAME "roc-source"
8
 
9
@@ -115,12 +114,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_roc_source_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_roc_source_load,
16
-   .unload = module_roc_source_unload,
17
-};
18
-
19
 static const struct spa_dict_item module_roc_source_info = {
20
    { PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" },
21
    { PW_KEY_MODULE_DESCRIPTION, "roc source" },
22
@@ -204,7 +197,7 @@
23
        pw_properties_set(roc_props, "resampler.profile", ROC_DEFAULT_REPAIR_PORT);
24
    }
25
 
26
-   module = module_new(impl, &module_roc_source_methods, sizeof(*d));
27
+   module = module_new(impl, sizeof(*d));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -224,3 +217,10 @@
32
    errno = -res;
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_roc_source) = {
37
+   .name = "module-roc-source",
38
+   .create = create_module_roc_source,
39
+   .load = module_roc_source_load,
40
+   .unload = module_roc_source_unload,
41
+};
42
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-simple-protocol-tcp.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-simple-protocol-tcp.c Changed
42
 
1
@@ -27,7 +27,6 @@
2
 
3
 #include "../defs.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #define NAME "simple-protocol-tcp"
8
 
9
@@ -115,12 +114,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_simple_protocol_tcp_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_simple_protocol_tcp_load,
16
-   .unload = module_simple_protocol_tcp_unload,
17
-};
18
-
19
 static const struct spa_dict_item module_simple_protocol_tcp_info = {
20
    { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
21
    { PW_KEY_MODULE_DESCRIPTION, "Simple protocol (TCP sockets)" },
22
@@ -204,7 +197,7 @@
23
    pw_properties_setf(module_props, "server.address", " \"tcp:%s%s%s\" ",
24
            listen ? listen : "", listen ? ":" : "", port);
25
 
26
-   module = module_new(impl, &module_simple_protocol_tcp_methods, sizeof(*d));
27
+   module = module_new(impl, sizeof(*d));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -223,3 +216,10 @@
32
    errno = -res;
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_simple_protocol_tcp) = {
37
+   .name = "module-simple-protocol-tcp",
38
+   .create = create_module_simple_protocol_tcp,
39
+   .load = module_simple_protocol_tcp_load,
40
+   .unload = module_simple_protocol_tcp_unload,
41
+};
42
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-switch-on-connect.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-switch-on-connect.c Changed
43
 
1
@@ -31,7 +31,6 @@
2
 
3
 #include "../defs.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #include "../manager.h"
8
 #include "../collect.h"
9
@@ -234,12 +233,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_switch_on_connect_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_switch_on_connect_load,
16
-   .unload = module_switch_on_connect_unload,
17
-};
18
-
19
 static const struct spa_dict_item module_switch_on_connect_info = {
20
    { PW_KEY_MODULE_AUTHOR, "Pauli Virtanen <pav@iki.fi>" },
21
    { PW_KEY_MODULE_DESCRIPTION, "Switch to new devices on connect. "
22
@@ -299,7 +292,7 @@
23
 
24
    pw_properties_set(props, "blocklist", NULL);
25
 
26
-   module = module_new(impl, &module_switch_on_connect_methods, sizeof(*d));
27
+   module = module_new(impl, sizeof(*d));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -329,3 +322,11 @@
32
 
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_switch_on_connect) = {
37
+   .name = "module-switch-on-connect",
38
+   .load_once = true,
39
+   .create = create_module_switch_on_connect,
40
+   .load = module_switch_on_connect_load,
41
+   .unload = module_switch_on_connect_unload,
42
+};
43
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-tunnel-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-tunnel-sink.c Changed
42
 
1
@@ -32,7 +32,6 @@
2
 
3
 #include "../defs.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #define NAME "tunnel-sink"
8
 
9
@@ -120,12 +119,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_tunnel_sink_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_tunnel_sink_load,
16
-   .unload = module_tunnel_sink_unload,
17
-};
18
-
19
 static const struct spa_dict_item module_tunnel_sink_info = {
20
    { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
21
    { PW_KEY_MODULE_DESCRIPTION, "Create a network sink which connects to a remote PulseAudio server" },
22
@@ -219,7 +212,7 @@
23
        pw_properties_set(stream_props, PW_KEY_AUDIO_FORMAT, format_id2name(id));
24
    }
25
 
26
-   module = module_new(impl, &module_tunnel_sink_methods, sizeof(*d));
27
+   module = module_new(impl, sizeof(*d));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -239,3 +232,10 @@
32
    errno = -res;
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_tunnel_sink) = {
37
+   .name = "module-tunnel-sink",
38
+   .create = create_module_tunnel_sink,
39
+   .load = module_tunnel_sink_load,
40
+   .unload = module_tunnel_sink_unload,
41
+};
42
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-tunnel-source.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-tunnel-source.c Changed
42
 
1
@@ -32,7 +32,6 @@
2
 
3
 #include "../defs.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #define NAME "tunnel-source"
8
 
9
@@ -120,12 +119,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_tunnel_source_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_tunnel_source_load,
16
-   .unload = module_tunnel_source_unload,
17
-};
18
-
19
 static const struct spa_dict_item module_tunnel_source_info = {
20
    { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
21
    { PW_KEY_MODULE_DESCRIPTION, "Create a network source which connects to a remote PulseAudio server" },
22
@@ -209,7 +202,7 @@
23
 
24
    audio_info_to_props(&info, stream_props);
25
 
26
-   module = module_new(impl, &module_tunnel_source_methods, sizeof(*d));
27
+   module = module_new(impl, sizeof(*d));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -229,3 +222,10 @@
32
    errno = -res;
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_tunnel_source) = {
37
+   .name = "module-tunnel-source",
38
+   .create = create_module_tunnel_source,
39
+   .load = module_tunnel_source_load,
40
+   .unload = module_tunnel_source_unload,
41
+};
42
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-x11-bell.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-x11-bell.c Changed
34
 
1
@@ -100,12 +100,6 @@
2
    return 0;
3
 }
4
 
5
-static const struct module_methods module_x11_bell_methods = {
6
-   VERSION_MODULE_METHODS,
7
-   .load = module_x11_bell_load,
8
-   .unload = module_x11_bell_unload,
9
-};
10
-
11
 static const struct spa_dict_item module_x11_bell_info = {
12
    { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },
13
    { PW_KEY_MODULE_DESCRIPTION, "X11 bell interceptor" },
14
@@ -132,7 +126,7 @@
15
    if (argument)
16
        module_args_add_props(props, argument);
17
 
18
-   module = module_new(impl, &module_x11_bell_methods, sizeof(struct module_x11_bell_data));
19
+   module = module_new(impl, sizeof(struct module_x11_bell_data));
20
    if (module == NULL) {
21
        res = -errno;
22
        goto out;
23
@@ -145,3 +139,10 @@
24
    errno = -res;
25
    return NULL;
26
 }
27
+
28
+DEFINE_MODULE_INFO(module_x11_bell) = {
29
+   .name = "module-x11-bell",
30
+   .create = create_module_x11_bell,
31
+   .load = module_x11_bell_load,
32
+   .unload = module_x11_bell_unload,
33
+};
34
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-zeroconf-discover.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-zeroconf-discover.c Changed
43
 
1
@@ -28,7 +28,6 @@
2
 
3
 #include "../defs.h"
4
 #include "../module.h"
5
-#include "registry.h"
6
 
7
 #define NAME "zeroconf-discover"
8
 
9
@@ -86,12 +85,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_zeroconf_discover_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_zeroconf_discover_load,
16
-   .unload = module_zeroconf_discover_unload,
17
-};
18
-
19
 static const struct spa_dict_item module_zeroconf_discover_info = {
20
    { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.con>" },
21
    { PW_KEY_MODULE_DESCRIPTION, "mDNS/DNS-SD Service Discovery" },
22
@@ -116,7 +109,7 @@
23
    if (argument != NULL)
24
        module_args_add_props(props, argument);
25
 
26
-   module = module_new(impl, &module_zeroconf_discover_methods, sizeof(*d));
27
+   module = module_new(impl, sizeof(*d));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -132,3 +125,11 @@
32
    errno = -res;
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_zeroconf_discover) = {
37
+   .name = "module-zeroconf-discover",
38
+   .load_once = true,
39
+   .create = create_module_zeroconf_discover,
40
+   .load = module_zeroconf_discover_load,
41
+   .unload = module_zeroconf_discover_unload,
42
+};
43
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-zeroconf-publish.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-zeroconf-publish.c Changed
42
 
1
@@ -32,7 +32,6 @@
2
 #include "../manager.h"
3
 #include "../module.h"
4
 #include "../pulse-server.h"
5
-#include "registry.h"
6
 #include "../../module-zeroconf-discover/avahi-poll.h"
7
 
8
 #include <avahi-client/client.h>
9
@@ -631,12 +630,6 @@
10
    return 0;
11
 }
12
 
13
-static const struct module_methods module_zeroconf_publish_methods = {
14
-   VERSION_MODULE_METHODS,
15
-   .load = module_zeroconf_publish_load,
16
-   .unload = module_zeroconf_publish_unload,
17
-};
18
-
19
 static const struct spa_dict_item module_zeroconf_publish_info = {
20
    { PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io" },
21
    { PW_KEY_MODULE_DESCRIPTION, "mDNS/DNS-SD Service Publish" },
22
@@ -661,7 +654,7 @@
23
    if (argument)
24
        module_args_add_props(props, argument);
25
 
26
-   module = module_new(impl, &module_zeroconf_publish_methods, sizeof(*d));
27
+   module = module_new(impl, sizeof(*d));
28
    if (module == NULL) {
29
        res = -errno;
30
        goto out;
31
@@ -680,3 +673,10 @@
32
    errno = -res;
33
    return NULL;
34
 }
35
+
36
+DEFINE_MODULE_INFO(module_zeroconf_publish) = {
37
+   .name = "module-zeroconf-publish",
38
+   .create = create_module_zeroconf_publish,
39
+   .load = module_zeroconf_publish_load,
40
+   .unload = module_zeroconf_publish_unload,
41
+};
42
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/pulse-server.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/pulse-server.c Changed
59
 
1
@@ -1145,10 +1145,9 @@
2
    int32_t avail;
3
 
4
    stream->timestamp = pd->pwt.now;
5
+   stream->delay = pd->pwt.buffered * SPA_USEC_PER_SEC / stream->ss.rate;
6
    if (pd->pwt.rate.denom > 0)
7
        stream->delay = pd->pwt.delay * SPA_USEC_PER_SEC / pd->pwt.rate.denom;
8
-   else
9
-       stream->delay = 0;
10
 
11
    if (stream->direction == PW_DIRECTION_OUTPUT) {
12
        if (pd->quantum != stream->last_quantum)
13
@@ -1260,8 +1259,7 @@
14
    if (stream->direction == PW_DIRECTION_OUTPUT) {
15
        int32_t avail = spa_ringbuffer_get_read_index(&stream->ring, &index);
16
 
17
-       if (stream->rate_match)
18
-           minreq = stream->rate_match->size * stream->frame_size;
19
+       minreq = buffer->requested * stream->frame_size;
20
        if (minreq == 0)
21
            minreq = stream->attr.minreq;
22
 
23
@@ -1357,7 +1355,7 @@
24
    if (do_flush)
25
        pw_stream_flush(stream->stream, true);
26
 
27
-   pw_stream_get_time(stream->stream, &pd.pwt);
28
+   pw_stream_get_time_n(stream->stream, &pd.pwt, sizeof(pd.pwt));
29
 
30
    pw_loop_invoke(impl->loop,
31
            do_process_done, 1, &pd, sizeof(pd), false, stream);
32
@@ -3355,7 +3353,7 @@
33
 {
34
    message_put(m,
35
        TAG_U32, module->index,         /* module index */
36
-       TAG_STRING, module->name,
37
+       TAG_STRING, module->info->name,
38
        TAG_STRING, module->args,
39
        TAG_U32, -1,                /* n_used */
40
        TAG_INVALID);
41
@@ -4743,7 +4741,7 @@
42
 
43
    if (SPA_RESULT_IS_OK(result)) {
44
        pw_log_info("%s loaded module index:%u name:%s tag:%d",
45
-               client_name, module->index, module->name, tag);
46
+               client_name, module->index, module->info->name, tag);
47
 
48
        module->loaded = true;
49
 
50
@@ -4764,7 +4762,7 @@
51
    else {
52
        pw_log_warn("%p: %s failed to load module index:%u name:%s tag:%d result:%d (%s)",
53
                impl, client_name,
54
-               module->index, module->name, tag,
55
+               module->index, module->info->name, tag,
56
                result, spa_strerror(result));
57
 
58
        module_schedule_unload(module);
59
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/sample-play.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/sample-play.c Changed
38
 
1
@@ -61,17 +61,6 @@
2
    }
3
 }
4
 
5
-static void sample_play_stream_io_changed(void *data, uint32_t id, void *area, uint32_t size)
6
-{
7
-   struct sample_play *p = data;
8
-
9
-   switch (id) {
10
-   case SPA_IO_RateMatch:
11
-       p->rate_match = area;
12
-       break;
13
-   }
14
-}
15
-
16
 static void sample_play_stream_destroy(void *data)
17
 {
18
    struct sample_play *p = data;
19
@@ -111,8 +100,8 @@
20
        return;
21
 
22
    size = SPA_MIN(size, buf->datas0.maxsize);
23
-   if (p->rate_match)
24
-       size = SPA_MIN(size, p->rate_match->size * p->stride);
25
+   if (b->requested)
26
+       size = SPA_MIN(size, b->requested * p->stride);
27
 
28
    memcpy(d, s->buffer + p->offset, size);
29
 
30
@@ -135,7 +124,6 @@
31
 static const struct pw_stream_events sample_play_stream_events = {
32
    PW_VERSION_STREAM_EVENTS,
33
    .state_changed = sample_play_stream_state_changed,
34
-   .io_changed = sample_play_stream_io_changed,
35
    .destroy = sample_play_stream_destroy,
36
    .process = sample_play_stream_process,
37
    .drained = sample_play_stream_drained,
38
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/sample-play.h -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/sample-play.h Changed
17
 
1
@@ -37,7 +37,6 @@
2
 struct pw_stream;
3
 struct pw_context;
4
 struct pw_properties;
5
-struct spa_io_rate_match;
6
 
7
 struct sample_play_events {
8
 #define VERSION_SAMPLE_PLAY_EVENTS 0
9
@@ -55,7 +54,6 @@
10
    struct spa_list link;
11
    struct sample *sample;
12
    struct pw_stream *stream;
13
-   struct spa_io_rate_match *rate_match;
14
    uint32_t id;
15
    struct spa_hook listener;
16
    struct pw_context *context;
17
pipewire-0.3.49.tar.gz/src/modules/module-protocol-simple.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-simple.c Changed
69
 
1
@@ -121,8 +121,6 @@
2
    struct pw_stream *playback;
3
    struct spa_hook playback_listener;
4
 
5
-   struct spa_io_rate_match *rate_match;
6
-
7
    unsigned int disconnect:1;
8
    unsigned int disconnecting:1;
9
    unsigned int cleanup:1;
10
@@ -282,12 +280,9 @@
11
    }
12
    d = &buf->buffer->datas0;
13
 
14
-   if (client->rate_match) {
15
-       size = client->rate_match->size * impl->frame_size;
16
-       size = SPA_MIN(size, d->maxsize);
17
-   } else {
18
-       size = d->maxsize;
19
-   }
20
+   size = d->maxsize;
21
+   if (buf->requested)
22
+       size = SPA_MIN(size, buf->requested * impl->frame_size);
23
 
24
    offset = 0;
25
    while (size > 0) {
26
@@ -354,16 +349,6 @@
27
    client->playback = NULL;
28
 }
29
 
30
-static void playback_io_changed(void *data, uint32_t id, void *area, uint32_t size)
31
-{
32
-   struct client *client = data;
33
-   switch (id) {
34
-   case SPA_IO_RateMatch:
35
-       client->rate_match = area;
36
-       break;
37
-   }
38
-}
39
-
40
 static const struct pw_stream_events capture_stream_events = {
41
    PW_VERSION_STREAM_EVENTS,
42
    .destroy = capture_destroy,
43
@@ -375,7 +360,6 @@
44
    PW_VERSION_STREAM_EVENTS,
45
    .destroy = playback_destroy,
46
    .state_changed = on_stream_state_changed,
47
-   .io_changed = playback_io_changed,
48
    .process = playback_process
49
 };
50
 
51
@@ -394,7 +378,7 @@
52
 
53
    if (impl->capture) {
54
        props = pw_properties_new(
55
-           PW_KEY_NODE_GROUP, "pipewire.dummy",
56
+           PW_KEY_NODE_WANT_DRIVER, "true",
57
            PW_KEY_NODE_LATENCY, latency,
58
            PW_KEY_NODE_RATE, pw_properties_get(impl->props, PW_KEY_NODE_RATE),
59
            PW_KEY_NODE_TARGET, pw_properties_get(impl->props, "capture.node"),
60
@@ -418,7 +402,7 @@
61
    }
62
    if (impl->playback) {
63
        props = pw_properties_new(
64
-           PW_KEY_NODE_GROUP, "pipewire.dummy",
65
+           PW_KEY_NODE_WANT_DRIVER, "true",
66
            PW_KEY_NODE_LATENCY, latency,
67
            PW_KEY_NODE_RATE, pw_properties_get(impl->props, PW_KEY_NODE_RATE),
68
            PW_KEY_NODE_TARGET, pw_properties_get(impl->props, "playback.node"),
69
pipewire-0.3.49.tar.gz/src/modules/module-pulse-tunnel.c -> pipewire-0.3.50.tar.gz/src/modules/module-pulse-tunnel.c Changed
201
 
1
@@ -40,6 +40,7 @@
2
 #include <spa/utils/string.h>
3
 #include <spa/utils/json.h>
4
 #include <spa/utils/ringbuffer.h>
5
+#include <spa/utils/dll.h>
6
 #include <spa/debug/pod.h>
7
 #include <spa/pod/builder.h>
8
 #include <spa/param/audio/format-utils.h>
9
@@ -85,7 +86,7 @@
10
 #define RINGBUFFER_SIZE        (1u << 22)
11
 #define RINGBUFFER_MASK        (RINGBUFFER_SIZE-1)
12
 
13
-#define DEFAULT_LATENCY_MSEC   (100)
14
+#define DEFAULT_LATENCY_MSEC   (200)
15
 
16
 struct impl {
17
    struct pw_context *context;
18
@@ -108,7 +109,6 @@
19
    struct pw_properties *stream_props;
20
    struct pw_stream *stream;
21
    struct spa_hook stream_listener;
22
-   struct spa_io_rate_match *rate_match;
23
    struct spa_audio_info_raw info;
24
    uint32_t frame_size;
25
 
26
@@ -120,6 +120,10 @@
27
    pa_context *pa_context;
28
    pa_stream *pa_stream;
29
 
30
+   uint32_t target_buffer;
31
+   struct spa_dll dll;
32
+   float max_error;
33
+
34
    unsigned int do_disconnect:1;
35
 };
36
 
37
@@ -189,13 +193,29 @@
38
    size = SPA_MIN(bd->chunk->size, RINGBUFFER_SIZE);
39
 
40
    filled = spa_ringbuffer_get_write_index(&impl->ring, &write_index);
41
+
42
    if (filled < 0) {
43
        pw_log_warn("%p: underrun write:%u filled:%d",
44
                impl, write_index, filled);
45
-   } else if ((uint32_t)filled + size > RINGBUFFER_SIZE) {
46
-       pw_log_debug("%p: overrun write:%u filled:%d size:%u max:%u",
47
-                                        impl, write_index, filled,
48
-                                        size, RINGBUFFER_SIZE);
49
+   } else {
50
+       float error, corr;
51
+
52
+       if ((uint32_t)filled + size > impl->target_buffer * 2) {
53
+           pw_log_warn("%p: overrun write:%u filled:%d size:%u max:%u",
54
+                                           impl, write_index, filled,
55
+                                           size, RINGBUFFER_SIZE);
56
+           write_index -= impl->target_buffer;
57
+           filled -= impl->target_buffer;
58
+       } else {
59
+           error = (float)filled - (float)impl->target_buffer;
60
+           error = SPA_CLAMP(error, -impl->max_error, impl->max_error);
61
+
62
+           pw_log_debug("filled:%u target:%u error:%f corr:%f", filled,
63
+                   impl->target_buffer, error, corr);
64
+           corr = spa_dll_update(&impl->dll, error);
65
+           pw_stream_set_control(impl->stream,
66
+                   SPA_PROP_rate, 1, &corr, NULL);
67
+       }
68
    }
69
    spa_ringbuffer_write_data(&impl->ring,
70
                impl->buffer, RINGBUFFER_SIZE,
71
@@ -223,16 +243,31 @@
72
 
73
    bd = &buf->buffer->datas0;
74
 
75
-   if (impl->rate_match)
76
-       req = impl->rate_match->size * impl->frame_size;
77
-   else
78
-       req = 4096;
79
+   if ((req = buf->requested * impl->frame_size) == 0)
80
+       req = 4096 * impl->frame_size;
81
 
82
    avail = spa_ringbuffer_get_read_index(&impl->ring, &read_index);
83
    if (avail <= 0) {
84
        size = SPA_MIN(bd->maxsize, req);
85
        memset(bd->data, 0, size);
86
    } else {
87
+       float error, corr;
88
+
89
+       if (avail > (int32_t)impl->target_buffer * 2) {
90
+           avail -= impl->target_buffer;
91
+           read_index += impl->target_buffer;
92
+       } else {
93
+           error = (float)impl->target_buffer - (float)avail;
94
+           error = SPA_CLAMP(error, -impl->max_error, impl->max_error);
95
+
96
+           corr = spa_dll_update(&impl->dll, error);
97
+
98
+           pw_log_debug("avail:%u target:%u error:%f corr:%f", avail,
99
+                   impl->target_buffer, error, corr);
100
+           pw_stream_set_control(impl->stream,
101
+                   SPA_PROP_rate, 1, &corr, NULL);
102
+       }
103
+
104
        size = SPA_MIN(bd->maxsize, (uint32_t)avail);
105
        size = SPA_MIN(size, req);
106
 
107
@@ -243,6 +278,7 @@
108
 
109
        read_index += size;
110
        spa_ringbuffer_read_update(&impl->ring, read_index);
111
+
112
    }
113
    bd->chunk->offset = 0;
114
    bd->chunk->size = size;
115
@@ -250,16 +286,6 @@
116
    pw_stream_queue_buffer(impl->stream, buf);
117
 }
118
 
119
-static void stream_io_changed(void *data, uint32_t id, void *area, uint32_t size)
120
-{
121
-   struct impl *impl = data;
122
-   switch (id) {
123
-   case SPA_IO_RateMatch:
124
-       impl->rate_match = area;
125
-       break;
126
-   }
127
-}
128
-
129
 static const struct pw_stream_events playback_stream_events = {
130
    PW_VERSION_STREAM_EVENTS,
131
    .destroy = stream_destroy,
132
@@ -271,7 +297,6 @@
133
    PW_VERSION_STREAM_EVENTS,
134
    .destroy = stream_destroy,
135
    .state_changed = stream_state_changed,
136
-   .io_changed = stream_io_changed,
137
    .process = capture_stream_process
138
 };
139
 
140
@@ -300,8 +325,6 @@
141
                &playback_stream_events, impl);
142
    }
143
 
144
-   impl->frame_size = 2 * 2;
145
-
146
    n_params = 0;
147
    spa_pod_builder_init(&b, buffer, sizeof(buffer));
148
    paramsn_params++ = spa_format_audio_raw_build(&b,
149
@@ -472,6 +495,7 @@
150
    char stream_name1024;
151
    pa_buffer_attr bufferattr;
152
    int res = -EIO;
153
+   uint32_t latency_bytes;
154
 
155
    if ((impl->pa_mainloop = pa_threaded_mainloop_new()) == NULL)
156
        goto error;
157
@@ -538,19 +562,26 @@
158
    bufferattr.maxlength = (uint32_t) -1;
159
    bufferattr.prebuf = (uint32_t) -1;
160
 
161
+   latency_bytes = pa_usec_to_bytes(impl->latency_msec * SPA_USEC_PER_MSEC, &ss);
162
+
163
+   /* half in our buffer, half in the network + remote */
164
+   impl->target_buffer = latency_bytes / 2;
165
+
166
    if (impl->mode == MODE_CAPTURE) {
167
-       bufferattr.fragsize = pa_usec_to_bytes(impl->latency_msec * SPA_USEC_PER_MSEC, &ss);
168
+       bufferattr.fragsize = latency_bytes / 2;
169
 
170
        res = pa_stream_connect_record(impl->pa_stream,
171
                remote_node_target, &bufferattr,
172
+               PA_STREAM_DONT_MOVE |
173
                PA_STREAM_INTERPOLATE_TIMING |
174
                PA_STREAM_ADJUST_LATENCY |
175
                PA_STREAM_AUTO_TIMING_UPDATE);
176
    } else {
177
-       bufferattr.tlength = pa_usec_to_bytes(impl->latency_msec * SPA_USEC_PER_MSEC, &ss);
178
+       bufferattr.tlength = latency_bytes / 2;
179
 
180
        res = pa_stream_connect_playback(impl->pa_stream,
181
                remote_node_target, &bufferattr,
182
+               PA_STREAM_DONT_MOVE |
183
                PA_STREAM_INTERPOLATE_TIMING |
184
                PA_STREAM_ADJUST_LATENCY |
185
                PA_STREAM_AUTO_TIMING_UPDATE,
186
@@ -713,6 +744,41 @@
187
    info->channels = pw_properties_get_uint32(props, PW_KEY_AUDIO_CHANNELS, info->channels);
188
    if ((str = pw_properties_get(props, SPA_KEY_AUDIO_POSITION)) != NULL)
189
        parse_position(info, str, strlen(str));
190
+
191
+}
192
+
193
+static int calc_frame_size(struct spa_audio_info_raw *info)
194
+{
195
+   int res = info->channels;
196
+   switch (info->format) {
197
+   case SPA_AUDIO_FORMAT_U8:
198
+   case SPA_AUDIO_FORMAT_S8:
199
+   case SPA_AUDIO_FORMAT_ALAW:
200
+   case SPA_AUDIO_FORMAT_ULAW:
201
pipewire-0.3.49.tar.gz/src/modules/module-raop-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-raop-sink.c Changed
37
 
1
@@ -1541,6 +1541,7 @@
2
    struct pw_context *context = pw_impl_module_get_context(module);
3
    struct pw_properties *props = NULL;
4
    uint32_t id = pw_global_get_id(pw_impl_module_get_global(module));
5
+   uint32_t pid = getpid();
6
    struct impl *impl;
7
    const char *str;
8
    int res;
9
@@ -1578,8 +1579,8 @@
10
    impl->context = context;
11
    impl->loop = pw_context_get_main_loop(context);
12
 
13
-   if (pw_properties_get(props, PW_KEY_NODE_GROUP) == NULL)
14
-       pw_properties_set(props, PW_KEY_NODE_GROUP, "pipewire.dummy");
15
+   if (pw_properties_get(props, PW_KEY_NODE_WANT_DRIVER) == NULL)
16
+       pw_properties_set(props, PW_KEY_NODE_WANT_DRIVER, "true");
17
    if (pw_properties_get(props, PW_KEY_NODE_VIRTUAL) == NULL)
18
        pw_properties_set(props, PW_KEY_NODE_VIRTUAL, "true");
19
 
20
@@ -1587,7 +1588,7 @@
21
        pw_properties_set(props, PW_KEY_MEDIA_CLASS, "Audio/Sink");
22
 
23
    if (pw_properties_get(props, PW_KEY_NODE_NAME) == NULL)
24
-       pw_properties_setf(props, PW_KEY_NODE_NAME, "raop-sink-%u", id);
25
+       pw_properties_setf(props, PW_KEY_NODE_NAME, "raop-sink-%u-%u", pid, id);
26
    if (pw_properties_get(props, PW_KEY_NODE_DESCRIPTION) == NULL)
27
        pw_properties_set(props, PW_KEY_NODE_DESCRIPTION,
28
                pw_properties_get(props, PW_KEY_NODE_NAME));
29
@@ -1604,6 +1605,7 @@
30
    copy_props(impl, props, PW_KEY_NODE_NAME);
31
    copy_props(impl, props, PW_KEY_NODE_DESCRIPTION);
32
    copy_props(impl, props, PW_KEY_NODE_GROUP);
33
+   copy_props(impl, props, PW_KEY_NODE_WANT_DRIVER);
34
    copy_props(impl, props, PW_KEY_NODE_LATENCY);
35
    copy_props(impl, props, PW_KEY_NODE_VIRTUAL);
36
    copy_props(impl, props, PW_KEY_MEDIA_CLASS);
37
pipewire-0.3.49.tar.gz/src/modules/module-roc-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-roc-sink.c Changed
12
 
1
@@ -410,8 +410,8 @@
2
        pw_properties_set(capture_props, PW_KEY_NODE_NAME, "roc-sink");
3
    if (pw_properties_get(capture_props, PW_KEY_NODE_DESCRIPTION) == NULL)
4
        pw_properties_set(capture_props, PW_KEY_NODE_DESCRIPTION, "ROC Sink");
5
-   if (pw_properties_get(capture_props, PW_KEY_NODE_GROUP) == NULL)
6
-       pw_properties_set(capture_props, PW_KEY_NODE_GROUP, "pipewire.dummy");
7
+   if (pw_properties_get(capture_props, PW_KEY_NODE_WANT_DRIVER) == NULL)
8
+       pw_properties_set(capture_props, PW_KEY_NODE_WANT_DRIVER, "true");
9
    if (pw_properties_get(capture_props, PW_KEY_NODE_VIRTUAL) == NULL)
10
        pw_properties_set(capture_props, PW_KEY_NODE_VIRTUAL, "true");
11
    if (pw_properties_get(capture_props, PW_KEY_NODE_NETWORK) == NULL)
12
pipewire-0.3.49.tar.gz/src/modules/module-roc-source.c -> pipewire-0.3.50.tar.gz/src/modules/module-roc-source.c Changed
12
 
1
@@ -455,8 +455,8 @@
2
        pw_properties_set(playback_props, PW_KEY_NODE_NAME, "roc-source");
3
    if (pw_properties_get(playback_props, PW_KEY_NODE_DESCRIPTION) == NULL)
4
        pw_properties_set(playback_props, PW_KEY_NODE_DESCRIPTION, "ROC Source");
5
-   if (pw_properties_get(playback_props, PW_KEY_NODE_GROUP) == NULL)
6
-       pw_properties_set(playback_props, PW_KEY_NODE_GROUP, "pipewire.dummy");
7
+   if (pw_properties_get(playback_props, PW_KEY_NODE_WANT_DRIVER) == NULL)
8
+       pw_properties_set(playback_props, PW_KEY_NODE_WANT_DRIVER, "true");
9
    if (pw_properties_get(playback_props, PW_KEY_NODE_VIRTUAL) == NULL)
10
        pw_properties_set(playback_props, PW_KEY_NODE_VIRTUAL, "true");
11
    if (pw_properties_get(playback_props, PW_KEY_NODE_NETWORK) == NULL)
12
pipewire-0.3.49.tar.gz/src/modules/module-rt.c -> pipewire-0.3.50.tar.gz/src/modules/module-rt.c Changed
22
 
1
@@ -464,8 +464,7 @@
2
 static void module_destroy(void *data)
3
 {
4
    struct impl *impl = data;
5
-
6
-   pw_thread_utils_set(NULL);
7
+   pw_context_set_object(impl->context, SPA_TYPE_INTERFACE_ThreadUtils, NULL);
8
    spa_hook_remove(&impl->module_listener);
9
 
10
 #ifdef HAVE_DBUS
11
@@ -931,7 +930,9 @@
12
            SPA_TYPE_INTERFACE_ThreadUtils,
13
            SPA_VERSION_THREAD_UTILS,
14
            &impl_thread_utils, impl);
15
-   pw_thread_utils_set(&impl->thread_utils);
16
+
17
+   pw_context_set_object(context, SPA_TYPE_INTERFACE_ThreadUtils,
18
+           &impl->thread_utils);
19
 
20
    pw_impl_module_add_listener(module, &impl->module_listener, &module_events, impl);
21
 
22
pipewire-0.3.49.tar.gz/src/modules/module-session-manager/endpoint-link.c -> pipewire-0.3.50.tar.gz/src/modules/module-session-manager/endpoint-link.c Changed
24
 
1
@@ -540,6 +540,7 @@
2
    struct pw_context *context = pw_impl_module_get_context(module);
3
    struct pw_impl_factory *factory;
4
    struct factory_data *data;
5
+   int res;
6
 
7
    factory = pw_context_create_factory(context,
8
                 "endpoint-link",
9
@@ -558,9 +559,13 @@
10
 
11
    data->export.type = PW_TYPE_INTERFACE_EndpointLink;
12
    data->export.func = pw_core_endpoint_link_export;
13
-   pw_context_register_export_type(context, &data->export);
14
+   if ((res = pw_context_register_export_type(context, &data->export)) < 0)
15
+       goto error;
16
 
17
    pw_impl_module_add_listener(module, &data->module_listener, &module_events, data);
18
 
19
    return 0;
20
+error:
21
+   pw_impl_factory_destroy(data->this);
22
+   return res;
23
 }
24
pipewire-0.3.49.tar.gz/src/modules/module-session-manager/endpoint-stream.c -> pipewire-0.3.50.tar.gz/src/modules/module-session-manager/endpoint-stream.c Changed
24
 
1
@@ -531,6 +531,7 @@
2
    struct pw_context *context = pw_impl_module_get_context(module);
3
    struct pw_impl_factory *factory;
4
    struct factory_data *data;
5
+   int res;
6
 
7
    factory = pw_context_create_factory(context,
8
                 "endpoint-stream",
9
@@ -549,9 +550,13 @@
10
 
11
    data->export.type = PW_TYPE_INTERFACE_EndpointStream;
12
    data->export.func = pw_core_endpoint_stream_export;
13
-   pw_context_register_export_type(context, &data->export);
14
+   if ((res = pw_context_register_export_type(context, &data->export)) < 0)
15
+       goto error;
16
 
17
    pw_impl_module_add_listener(module, &data->module_listener, &module_events, data);
18
 
19
    return 0;
20
+error:
21
+   pw_impl_factory_destroy(data->this);
22
+   return res;
23
 }
24
pipewire-0.3.49.tar.gz/src/modules/module-session-manager/endpoint.c -> pipewire-0.3.50.tar.gz/src/modules/module-session-manager/endpoint.c Changed
24
 
1
@@ -540,6 +540,7 @@
2
    struct pw_context *context = pw_impl_module_get_context(module);
3
    struct pw_impl_factory *factory;
4
    struct factory_data *data;
5
+   int res;
6
 
7
    factory = pw_context_create_factory(context,
8
                 "endpoint",
9
@@ -558,9 +559,13 @@
10
 
11
    data->export.type = PW_TYPE_INTERFACE_Endpoint;
12
    data->export.func = pw_core_endpoint_export;
13
-   pw_context_register_export_type(context, &data->export);
14
+   if ((res = pw_context_register_export_type(context, &data->export)) < 0)
15
+       goto error;
16
 
17
    pw_impl_module_add_listener(module, &data->module_listener, &module_events, data);
18
 
19
    return 0;
20
+error:
21
+   pw_impl_factory_destroy(data->this);
22
+   return res;
23
 }
24
pipewire-0.3.49.tar.gz/src/modules/module-session-manager/session.c -> pipewire-0.3.50.tar.gz/src/modules/module-session-manager/session.c Changed
24
 
1
@@ -529,6 +529,7 @@
2
    struct pw_context *context = pw_impl_module_get_context(module);
3
    struct pw_impl_factory *factory;
4
    struct factory_data *data;
5
+   int res;
6
 
7
    factory = pw_context_create_factory(context,
8
                 "session",
9
@@ -547,9 +548,13 @@
10
 
11
    data->export.type = PW_TYPE_INTERFACE_Session;
12
    data->export.func = pw_core_session_export;
13
-   pw_context_register_export_type(context, &data->export);
14
+   if ((res = pw_context_register_export_type(context, &data->export)) < 0)
15
+       goto error;
16
 
17
    pw_impl_module_add_listener(module, &data->module_listener, &module_events, data);
18
 
19
    return 0;
20
+error:
21
+   pw_impl_factory_destroy(data->this);
22
+   return res;
23
 }
24
pipewire-0.3.49.tar.gz/src/pipewire/context.c -> pipewire-0.3.50.tar.gz/src/pipewire/context.c Changed
77
 
1
@@ -124,18 +124,20 @@
2
 static int context_set_freewheel(struct pw_context *context, bool freewheel)
3
 {
4
    struct spa_thread *thr;
5
-   int res;
6
+   int res = 0;
7
 
8
    if ((thr = pw_data_loop_get_thread(context->data_loop_impl)) == NULL)
9
        return -EIO;
10
 
11
    if (freewheel) {
12
        pw_log_info("%p: enter freewheel", context);
13
-       res = pw_thread_utils_drop_rt(thr);
14
+       if (context->thread_utils)
15
+           res = spa_thread_utils_drop_rt(context->thread_utils, thr);
16
    } else {
17
        pw_log_info("%p: exit freewheel", context);
18
-       // Use the priority as configured within the realtime module
19
-       res = pw_thread_utils_acquire_rt(thr, -1);
20
+       /* Use the priority as configured within the realtime module */
21
+       if (context->thread_utils)
22
+           res = spa_thread_utils_acquire_rt(context->thread_utils, thr, -1);
23
    }
24
    if (res < 0)
25
        pw_log_info("%p: freewheel error:%s", context, spa_strerror(res));
26
@@ -411,8 +413,6 @@
27
    pw_data_loop_invoke(this->data_loop_impl,
28
            do_data_loop_setup, 0, NULL, 0, false, this);
29
 
30
-   context_set_freewheel(this, false);
31
-
32
    pw_settings_expose(this);
33
 
34
    pw_log_debug("%p: created", this);
35
@@ -464,7 +464,7 @@
36
        pw_resource_destroy(resource);
37
 
38
    if (context->data_loop_impl)
39
-       pw_data_loop_destroy(context->data_loop_impl);
40
+       pw_data_loop_stop(context->data_loop_impl);
41
 
42
    spa_list_consume(module, &context->module_list, link)
43
        pw_impl_module_destroy(module);
44
@@ -481,6 +481,9 @@
45
    pw_log_debug("%p: free", context);
46
    pw_context_emit_free(context);
47
 
48
+   if (context->data_loop_impl)
49
+       pw_data_loop_destroy(context->data_loop_impl);
50
+
51
    if (context->pool)
52
        pw_mempool_destroy(context->pool);
53
 
54
@@ -1172,7 +1175,8 @@
55
            if (t == NULL)
56
                ensure_state(n, false);
57
            else {
58
-               t->passive = false;
59
+               if (n->always_process)
60
+                   t->passive = false;
61
                collect_nodes(context, n);
62
            }
63
        }
64
@@ -1456,6 +1460,12 @@
65
        }
66
        entry->value = value;
67
    }
68
+   if (spa_streq(type, SPA_TYPE_INTERFACE_ThreadUtils)) {
69
+       context->thread_utils = value;
70
+       if (context->data_loop_impl)
71
+           pw_data_loop_set_thread_utils(context->data_loop_impl,
72
+                   context->thread_utils);
73
+   }
74
    return 0;
75
 }
76
 
77
pipewire-0.3.49.tar.gz/src/pipewire/data-loop.c -> pipewire-0.3.50.tar.gz/src/pipewire/data-loop.c Changed
70
 
1
@@ -197,16 +197,21 @@
2
 int pw_data_loop_start(struct pw_data_loop *loop)
3
 {
4
    if (!loop->running) {
5
+       struct spa_thread_utils *utils;
6
        struct spa_thread *thr;
7
 
8
        loop->running = true;
9
-       thr = pw_thread_utils_create(NULL, do_loop, loop);
10
+
11
+       if ((utils = loop->thread_utils) == NULL)
12
+           utils = pw_thread_utils_get();
13
+       thr = spa_thread_utils_create(utils, NULL, do_loop, loop);
14
        loop->thread = (pthread_t)thr;
15
        if (thr == NULL) {
16
            pw_log_error("%p: can't create thread: %m", loop);
17
            loop->running = false;
18
            return -errno;
19
        }
20
+       spa_thread_utils_acquire_rt(utils, thr, -1);
21
    }
22
    return 0;
23
 }
24
@@ -223,6 +228,7 @@
25
 {
26
    pw_log_debug("%p stopping", loop);
27
    if (loop->running) {
28
+       struct spa_thread_utils *utils;
29
        if (loop->cancel) {
30
            pw_log_debug("%p cancel", loop);
31
            pthread_cancel(loop->thread);
32
@@ -231,7 +237,9 @@
33
            pw_loop_invoke(loop->loop, do_stop, 1, NULL, 0, false, loop);
34
        }
35
        pw_log_debug("%p join", loop);
36
-       pw_thread_utils_join((struct spa_thread*)loop->thread, NULL);
37
+       if ((utils = loop->thread_utils) == NULL)
38
+           utils = pw_thread_utils_get();
39
+       spa_thread_utils_join(utils, (struct spa_thread*)loop->thread, NULL);
40
        pw_log_debug("%p joined", loop);
41
    }
42
    pw_log_debug("%p stopped", loop);
43
@@ -246,7 +254,7 @@
44
 SPA_EXPORT
45
 bool pw_data_loop_in_thread(struct pw_data_loop * loop)
46
 {
47
-   return pthread_equal(loop->thread, pthread_self());
48
+   return loop->running && pthread_equal(loop->thread, pthread_self());
49
 }
50
 
51
 /** Get the thread object.
52
@@ -273,3 +281,17 @@
53
        res = func(loop->loop->loop, false, seq, data, size, user_data);
54
    return res;
55
 }
56
+
57
+/** Set a thread utils implementation.
58
+ * \param loop the data loop to set the thread utils on
59
+ * \param impl the thread utils implementation
60
+ *
61
+ * This configures a custom spa_thread_utils implementation for this data
62
+ * loop. Use NULL to restore the system default implementation.
63
+ */
64
+SPA_EXPORT
65
+void pw_data_loop_set_thread_utils(struct pw_data_loop *loop,
66
+       struct spa_thread_utils *impl)
67
+{
68
+   loop->thread_utils = impl;
69
+}
70
pipewire-0.3.49.tar.gz/src/pipewire/data-loop.h -> pipewire-0.3.50.tar.gz/src/pipewire/data-loop.h Changed
20
 
1
@@ -30,6 +30,7 @@
2
 #endif
3
 
4
 #include <spa/utils/hook.h>
5
+#include <spa/support/thread.h>
6
 
7
 /** \defgroup pw_data_loop Data Loop
8
  *
9
@@ -97,6 +98,10 @@
10
        spa_invoke_func_t func, uint32_t seq, const void *data, size_t size,
11
        bool block, void *user_data);
12
 
13
+/** Set a custom spa_thread_utils for this loop. Setting NULL restores the
14
+ * system default implementation. Since 0.3.50 */
15
+void pw_data_loop_set_thread_utils(struct pw_data_loop *loop,
16
+       struct spa_thread_utils *impl);
17
 /**
18
  * \}
19
  */
20
pipewire-0.3.49.tar.gz/src/pipewire/filter.c -> pipewire-0.3.50.tar.gz/src/pipewire/filter.c Changed
10
 
1
@@ -974,7 +974,7 @@
2
            impl->clock_id = p->clock.id;
3
        }
4
        impl->time.ticks = p->clock.position - impl->base_pos;
5
-       impl->time.delay = p->clock.delay;
6
+       impl->time.delay = 0;
7
        SEQ_WRITE(impl->seq);
8
    }
9
 }
10
pipewire-0.3.49.tar.gz/src/pipewire/filter.h -> pipewire-0.3.50.tar.gz/src/pipewire/filter.h Changed
22
 
1
@@ -217,17 +217,9 @@
2
            uint32_t n_params       /**< number of elements in \a params */);
3
 
4
 
5
-#if 0
6
-/** A time structure  */
7
-struct pw_time {
8
-   int64_t now;            /**< the monotonic time */
9
-   struct spa_fraction rate;   /**< the rate of \a ticks and delay */
10
-   uint64_t ticks;         /**< the ticks at \a now. This is the current time that
11
-                     *  the remote end is reading/writing. */
12
-};
13
-#endif
14
-
15
-/** Query the time on the filter  */
16
+/** Query the time on the filter, deprecated, use the spa_io_position in the
17
+ * process() method for timing information. */
18
+SPA_DEPRECATED
19
 int pw_filter_get_time(struct pw_filter *filter, struct pw_time *time);
20
 
21
 /** Get a buffer that can be filled for output ports or consumed
22
pipewire-0.3.49.tar.gz/src/pipewire/global.c -> pipewire-0.3.50.tar.gz/src/pipewire/global.c Changed
10
 
1
@@ -177,7 +177,7 @@
2
            pw_log_debug("impl-client %p: (no registry) global %d %08x serial:%"PRIu64
3
                    " generation:%"PRIu64, client, global->id, permissions, global->serial,
4
                    global->generation);
5
-           pw_core_resource_done(client->core_resource, global->id, 0);
6
+           pw_core_resource_done(client->core_resource, SPA_ID_INVALID, 0);
7
        }
8
    }
9
 
10
pipewire-0.3.49.tar.gz/src/pipewire/impl-node.c -> pipewire-0.3.50.tar.gz/src/pipewire/impl-node.c Changed
21
 
1
@@ -2213,7 +2213,9 @@
2
    bool old = node->active;
3
 
4
    if (old != active) {
5
-       pw_log_debug("%p: %s", node, active ? "activate" : "deactivate");
6
+       pw_log_debug("%p: %s registered:%d", node,
7
+               active ? "activate" : "deactivate",
8
+               node->registered);
9
 
10
        node->active = active;
11
        pw_impl_node_emit_active_changed(node, active);
12
@@ -2221,6 +2223,8 @@
13
        if (node->registered)
14
            pw_context_recalc_graph(node->context,
15
                    active ? "node activate" : "node deactivate");
16
+       else if (!active && node->exported)
17
+           pw_loop_invoke(node->data_loop, do_node_remove, 1, NULL, 0, true, node);
18
    }
19
    return 0;
20
 }
21
pipewire-0.3.49.tar.gz/src/pipewire/pipewire.c -> pipewire-0.3.50.tar.gz/src/pipewire/pipewire.c Changed
39
 
1
@@ -577,8 +577,7 @@
2
  * Initialize the PipeWire system, parse and modify any parameters given
3
  * by \a argc and \a argv and set up debugging.
4
  *
5
- * The environment variable \a PIPEWIRE_DEBUG
6
- *
7
+ * This function can be called multiple times.
8
  */
9
 SPA_EXPORT
10
 void pw_init(int *argc, char **argv)
11
@@ -670,6 +669,19 @@
12
    pthread_mutex_unlock(&init_lock);
13
 }
14
 
15
+/** Deinitialize PipeWire
16
+ *
17
+ * Deinitialize the PipeWire system and free up all resources allocated
18
+ * by pw_init().
19
+ *
20
+ * Before 0.3.49 this function can only be called once after which the pipewire
21
+ * library can not be used again. This is usually called by test programs to
22
+ * check for memory leaks.
23
+ *
24
+ * Since 0.3.49 this function must be paired with an equal amount of pw_init()
25
+ * calls to deinitialize the PipeWire library. The PipeWire library can be
26
+ * used again after being deinitialized with a new pw_init() call.
27
+ */
28
 SPA_EXPORT
29
 void pw_deinit(void)
30
 {
31
@@ -708,7 +720,6 @@
32
  *
33
  * Debugging categories can be enabled by using the PIPEWIRE_DEBUG
34
  * environment variable
35
- *
36
  */
37
 SPA_EXPORT
38
 bool pw_debug_is_category_enabled(const char *name)
39
pipewire-0.3.49.tar.gz/src/pipewire/private.h -> pipewire-0.3.50.tar.gz/src/pipewire/private.h Changed
18
 
1
@@ -455,6 +455,7 @@
2
    struct spa_hook_list driver_listener_list;
3
    struct spa_hook_list listener_list;
4
 
5
+   struct spa_thread_utils *thread_utils;
6
    struct pw_loop *main_loop;      /**< main loop for control */
7
    struct pw_loop *data_loop;      /**< data loop for data passing */
8
    struct pw_data_loop *data_loop_impl;
9
@@ -483,6 +484,8 @@
10
 
11
    struct spa_hook_list listener_list;
12
 
13
+   struct spa_thread_utils *thread_utils;
14
+
15
    pthread_t thread;
16
    unsigned int cancel:1;
17
    unsigned int created:1;
18
pipewire-0.3.49.tar.gz/src/pipewire/stream.c -> pipewire-0.3.50.tar.gz/src/pipewire/stream.c Changed
189
 
1
@@ -547,6 +547,28 @@
2
    return 0;
3
 }
4
 
5
+static inline uint32_t update_requested(struct stream *impl)
6
+{
7
+   uint32_t index, id, res = 0;
8
+   struct buffer *buffer;
9
+   struct spa_io_rate_match *r = impl->rate_match;
10
+
11
+   if (spa_ringbuffer_get_read_index(&impl->dequeued.ring, &index) < 1)
12
+       return 0;
13
+
14
+   id = impl->dequeued.idsindex & MASK_BUFFERS;
15
+   buffer = &impl->buffersid;
16
+   if (r) {
17
+       buffer->this.requested = r->size;
18
+       res = r->size > 0 ? 1 : 0;
19
+   } else {
20
+       buffer->this.requested = impl->quantum;
21
+       res = 1;
22
+   }
23
+   pw_log_trace_fp("%p: update buffer:%u size:%u", impl, id, r->size);
24
+   return res;
25
+}
26
+
27
 static int impl_send_command(void *object, const struct spa_command *command)
28
 {
29
    struct stream *impl = object;
30
@@ -574,8 +596,10 @@
31
 
32
            if (impl->direction == SPA_DIRECTION_INPUT)
33
                impl->io->status = SPA_STATUS_NEED_DATA;
34
-           else if (!impl->process_rt && !impl->driving)
35
-               call_process(impl);
36
+           else if (!impl->process_rt && !impl->driving) {
37
+               if (update_requested(impl) > 0)
38
+                   call_process(impl);
39
+           }
40
 
41
            stream_set_state(stream, PW_STREAM_STATE_STREAMING, NULL);
42
        }
43
@@ -1029,12 +1053,13 @@
44
        if (!impl->process_rt && (recycled || res == SPA_STATUS_NEED_DATA)) {
45
            /* not realtime and we have a free buffer, trigger process so that we have
46
             * data in the next round. */
47
-           if (spa_ringbuffer_get_read_index(&impl->dequeued.ring, &index) > 0)
48
+           if (update_requested(impl) > 0)
49
                call_process(impl);
50
        } else if (res == SPA_STATUS_NEED_DATA) {
51
            /* realtime and we don't have a buffer, trigger process and try
52
             * again when there is something in the queue now */
53
-           call_process(impl);
54
+           if (update_requested(impl) > 0)
55
+               call_process(impl);
56
            if (impl->draining ||
57
                spa_ringbuffer_get_read_index(&impl->queued.ring, &index) > 0)
58
                goto again;
59
@@ -1127,7 +1152,7 @@
60
        struct control *c;
61
        const struct spa_pod *type, *pod;
62
        uint32_t iid, choice, n_vals, container = SPA_ID_INVALID;
63
-       float *vals, bool_range3 = { 1.0, 0.0, 1.0 };
64
+       float *vals, bool_range3 = { 1.0, 0.0, 1.0 }, dbl3;
65
 
66
        if (spa_pod_parse_object(param,
67
                    SPA_TYPE_OBJECT_PropInfo, NULL,
68
@@ -1147,7 +1172,7 @@
69
 
70
        if (spa_pod_parse_object(c->info,
71
                    SPA_TYPE_OBJECT_PropInfo, NULL,
72
-                   SPA_PROP_INFO_name, SPA_POD_String(&c->control.name),
73
+                   SPA_PROP_INFO_description, SPA_POD_OPT_String(&c->control.name),
74
                    SPA_PROP_INFO_type, SPA_POD_PodChoice(&type),
75
                    SPA_PROP_INFO_container, SPA_POD_OPT_Id(&container)) < 0) {
76
            free(c);
77
@@ -1161,6 +1186,15 @@
78
        c->type = SPA_POD_TYPE(pod);
79
        if (spa_pod_is_float(pod))
80
            vals = SPA_POD_BODY(pod);
81
+       else if (spa_pod_is_double(pod)) {
82
+           double *v = SPA_POD_BODY(pod);
83
+           dbl0 = v0;
84
+           if (n_vals > 1)
85
+               dbl1 = v1;
86
+           if (n_vals > 2)
87
+               dbl2 = v2;
88
+           vals = dbl;
89
+       }
90
        else if (spa_pod_is_bool(pod) && n_vals > 0) {
91
            choice = SPA_CHOICE_Range;
92
            vals = bool_range;
93
@@ -1206,6 +1240,7 @@
94
        struct spa_pod_object *obj = (struct spa_pod_object *) param;
95
        union {
96
            float f;
97
+           double d;
98
            bool b;
99
        } value;
100
        float *values;
101
@@ -1225,6 +1260,13 @@
102
                n_values = 1;
103
                values = &value.f;
104
                break;
105
+           case SPA_TYPE_Double:
106
+               if (spa_pod_get_double(&prop->value, &value.d) < 0)
107
+                   continue;
108
+               n_values = 1;
109
+               value.f = value.d;
110
+               values = &value.f;
111
+               break;
112
            case SPA_TYPE_Bool:
113
                if (spa_pod_get_bool(&prop->value, &value.b) < 0)
114
                    continue;
115
@@ -2014,6 +2056,9 @@
116
            case SPA_TYPE_Float:
117
                spa_pod_builder_float(&b, values0);
118
                break;
119
+           case SPA_TYPE_Double:
120
+               spa_pod_builder_double(&b, values0);
121
+               break;
122
            case SPA_TYPE_Bool:
123
                spa_pod_builder_bool(&b, values0 < 0.5 ? false : true);
124
                break;
125
@@ -2070,17 +2115,32 @@
126
    return 0;
127
 }
128
 
129
+struct old_time {
130
+   int64_t now;
131
+   struct spa_fraction rate;
132
+   uint64_t ticks;
133
+   int64_t delay;
134
+   uint64_t queued;
135
+};
136
+
137
 SPA_EXPORT
138
 int pw_stream_get_time(struct pw_stream *stream, struct pw_time *time)
139
 {
140
+   return pw_stream_get_time_n(stream, time, sizeof(struct old_time));
141
+}
142
+
143
+SPA_EXPORT
144
+int pw_stream_get_time_n(struct pw_stream *stream, struct pw_time *time, size_t size)
145
+{
146
    struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
147
    uintptr_t seq1, seq2;
148
-   uint32_t rate_queued;
149
+   uint32_t buffered, quantum, index;
150
 
151
    do {
152
        seq1 = SEQ_READ(impl->seq);
153
-       *time = impl->time;
154
-       rate_queued = impl->rate_queued;
155
+       memcpy(time, &impl->time, SPA_MIN(size, sizeof(struct pw_time)));
156
+       buffered = impl->rate_queued;
157
+       quantum = impl->quantum;
158
        seq2 = SEQ_READ(impl->seq);
159
    } while (!SEQ_READ_SUCCESS(seq1, seq2));
160
 
161
@@ -2089,19 +2149,23 @@
162
    else
163
        time->queued = (int64_t)(impl->queued.incount - time->queued);
164
 
165
-   time->queued += rate_queued;
166
-
167
-   time->delay += ((impl->latency.min_quantum + impl->latency.max_quantum) / 2) * impl->quantum;
168
+   time->delay += ((impl->latency.min_quantum + impl->latency.max_quantum) / 2) * quantum;
169
    time->delay += (impl->latency.min_rate + impl->latency.max_rate) / 2;
170
    time->delay += ((impl->latency.min_ns + impl->latency.max_ns) / 2) * time->rate.denom / SPA_NSEC_PER_SEC;
171
 
172
+   if (size >= offsetof(struct pw_time, queued_buffers))
173
+       time->buffered = buffered;
174
+   if (size >= offsetof(struct pw_time, avail_buffers))
175
+       time->queued_buffers = spa_ringbuffer_get_read_index(&impl->queued.ring, &index);
176
+   if (size >= sizeof(struct pw_time))
177
+       time->avail_buffers = spa_ringbuffer_get_read_index(&impl->dequeued.ring, &index);
178
+
179
    pw_log_trace_fp("%p: %"PRIi64" %"PRIi64" %"PRIu64" %d/%d %"PRIu64" %"
180
            PRIu64" %"PRIu64" %"PRIu64" %"PRIu64, stream,
181
            time->now, time->delay, time->ticks,
182
            time->rate.num, time->rate.denom, time->queued,
183
            impl->dequeued.outcount, impl->dequeued.incount,
184
            impl->queued.outcount, impl->queued.incount);
185
-
186
    return 0;
187
 }
188
 
189
pipewire-0.3.49.tar.gz/src/pipewire/stream.h -> pipewire-0.3.50.tar.gz/src/pipewire/stream.h Changed
143
 
1
@@ -173,11 +173,20 @@
2
    PW_STREAM_STATE_STREAMING = 3       /**< streaming */
3
 };
4
 
5
+/** a buffer structure obtained from pw_stream_dequeue_buffer(). The size of this
6
+  * structure can grow as more field are added in the future */
7
 struct pw_buffer {
8
    struct spa_buffer *buffer;  /**< the spa buffer */
9
    void *user_data;        /**< user data attached to the buffer */
10
    uint64_t size;          /**< This field is set by the user and the sum of
11
-                     *  all queued buffer is returned in the time info */
12
+                     *  all queued buffer is returned in the time info.
13
+                     *  For audio, it is advised to use the number of
14
+                     *  samples in the buffer for this field. */
15
+   uint64_t requested;     /**< For playback streams, this field contains the
16
+                     *  suggested amount of data to provide. For audio
17
+                     *  streams this will be the amount of samples
18
+                     *  required by the resampler. This field is 0
19
+                     *  when no suggestion is provided. Since 0.3.49 */
20
 };
21
 
22
 struct pw_stream_control {
23
@@ -191,7 +200,71 @@
24
    uint32_t max_values;        /**< max values that can be set on this control */
25
 };
26
 
27
-/** A time structure */
28
+/** A time structure.
29
+ *
30
+ * Use pw_stream_get_time_n() to get an updated time snapshot of the stream.
31
+ * The time snapshot can give information about the time in the driver of the
32
+ * graph, the delay to the edge of the graph and the internal queuing in the
33
+ * stream.
34
+ *
35
+ * pw_time.ticks gives a monotonic increasing counter of the time in the graph
36
+ * driver. I can be used to generate a timetime to schedule samples as well
37
+ * as detect discontinuities in the timeline caused by xruns.
38
+ *
39
+ * pw_time.delay is expressed as pw_time.rate, the time domain of the graph. This
40
+ * value, and pw_time.ticks, were captured at pw_time.now and can be extrapolated
41
+ * to the current time like this:
42
+ *
43
+ *    struct timespec ts;
44
+ *    clock_gettime(CLOCK_MONOTONIC, &ts);
45
+ *    int64_t diff = SPA_TIMESPEC_TO_NSEC(&ts) - pw_time.now;
46
+ *    int64_t elapsed = (pw_time.rate.denom * diff) / (pw_time.rate.num * SPA_NSEC_PER_SEC);
47
+ *
48
+ * pw_time.delay contains the total delay that a signal will travel through the
49
+ * graph. This includes the delay caused by filters in the graph as well as delays
50
+ * caused by the hardware. The delay is usually quite stable and should only change when
51
+ * the topology, quantum or samplerate of the graph changes.
52
+ *
53
+ * pw_time.queued and pw_time.buffered is expressed in the time domain of the stream,
54
+ * or the format that is used for the buffers of this stream.
55
+ *
56
+ * pw_time.queued is the sum of all the pw_buffer.size fields of the buffers that are
57
+ * currently queued in the stream but not yet processed. The application can choose
58
+ * the units of this value, for example, time, samples or bytes (below expressed
59
+ * as app.rate).
60
+ *
61
+ * pw_time.buffered is format dependent, for audio/raw it contains the number of samples
62
+ * that are buffered inside the resampler/converter.
63
+ *
64
+ * The total delay of data in a stream is the sum of the queued and buffered data
65
+ * (not yet processed data) and the delay to the edge of the graph, usually a
66
+ * playback or capture device.
67
+ *
68
+ * For an audio playback stream, if you were to queue a buffer, the total delay
69
+ * in milliseconds for the first sample in the newly queued buffer to be played
70
+ * by the hardware can be calculated as:
71
+ *
72
+ *  (pw_time.buffered * 1000 / stream.samplerate) +
73
+ *    (pw_time.queued * 1000 / app.rate) +
74
+ *     ((pw_time.delay - elapsed) * 1000 * pw_time.rate.num / pw_time.rate.denom)
75
+ *
76
+ * The current extrapolated time (in ms) in the source or sink can be calculated as:
77
+ *
78
+ *  (pw_time.ticks + elapsed) * 1000 * pw_time.rate.num / pw_time.rate.denom
79
+ *
80
+ *
81
+ *           stream time domain           graph time domain
82
+ *         /-----------------------\/-----------------------------\
83
+ *
84
+ * queue     +-+ +-+  +-----------+                 +--------+
85
+ * ---->     | | | |->| converter | ->   graph  ->  | kernel | -> speaker
86
+ * <----     +-+ +-+  +-----------+                 +--------+
87
+ * dequeue   buffers                \-------------------/\--------/
88
+ *                                     graph              internal
89
+ *                                    latency             latency
90
+ *         \--------/\-------------/\-----------------------------/
91
+ *           queued      buffered            delay
92
+ */
93
 struct pw_time {
94
    int64_t now;            /**< the monotonic time in nanoseconds. This is the time
95
                      *  when this time report was updated. It is usually
96
@@ -202,21 +275,25 @@
97
    struct spa_fraction rate;   /**< the rate of \a ticks and delay. This is usually
98
                      *  expressed in 1/<samplerate>. */
99
    uint64_t ticks;         /**< the ticks at \a now. This is the current time that
100
-                     *  the remote end is reading/writing. */
101
+                     *  the remote end is reading/writing. This is monotonicaly
102
+                     *  increasing. */
103
    int64_t delay;          /**< delay to device. This is the time it will take for
104
-                     *  the next sample in the stream to be presented by
105
+                     *  the next output sample of the stream to be presented by
106
                      *  the playback device or the time a sample traveled
107
                      *  from the capture device. This delay includes the
108
                      *  delay introduced by all filters on the path between
109
                      *  the stream and the device. The delay is normally
110
                      *  constant in a graph and can change when the topology
111
-                     *  of the graph or the quantum changes. */
112
+                     *  of the graph or the quantum changes. This delay does
113
+                     *  not include the delay caused by queued buffers. */
114
    uint64_t queued;        /**< data queued in the stream, this is the sum
115
                      *  of the size fields in the pw_buffer that are
116
-                     *  currently queued and, for audio streams, the extra
117
-                     *  data queued in the resampler. For audio streams, it
118
-                     *  is thus highly recommended to use the buffer size
119
-                     *  field as the sample count in the buffer. */
120
+                     *  currently queued */
121
+   uint64_t buffered;      /**< for audio/raw streams, this contains the extra
122
+                     *  number of samples buffered in the resampler.
123
+                     *  Since 0.3.50. */
124
+   uint32_t queued_buffers;    /**< The number of buffers that are queued. Since 0.3.50 */
125
+   uint32_t avail_buffers;     /**< The number of buffers that can be dequeued. Since 0.3.50 */
126
 };
127
 
128
 #include <pipewire/port.h>
129
@@ -374,7 +451,12 @@
130
 /** Set control values */
131
 int pw_stream_set_control(struct pw_stream *stream, uint32_t id, uint32_t n_values, float *values, ...);
132
 
133
-/** Query the time on the stream  */
134
+/** Query the time on the stream */
135
+int pw_stream_get_time_n(struct pw_stream *stream, struct pw_time *time, size_t size);
136
+
137
+/** Query the time on the stream, deprecated since 0.3.50,
138
+ * use pw_stream_get_time_n() to get the fields added since 0.3.50. */
139
+SPA_DEPRECATED
140
 int pw_stream_get_time(struct pw_stream *stream, struct pw_time *time);
141
 
142
 /** Get a buffer that can be filled for playback streams or consumed
143
pipewire-0.3.49.tar.gz/src/pipewire/thread-loop.c -> pipewire-0.3.50.tar.gz/src/pipewire/thread-loop.c Changed
8
 
1
@@ -465,5 +465,5 @@
2
 SPA_EXPORT
3
 bool pw_thread_loop_in_thread(struct pw_thread_loop *loop)
4
 {
5
-   return pthread_self() == loop->thread;
6
+   return loop->running && pthread_self() == loop->thread;
7
 }
8
pipewire-0.3.49.tar.gz/src/pipewire/thread.c -> pipewire-0.3.50.tar.gz/src/pipewire/thread.c Changed
12
 
1
@@ -83,9 +83,7 @@
2
 SPA_EXPORT
3
 void pw_thread_utils_set(struct spa_thread_utils *impl)
4
 {
5
-   if (impl == NULL)
6
-       impl = &default_impl.utils;
7
-   global_impl = impl;
8
+   pw_log_warn("pw_thread_utils_set is deprecated and does nothing anymore");
9
 }
10
 
11
 SPA_EXPORT
12
pipewire-0.3.49.tar.gz/src/pipewire/thread.h -> pipewire-0.3.50.tar.gz/src/pipewire/thread.h Changed
9
 
1
@@ -44,6 +44,7 @@
2
  * \{
3
  */
4
 
5
+SPA_DEPRECATED
6
 void pw_thread_utils_set(struct spa_thread_utils *impl);
7
 struct spa_thread_utils *pw_thread_utils_get(void);
8
 
9
pipewire-0.3.49.tar.gz/src/tests/test-endpoint.c -> pipewire-0.3.50.tar.gz/src/tests/test-endpoint.c Changed
18
 
1
@@ -101,14 +101,14 @@
2
            param = spa_pod_builder_add_object(&b,
3
                SPA_TYPE_OBJECT_PropInfo, id,
4
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_volume),
5
-               SPA_PROP_INFO_name, SPA_POD_String("volume"),
6
+               SPA_PROP_INFO_description, SPA_POD_String("volume"),
7
                SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->volume, 0.0, 1.0));
8
            break;
9
        case 1:
10
            param = spa_pod_builder_add_object(&b,
11
                SPA_TYPE_OBJECT_PropInfo, id,
12
                SPA_PROP_INFO_id,   SPA_POD_Id(SPA_PROP_mute),
13
-               SPA_PROP_INFO_name, SPA_POD_String("mute"),
14
+               SPA_PROP_INFO_description, SPA_POD_String("mute"),
15
                SPA_PROP_INFO_type, SPA_POD_CHOICE_Bool(p->mute));
16
            break;
17
        default:
18
pipewire-0.3.49.tar.gz/src/tests/test-stream.c -> pipewire-0.3.50.tar.gz/src/tests/test-stream.c Changed
28
 
1
@@ -67,8 +67,8 @@
2
    TEST_FUNC(ev, test, trigger_done);
3
 
4
 #if defined(__x86_64__) && defined(__LP64__)
5
-   spa_assert_se(sizeof(struct pw_buffer) == 24);
6
-   spa_assert_se(sizeof(struct pw_time) == 40);
7
+   spa_assert_se(sizeof(struct pw_buffer) == 32);
8
+   spa_assert_se(sizeof(struct pw_time) == 56);
9
 #else
10
    fprintf(stderr, "%zd\n", sizeof(struct pw_buffer));
11
    fprintf(stderr, "%zd\n", sizeof(struct pw_time));
12
@@ -171,13 +171,14 @@
13
    /* check id, only when connected */
14
    spa_assert_se(pw_stream_get_node_id(stream) == SPA_ID_INVALID);
15
 
16
-   spa_assert_se(pw_stream_get_time(stream, &tm) == 0);
17
+   spa_assert_se(pw_stream_get_time_n(stream, &tm, sizeof(tm)) == 0);
18
    spa_assert_se(tm.now == 0);
19
    spa_assert_se(tm.rate.num == 0);
20
    spa_assert_se(tm.rate.denom == 0);
21
    spa_assert_se(tm.ticks == 0);
22
    spa_assert_se(tm.delay == 0);
23
    spa_assert_se(tm.queued == 0);
24
+   spa_assert_se(tm.buffered == 0);
25
 
26
    spa_assert_se(pw_stream_dequeue_buffer(stream) == NULL);
27
 
28
pipewire-0.3.49.tar.gz/src/tools/pw-cat.c -> pipewire-0.3.50.tar.gz/src/tools/pw-cat.c Changed
201
 
1
@@ -120,6 +120,8 @@
2
    struct pw_stream *stream;
3
    struct spa_hook stream_listener;
4
 
5
+   struct spa_source *timer;
6
+
7
    enum mode mode;
8
    bool verbose;
9
 #define TYPE_PCM   0
10
@@ -162,7 +164,6 @@
11
    int sync;
12
 
13
    struct spa_io_position *position;
14
-   struct spa_io_rate_match *rate_match;
15
    bool drained;
16
    uint64_t clock_time;
17
 
18
@@ -657,9 +658,6 @@
19
 {
20
    struct data *data = userdata;
21
 
22
-   if (data->verbose)
23
-       printf("core done\n");
24
-
25
    /* if we're listing targets just exist */
26
    if (data->sync == seq && data->list_targets) {
27
        data->targets_listed = true;
28
@@ -845,29 +843,41 @@
29
                pw_stream_state_as_string(old),
30
                pw_stream_state_as_string(state));
31
 
32
-   if (state == PW_STREAM_STATE_STREAMING && !data->volume_is_set) {
33
-
34
-       ret = pw_stream_set_control(data->stream,
35
-               SPA_PROP_volume, 1, &data->volume,
36
-               0);
37
-       if (data->verbose)
38
-           printf("set stream volume to %.3f - %s\n", data->volume,
39
-                   ret == 0 ? "success" : "FAILED");
40
-
41
-       data->volume_is_set = true;
42
-
43
-   }
44
-
45
-   if (state == PW_STREAM_STATE_STREAMING) {
46
-       if (data->verbose)
47
+   switch (state) {
48
+   case PW_STREAM_STATE_STREAMING:
49
+       if (!data->volume_is_set) {
50
+           ret = pw_stream_set_control(data->stream,
51
+                   SPA_PROP_volume, 1, &data->volume,
52
+                   0);
53
+           if (data->verbose)
54
+               printf("stream set volume to %.3f - %s\n", data->volume,
55
+                       ret == 0 ? "success" : "FAILED");
56
+
57
+           data->volume_is_set = true;
58
+       }
59
+       if (data->verbose) {
60
+           struct timespec timeout = {0, 1}, interval = {1, 0};
61
+           struct pw_loop *l = pw_main_loop_get_loop(data->loop);
62
+           pw_loop_update_timer(l, data->timer, &timeout, &interval, false);
63
            printf("stream node %"PRIu32"\n",
64
                pw_stream_get_node_id(data->stream));
65
-   }
66
-   if (state == PW_STREAM_STATE_ERROR) {
67
+       }
68
+       break;
69
+   case PW_STREAM_STATE_PAUSED:
70
+       if (data->verbose) {
71
+           struct timespec timeout = {0, 0}, interval = {0, 0};
72
+           struct pw_loop *l = pw_main_loop_get_loop(data->loop);
73
+           pw_loop_update_timer(l, data->timer, &timeout, &interval, false);
74
+       }
75
+       break;
76
+   case PW_STREAM_STATE_ERROR:
77
        printf("stream node %"PRIu32" error: %s\n",
78
                pw_stream_get_node_id(data->stream),
79
                error);
80
        pw_main_loop_quit(data->loop);
81
+       break;
82
+   default:
83
+       break;
84
    }
85
 }
86
 
87
@@ -880,10 +890,6 @@
88
    case SPA_IO_Position:
89
        d->position = data;
90
        break;
91
-   case SPA_IO_RateMatch:
92
-       if (d->data_type == TYPE_PCM)
93
-           d->rate_match = data;
94
-       break;
95
    default:
96
        break;
97
    }
98
@@ -897,7 +903,8 @@
99
    int err;
100
 
101
    if (data->verbose)
102
-       printf("stream param change: id=%"PRIu32"\n", id);
103
+       printf("stream param change: %s\n",
104
+           spa_debug_type_find_name(spa_type_param, id));
105
 
106
    if (id != SPA_PARAM_Format || param == NULL)
107
        return;
108
@@ -919,7 +926,7 @@
109
    data->stride = data->dsf.layout.channels * SPA_ABS(data->dsf.layout.interleave);
110
 
111
    if (data->verbose) {
112
-       printf("DSD out: channels:%d bitorder:%s interleave:%d\n",
113
+       printf("DSD: channels:%d bitorder:%s interleave:%d\n",
114
                data->dsf.layout.channels,
115
                data->dsf.layout.lsb ? "lsb" : "msb",
116
                data->dsf.layout.interleave);
117
@@ -951,8 +958,7 @@
118
    if (data->mode == mode_playback) {
119
 
120
        n_frames = d->maxsize / data->stride;
121
-       if (data->rate_match && data->rate_match->size > 0)
122
-           n_frames = SPA_MIN((uint32_t)n_frames, data->rate_match->size);
123
+       n_frames = SPA_MIN(n_frames, (int)b->requested);
124
 
125
        n_fill_frames = data->fill(data, p, n_frames);
126
 
127
@@ -961,8 +967,10 @@
128
            d->chunk->stride = data->stride;
129
            d->chunk->size = n_fill_frames * data->stride;
130
            have_data = true;
131
-       } else if (n_fill_frames < 0)
132
+           b->size = n_frames;
133
+       } else if (n_fill_frames < 0) {
134
            fprintf(stderr, "fill error %d\n", n_fill_frames);
135
+       }
136
    } else {
137
        offset = SPA_MIN(d->chunk->offset, d->maxsize);
138
        size = SPA_MIN(d->chunk->size, d->maxsize - offset);
139
@@ -1015,11 +1023,14 @@
140
 {
141
    struct data *data = userdata;
142
    struct pw_time time;
143
-   pw_stream_get_time(data->stream, &time);
144
-   printf("now=%"PRIi64" rate=%u/%u ticks=%"PRIu64" delay=%"PRIi64" queued=%"PRIu64"\n",
145
+   pw_stream_get_time_n(data->stream, &time, sizeof(time));
146
+   printf("stream time: now:%"PRIi64" rate:%u/%u ticks:%"PRIu64
147
+           " delay:%"PRIi64" queued:%"PRIu64
148
+           " buffered:%"PRIi64" buffers:%u avail:%u\n",
149
        time.now,
150
        time.rate.num, time.rate.denom,
151
-       time.ticks, time.delay, time.queued);
152
+       time.ticks, time.delay, time.queued, time.buffered,
153
+       time.queued_buffers, time.avail_buffers);
154
 }
155
 
156
 enum {
157
@@ -1222,12 +1233,12 @@
158
            data->mode == mode_playback ? "r" : "w",
159
            &data->midi.info);
160
    if (data->midi.file == NULL) {
161
-       fprintf(stderr, "error: can't read midi file '%s': %m\n", data->filename);
162
+       fprintf(stderr, "midifile: can't read midi file '%s': %m\n", data->filename);
163
        return -errno;
164
    }
165
 
166
    if (data->verbose)
167
-       printf("opened file \"%s\" format %08x ntracks:%d div:%d\n",
168
+       printf("midifile: opened file \"%s\" format %08x ntracks:%d div:%d\n",
169
                data->filename,
170
                data->midi.info.format, data->midi.info.ntracks,
171
                data->midi.info.division);
172
@@ -1264,12 +1275,12 @@
173
 
174
    data->dsf.file = dsf_file_open(data->filename, "r", &data->dsf.info);
175
    if (data->dsf.file == NULL) {
176
-       fprintf(stderr, "error: can't read dsf file '%s': %m\n", data->filename);
177
+       fprintf(stderr, "dsffile: can't read dsf file '%s': %m\n", data->filename);
178
        return -errno;
179
    }
180
 
181
    if (data->verbose)
182
-       printf("opened file \"%s\" channels:%d rate:%d samples:%"PRIu64" bitorder:%s\n",
183
+       printf("dsffile: opened file \"%s\" channels:%d rate:%d samples:%"PRIu64" bitorder:%s\n",
184
                data->filename,
185
                data->dsf.info.channels, data->dsf.info.rate,
186
                data->dsf.info.samples,
187
@@ -1366,16 +1377,16 @@
188
            data->mode == mode_playback ? SFM_READ : SFM_WRITE,
189
            &info);
190
    if (!data->file) {
191
-       fprintf(stderr, "error: failed to open audio file \"%s\": %s\n",
192
+       fprintf(stderr, "sndfile: failed to open audio file \"%s\": %s\n",
193
                data->filename, sf_strerror(NULL));
194
        return -EIO;
195
    }
196
 
197
    if (data->verbose)
198
-       printf("opened file \"%s\" format %08x channels:%d rate:%d\n",
199
+       printf("sndfile: opened file \"%s\" format %08x channels:%d rate:%d\n",
200
                data->filename, info.format, info.channels, info.samplerate);
201
pipewire-0.3.49.tar.gz/src/tools/pw-reserve.c -> pipewire-0.3.50.tar.gz/src/tools/pw-reserve.c Changed
76
 
1
@@ -30,6 +30,7 @@
2
 
3
 #include <dbus/dbus.h>
4
 
5
+#include <spa/utils/result.h>
6
 #include <spa/support/dbus.h>
7
 
8
 #include "pipewire/pipewire.h"
9
@@ -95,7 +96,8 @@
10
              "  -n, --name                            Name to reserve (Audio0, Midi0, Video0, ..)\n"
11
              "  -a, --appname                         Application Name (default %s)\n"
12
              "  -p, --priority                        Priority (default %d)\n"
13
-             "  -m, --monitor                         Monitor only, don't try to acquire\n",
14
+             "  -m, --monitor                         Monitor only, don't try to acquire\n"
15
+             "  -r, --release                         Request release when busy\n",
16
         name, DEFAULT_APPNAME, DEFAULT_PRIORITY);
17
 }
18
 
19
@@ -107,6 +109,7 @@
20
    const char *opt_name = NULL;
21
    const char *opt_appname = DEFAULT_APPNAME;
22
    bool opt_monitor = false;
23
+   bool opt_release = false;
24
    int opt_priority= DEFAULT_PRIORITY;
25
 
26
    int res = 0, c;
27
@@ -117,6 +120,7 @@
28
        { "app",    required_argument,  NULL, 'a' },
29
        { "priority",   required_argument,  NULL, 'p' },
30
        { "monitor",    no_argument,        NULL, 'm' },
31
+       { "release",    no_argument,        NULL, 'r' },
32
        { NULL, 0, NULL, 0}
33
    };
34
 
35
@@ -125,7 +129,7 @@
36
    setlocale(LC_ALL, "");
37
    pw_init(&argc, &argv);
38
 
39
-   while ((c = getopt_long(argc, argv, "hVn:a:p:m", long_options, NULL)) != -1) {
40
+   while ((c = getopt_long(argc, argv, "hVn:a:p:mr", long_options, NULL)) != -1) {
41
        switch (c) {
42
        case 'h':
43
            show_help(argv0, false);
44
@@ -150,6 +154,9 @@
45
        case 'm':
46
            opt_monitor = true;
47
            break;
48
+       case 'r':
49
+           opt_release = true;
50
+           break;
51
        default:
52
            show_help(argv0, true);
53
            return -1;
54
@@ -204,8 +211,19 @@
55
            opt_priority,
56
            &reserve_callbacks, &impl);
57
 
58
-   if (!opt_monitor)
59
-       rd_device_acquire(impl.device);
60
+   if (!opt_monitor) {
61
+       res = rd_device_acquire(impl.device);
62
+       if (res == -EBUSY) {
63
+           printf("device %s is busy, use -r to attempt to release\n", opt_name);
64
+           if (opt_release) {
65
+               printf("doing RequestRelease on %s\n", opt_name);
66
+               res = rd_device_request_release(impl.device);
67
+           }
68
+       } else {
69
+           printf("Device %s can not be acquired: %s\n", opt_name,
70
+                   spa_strerror(res));
71
+       }
72
+   }
73
 
74
    pw_main_loop_run(impl.mainloop);
75
 
76
pipewire-0.3.49.tar.gz/test/test-spa-pod.c -> pipewire-0.3.50.tar.gz/test/test-spa-pod.c Changed
10
 
1
@@ -1610,7 +1610,7 @@
2
    spa_pod_builder_add(&b,
3
            SPA_PROP_INFO_id,    SPA_POD_Id(32567359),
4
            SPA_PROP_INFO_type,  SPA_POD_CHOICE_ENUM_Int(1, 0),
5
-           SPA_PROP_INFO_name,  SPA_POD_String("DV Timings"),
6
+           SPA_PROP_INFO_description,  SPA_POD_String("DV Timings"),
7
            0);
8
 
9
    spa_pod_builder_get_state(&b, &state),
10