summaryrefslogtreecommitdiffstats
path: root/meta-pipewire/recipes-multimedia/pipewire/pipewire/0010-Revert-spa-improve-the-AEC-interface.patch
blob: 8bf945479a604737a9ccf7e3b521fcdacc0cbb4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
From 3ac842085c60a0c745bd3f8f0d8419e98220675b Mon Sep 17 00:00:00 2001
From: Ashok Sidipotu <ashok.sidipotu@collabora.com>
Date: Thu, 24 Feb 2022 18:02:29 +0530
Subject: [PATCH 10/12] Revert "spa: improve the AEC interface"

This reverts commit c5c9ecdd87225ecd4978e9f6176a8a6d1fdd4252.
Upstream-Status: Inappropriate[meson version dependent]

This patch had to be reverted as it is dependent on
9386c70b3a2cc2df6aabfd7b6a6bc1d7ec873bd1 which needs
higher meson version.

---
 spa/include/spa/interfaces/audio/aec.h       | 71 +++-----------------
 spa/plugins/aec/aec-null.c                   | 62 +++++++++--------
 spa/plugins/aec/aec-webrtc.cpp               | 56 ++++++++-------
 src/modules/module-echo-cancel.c             | 39 +++++------
 src/modules/module-echo-cancel/echo-cancel.h | 34 ++++++++++
 5 files changed, 130 insertions(+), 132 deletions(-)
 create mode 100644 src/modules/module-echo-cancel/echo-cancel.h

diff --git a/spa/include/spa/interfaces/audio/aec.h b/spa/include/spa/interfaces/audio/aec.h
index 17e4e4e46..e1fcda563 100644
--- a/spa/include/spa/interfaces/audio/aec.h
+++ b/spa/include/spa/interfaces/audio/aec.h
@@ -25,71 +25,20 @@
 
 #include <spa/utils/dict.h>
 #include <spa/utils/hook.h>
+#include <spa/pod/pod.h>
 #include <spa/param/audio/raw.h>
+#include <spa/support/plugin.h>
 
-#ifndef SPA_AUDIO_AEC_H
-#define SPA_AUDIO_AEC_H
+#define SPA_TYPE_INTERFACE_AEC SPA_TYPE_INFO_INTERFACE_BASE "AEC"
+#define SPA_VERSION_AUDIO_AEC   1
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SPA_TYPE_INTERFACE_AUDIO_AEC SPA_TYPE_INFO_INTERFACE_BASE "Audio:AEC"
-
-#define SPA_VERSION_AUDIO_AEC   0
-struct spa_audio_aec {
+struct echo_cancel_info {
 	struct spa_interface iface;
 	const char *name;
-	const struct spa_dict *info;
+	const struct spa_dict info;
 	const char *latency;
+	int (*create) (struct spa_handle *handle, const struct spa_dict *args, const struct spa_audio_info_raw *info);
+	int (*run) (struct spa_handle *handle, const float *rec[], const float *play[], float *out[], uint32_t n_samples);
+	struct spa_dict *(*get_properties) (struct spa_handle *handle);
+	int (*set_properties) (struct spa_handle *handle, const struct spa_dict *args);
 };
-
-struct spa_audio_aec_info {
-#define SPA_AUDIO_AEC_CHANGE_MASK_PROPS	(1u<<0)
-        uint64_t change_mask;
-
-	const struct spa_dict *props;
-};
-
-struct spa_audio_aec_events {
-#define SPA_VERSION_AUDIO_AEC_EVENTS	0
-        uint32_t version;       /**< version of this structure */
-
-	/** Emitted when info changes */
-	void (*info) (void *data, const struct spa_audio_aec_info *info);
-};
-
-struct spa_audio_aec_methods {
-#define SPA_VERSION_AUDIO_AEC_METHODS	0
-        uint32_t version;
-
-	int (*add_listener) (void *object,
-			struct spa_hook *listener,
-			const struct spa_audio_aec_events *events,
-			void *data);
-
-	int (*init) (void *data, const struct spa_dict *args, const struct spa_audio_info_raw *info);
-	int (*run) (void *data, const float *rec[], const float *play[], float *out[], uint32_t n_samples);
-	int (*set_props) (void *data, const struct spa_dict *args);
-};
-
-#define spa_audio_aec_method(o,method,version,...)			\
-({									\
-	int _res = -ENOTSUP;						\
-	struct spa_audio_aec *_o = o;					\
-	spa_interface_call_res(&_o->iface,				\
-			struct spa_audio_aec_methods, _res,		\
-			method, version, ##__VA_ARGS__);		\
-	_res;								\
-})
-
-#define spa_audio_aec_add_listener(o,...)	spa_audio_aec_method(o, add_listener, 0, __VA_ARGS__)
-#define spa_audio_aec_init(o,...)		spa_audio_aec_method(o, init, 0, __VA_ARGS__)
-#define spa_audio_aec_run(o,...)		spa_audio_aec_method(o, run, 0, __VA_ARGS__)
-#define spa_audio_aec_set_props(o,...)		spa_audio_aec_method(o, set_props, 0, __VA_ARGS__)
-
-#ifdef __cplusplus
-}  /* extern "C" */
-#endif
-
-#endif /* SPA_AUDIO_AEC_H */
diff --git a/spa/plugins/aec/aec-null.c b/spa/plugins/aec/aec-null.c
index 2909eb213..3168a6b36 100644
--- a/spa/plugins/aec/aec-null.c
+++ b/spa/plugins/aec/aec-null.c
@@ -30,11 +30,7 @@
 
 struct impl {
 	struct spa_handle handle;
-	struct spa_audio_aec aec;
 	struct spa_log *log;
-
-	struct spa_hook_list hooks_list;
-
 	uint32_t channels;
 };
 
@@ -42,38 +38,54 @@ static struct spa_log_topic log_topic = SPA_LOG_TOPIC(0, "spa.aec.null");
 #undef SPA_LOG_TOPIC_DEFAULT
 #define SPA_LOG_TOPIC_DEFAULT &log_topic
 
-static int null_init(void *data, const struct spa_dict *args, const struct spa_audio_info_raw *info)
+static int null_create(struct spa_handle *handle, const struct spa_dict *args, const struct spa_audio_info_raw *info)
 {
-	struct impl *impl = data;
+	struct impl *impl;
+	impl = (struct impl *) handle;
 	impl->channels = info->channels;
+
 	return 0;
 }
 
-static int null_run(void *data, const float *rec[], const float *play[], float *out[], uint32_t n_samples)
+static int null_run(struct spa_handle *handle, const float *rec[], const float *play[], float *out[], uint32_t n_samples)
 {
-	struct impl *impl = data;
+	struct impl *impl = (struct impl *) handle;
 	uint32_t i;
 	for (i = 0; i < impl->channels; i++)
 		memcpy(out[i], rec[i], n_samples * sizeof(float));
 	return 0;
 }
 
-static struct spa_audio_aec_methods impl_aec = {
-	.init = null_init,
+struct spa_dict *null_get_properties(SPA_UNUSED struct spa_handle *handle)
+{
+	/* Not supported */
+	return NULL;
+}
+
+int null_set_properties(SPA_UNUSED struct spa_handle *handle, SPA_UNUSED const struct spa_dict *args)
+{
+	/* Not supported */
+	return -1;
+}
+
+static struct echo_cancel_info echo_cancel_null_impl = {
+	.name = "null",
+	.info = SPA_DICT_INIT(NULL, 0),
+	.latency = NULL,
+	.create = null_create,
 	.run = null_run,
+	.get_properties = null_get_properties,
+	.set_properties = null_set_properties,
 };
 
 static int impl_get_interface(struct spa_handle *handle, const char *type, void **interface)
 {
-	struct impl *impl;
 
 	spa_return_val_if_fail(handle != NULL, -EINVAL);
 	spa_return_val_if_fail(interface != NULL, -EINVAL);
 
-	impl = (struct impl *) handle;
-
-	if (spa_streq(type, SPA_TYPE_INTERFACE_AUDIO_AEC))
-		*interface = &impl->aec;
+	if (spa_streq(type, SPA_TYPE_INTERFACE_AEC))
+		*interface = &echo_cancel_null_impl;
 	else
 		return -ENOENT;
 
@@ -106,29 +118,23 @@ impl_init(const struct spa_handle_factory *factory,
 	spa_return_val_if_fail(factory != NULL, -EINVAL);
 	spa_return_val_if_fail(handle != NULL, -EINVAL);
 
+	echo_cancel_null_impl.iface = SPA_INTERFACE_INIT(
+		SPA_TYPE_INTERFACE_AEC,
+		SPA_VERSION_AUDIO_AEC,
+		NULL,
+		NULL);
+
 	handle->get_interface = impl_get_interface;
 	handle->clear = impl_clear;
-
 	impl = (struct impl *) handle;
-
-	impl->aec.iface = SPA_INTERFACE_INIT(
-		SPA_TYPE_INTERFACE_AUDIO_AEC,
-		SPA_VERSION_AUDIO_AEC,
-		&impl_aec, impl);
-	impl->aec.name = "null";
-	impl->aec.info = NULL;
-	impl->aec.latency = NULL;
-
 	impl->log = (struct spa_log*)spa_support_find(support, n_support, SPA_TYPE_INTERFACE_Log);
 	spa_log_topic_init(impl->log, &log_topic);
 
-	spa_hook_list_init(&impl->hooks_list);
-
 	return 0;
 }
 
 static const struct spa_interface_info impl_interfaces[] = {
-	{SPA_TYPE_INTERFACE_AUDIO_AEC,},
+	{SPA_TYPE_INTERFACE_AEC,},
 };
 
 static int
diff --git a/spa/plugins/aec/aec-webrtc.cpp b/spa/plugins/aec/aec-webrtc.cpp
index f519189c7..d44fa6e30 100644
--- a/spa/plugins/aec/aec-webrtc.cpp
+++ b/spa/plugins/aec/aec-webrtc.cpp
@@ -38,8 +38,6 @@
 
 struct impl_data {
 	struct spa_handle handle;
-	struct spa_audio_aec aec;
-
 	struct spa_log *log;
 	std::unique_ptr<webrtc::AudioProcessing> apm;
 	spa_audio_info_raw info;
@@ -60,9 +58,9 @@ static bool webrtc_get_spa_bool(const struct spa_dict *args, const char *key, bo
 	return value;
 }
 
-static int webrtc_init(void *data, const struct spa_dict *args, const struct spa_audio_info_raw *info)
+static int webrtc_create(struct spa_handle *handle, const struct spa_dict *args, const struct spa_audio_info_raw *info)
 {
-	auto impl = reinterpret_cast<struct impl_data*>(data);
+	auto impl = reinterpret_cast<struct impl_data*>(handle);
 
 	bool extended_filter = webrtc_get_spa_bool(args, "webrtc.extended_filter", true);
 	bool delay_agnostic = webrtc_get_spa_bool(args, "webrtc.delay_agnostic", true);
@@ -122,9 +120,9 @@ static int webrtc_init(void *data, const struct spa_dict *args, const struct spa
 	return 0;
 }
 
-static int webrtc_run(void *data, const float *rec[], const float *play[], float *out[], uint32_t n_samples)
+static int webrtc_run(struct spa_handle *handle, const float *rec[], const float *play[], float *out[], uint32_t n_samples)
 {
-	auto impl = reinterpret_cast<struct impl_data*>(data);
+	auto impl = reinterpret_cast<struct impl_data*>(handle);
 	webrtc::StreamConfig config =
 		webrtc::StreamConfig(impl->info.rate, impl->info.channels, false);
 	unsigned int num_blocks = n_samples * 1000 / impl->info.rate / 10;
@@ -160,22 +158,36 @@ static int webrtc_run(void *data, const float *rec[], const float *play[], float
 	return 0;
 }
 
-static struct spa_audio_aec_methods impl_aec = {
-	SPA_VERSION_AUDIO_AEC_METHODS,
-	.add_listener = NULL,
-	.init = webrtc_init,
+struct spa_dict *webrtc_get_properties(SPA_UNUSED struct spa_handle *handle)
+{
+	/* Not supported */
+	return NULL;
+}
+
+int webrtc_set_properties(SPA_UNUSED struct spa_handle *handle, SPA_UNUSED const struct spa_dict *args)
+{
+	/* Not supported */
+	return -1;
+}
+
+static struct echo_cancel_info echo_cancel_webrtc_impl = {
+	.name = "webrtc",
+	.info = SPA_DICT_INIT(NULL, 0),
+	.latency = "480/48000",
+	.create = webrtc_create,
 	.run = webrtc_run,
+	.get_properties = webrtc_get_properties,
+	.set_properties = webrtc_set_properties,
 };
 
 static int impl_get_interface(struct spa_handle *handle, const char *type, void **interface)
 {
-	auto impl = reinterpret_cast<struct impl_data*>(handle);
 
 	spa_return_val_if_fail(handle != NULL, -EINVAL);
 	spa_return_val_if_fail(interface != NULL, -EINVAL);
 
-	if (spa_streq(type, SPA_TYPE_INTERFACE_AUDIO_AEC))
-		*interface = &impl->aec;
+	if (spa_streq(type, SPA_TYPE_INTERFACE_AEC))
+		*interface = &echo_cancel_webrtc_impl;
 	else
 		return -ENOENT;
 
@@ -207,19 +219,15 @@ impl_init(const struct spa_handle_factory *factory,
 	spa_return_val_if_fail(factory != NULL, -EINVAL);
 	spa_return_val_if_fail(handle != NULL, -EINVAL);
 
-	auto impl = new (handle) impl_data();
+	echo_cancel_webrtc_impl.iface = SPA_INTERFACE_INIT(
+		SPA_TYPE_INTERFACE_AEC,
+		SPA_VERSION_AUDIO_AEC,
+		NULL,
+		NULL);
 
+	auto impl = new (handle) impl_data();
 	impl->handle.get_interface = impl_get_interface;
 	impl->handle.clear = impl_clear;
-
-	impl->aec.iface = SPA_INTERFACE_INIT(
-		SPA_TYPE_INTERFACE_AUDIO_AEC,
-		SPA_VERSION_AUDIO_AEC,
-		&impl_aec, impl);
-	impl->aec.name = "webrtc",
-	impl->aec.info = NULL;
-	impl->aec.latency = "480/48000",
-
 	impl->log = (struct spa_log*)spa_support_find(support, n_support, SPA_TYPE_INTERFACE_Log);
 	spa_log_topic_init(impl->log, &log_topic);
 
@@ -227,7 +235,7 @@ impl_init(const struct spa_handle_factory *factory,
 }
 
 static const struct spa_interface_info impl_interfaces[] = {
-	{SPA_TYPE_INTERFACE_AUDIO_AEC,},
+	{SPA_TYPE_INTERFACE_AEC,},
 };
 
 static int
diff --git a/src/modules/module-echo-cancel.c b/src/modules/module-echo-cancel.c
index c933a9376..728325938 100644
--- a/src/modules/module-echo-cancel.c
+++ b/src/modules/module-echo-cancel.c
@@ -24,6 +24,7 @@
  */
 
 #include "config.h"
+#include "module-echo-cancel/echo-cancel.h"
 
 #include <errno.h>
 #include <fcntl.h>
@@ -187,7 +188,7 @@ struct impl {
 	uint32_t out_ringsize;
 	struct spa_ringbuffer out_ring;
 
-	struct spa_audio_aec *aec;
+	const struct echo_cancel_info *aec_info;
 	uint32_t aec_blocksize;
 
 	unsigned int capture_ready:1;
@@ -287,7 +288,7 @@ static void process(struct impl *impl)
 	pw_stream_queue_buffer(impl->playback, pout);
 
 	/* Now run the canceller */
-	spa_audio_aec_run(impl->aec, rec, play_delayed, out, size / sizeof(float));
+	echo_cancel_run(impl->aec_info, impl->spa_handle, rec,	play_delayed, out, size / sizeof(float));
 
 	/* Next, copy over the output to the output ringbuffer */
 	avail = spa_ringbuffer_get_write_index(&impl->out_ring, &oindex);
@@ -651,8 +652,8 @@ static int setup_streams(struct impl *impl)
 		pw_properties_set(props, PW_KEY_NODE_LINK_GROUP, str);
 	if ((str = pw_properties_get(impl->source_props, PW_KEY_NODE_LATENCY)) != NULL)
 		pw_properties_set(props, PW_KEY_NODE_LATENCY, str);
-	else if (impl->aec->latency)
-		pw_properties_set(props, PW_KEY_NODE_LATENCY, impl->aec->latency);
+	else if (impl->aec_info->latency)
+		pw_properties_set(props, PW_KEY_NODE_LATENCY, impl->aec_info->latency);
 
 	impl->capture = pw_stream_new(impl->core,
 			"Echo-Cancel Capture", props);
@@ -684,8 +685,8 @@ static int setup_streams(struct impl *impl)
 		pw_properties_set(props, PW_KEY_NODE_LINK_GROUP, str);
 	if ((str = pw_properties_get(impl->sink_props, PW_KEY_NODE_LATENCY)) != NULL)
 		pw_properties_set(props, PW_KEY_NODE_LATENCY, str);
-	else if (impl->aec->latency)
-		pw_properties_set(props, PW_KEY_NODE_LATENCY, impl->aec->latency);
+	else if (impl->aec_info->latency)
+		pw_properties_set(props, PW_KEY_NODE_LATENCY, impl->aec_info->latency);
 
 	impl->playback = pw_stream_new(impl->core,
 			"Echo-Cancel Playback", props);
@@ -998,42 +999,42 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
 		return -ENOENT;
 	}
 
-	if ((res = spa_handle_get_interface(handle, SPA_TYPE_INTERFACE_AUDIO_AEC, &iface)) < 0) {
-		pw_log_error("can't get %s interface %d", SPA_TYPE_INTERFACE_AUDIO_AEC, res);
+	if ((res = spa_handle_get_interface(handle, SPA_TYPE_INTERFACE_AEC, &iface)) < 0) {
+		pw_log_error("can't get %s interface %d", SPA_TYPE_INTERFACE_AEC, res);
 		return res;
 	}
-	impl->aec = iface;
+	impl->aec_info = iface;
 	impl->spa_handle = handle;
-	if (impl->aec->iface.version != SPA_VERSION_AUDIO_AEC) {
+	if (impl->aec_info->iface.version != SPA_VERSION_AUDIO_AEC) {
 		pw_log_error("codec plugin %s has incompatible ABI version (%d != %d)",
-			SPA_NAME_AEC, impl->aec->iface.version, SPA_VERSION_AUDIO_AEC);
+			SPA_NAME_AEC, impl->aec_info->iface.version, SPA_VERSION_AUDIO_AEC);
 		res = -ENOENT;
 		goto error;
 	}
 
-	(void)SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_AUDIO_AEC, (struct spa_audio_aec *)impl->aec);
+	(void)SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_AEC, (struct echo_cancel_info *)impl->aec_info);
 
-	pw_log_info("Using plugin AEC %s", impl->aec->name);
+	pw_log_info("Using plugin AEC %s", impl->aec_info->name);
 
 	if ((str = pw_properties_get(props, "aec.args")) != NULL)
 		aec_props = pw_properties_new_string(str);
 	else
 		aec_props = pw_properties_new(NULL, NULL);
 
-	if (spa_audio_aec_init(impl->aec, &aec_props->dict, &impl->info)) {
-		pw_log_error("codec plugin %s create failed", impl->aec->name);
+	if (echo_cancel_create(impl->aec_info, impl->spa_handle, &aec_props->dict, &impl->info)) {
+		pw_log_error("codec plugin %s create failed", impl->aec_info->name);
 		res = -ENOENT;
 		goto error;
 	}
 
 	pw_properties_free(aec_props);
 
-	if (impl->aec->latency) {
+	if (impl->aec_info->latency) {
 		unsigned int num, denom, req_num, req_denom;
 		unsigned int factor = 0;
 		unsigned int new_num = 0;
 
-		spa_assert_se(sscanf(impl->aec->latency, "%u/%u", &num, &denom) == 2);
+		spa_assert_se(sscanf(impl->aec_info->latency, "%u/%u", &num, &denom) == 2);
 
 		if ((str = pw_properties_get(props, PW_KEY_NODE_LATENCY)) != NULL) {
 			sscanf(str, "%u/%u", &req_num, &req_denom);
@@ -1042,8 +1043,8 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
 		}
 
 		if (factor == 0 || new_num == 0) {
-			pw_log_info("Setting node latency to %s", impl->aec->latency);
-			pw_properties_set(props, PW_KEY_NODE_LATENCY, impl->aec->latency);
+			pw_log_info("Setting node latency to %s", impl->aec_info->latency);
+			pw_properties_set(props, PW_KEY_NODE_LATENCY, impl->aec_info->latency);
 			impl->aec_blocksize = sizeof(float) * impl->info.rate * num / denom;
 		} else {
 			pw_log_info("Setting node latency to %u/%u", new_num, req_denom);
diff --git a/src/modules/module-echo-cancel/echo-cancel.h b/src/modules/module-echo-cancel/echo-cancel.h
new file mode 100644
index 000000000..ac83f70e4
--- /dev/null
+++ b/src/modules/module-echo-cancel/echo-cancel.h
@@ -0,0 +1,34 @@
+/* PipeWire
+ *
+ * Copyright © 2021 Wim Taymans <wim.taymans@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+
+#include <spa/utils/dict.h>
+#include <spa/utils/hook.h>
+#include <spa/param/audio/raw.h>
+#include <spa/support/plugin.h>
+
+#include <pipewire/properties.h>
+
+#define echo_cancel_create(i,...)	(i)->create(__VA_ARGS__)
+#define echo_cancel_run(i,...)		(i)->run(__VA_ARGS__)
-- 
2.35.1