Commit graph

7798 commits

Author SHA1 Message Date
Wim Taymans
9223fc2885 raop: add beginnings of RAOP protocol 2021-11-12 16:58:27 +01:00
KangJing Huang (Chaserhkj)
c21536eec8 module-echo-cancel: Remove intelligibility param with no effect 2021-11-11 16:52:58 +00:00
KangJing Huang (Chaserhkj)
a9a0b0466a module-echo-cancel: wireup voice detection 2021-11-11 16:52:58 +00:00
Wim Taymans
7afd80052b 0.3.40 2021-11-11 13:21:29 +01:00
Jonas Ådahl
15b4c58e80 gst: Don't ask for DMA buffers
Gstreamer simply mmap()s the DMA buffers. This can be very very slow on
some hardware, so don't ask for it. For gstreamer to support DMA
buffers, it will need to support a proper way of transferring the
buffers from the GPU to the CPU, e.g. using EGL/OpenGL.
2021-11-11 10:22:37 +00:00
Wim Taymans
263adb45f4 audioconvert: fix compilation on armv7 2021-11-11 11:21:07 +01:00
Wim Taymans
b75796054c spa: include dict.h
It causes a compiler warning on armv7
2021-11-11 10:59:23 +01:00
Peter Hutterer
671410b3bf pw-mon: add support for colored output
Same CLI as pw-dump, i.e. -N, --no-colors, --color=always etc are
supported.

This uses a for-loop macro hack to automatically print prefixes and
suffixes, the with_prefix() macro resolves into the correct printf
statements to insert either just the marker "*" or the ansi sequences
for color/reset. Use of the macro is simply:
```
   with_prefix(true, stderr) {
	fprintf(stderr, "this will be prefixed\n");
   }
```
2021-11-11 08:21:58 +00:00
Peter Hutterer
cafe94efc2 pw-mon: switch the changed marker from single char to string
Prep work for coloured output where the prefix/suffix may be multiple
characters if ANSI sequences are used.
2021-11-11 08:21:58 +00:00
Peter Hutterer
2531ab0acd pw-mon: switch to use stderr everywhere
Most of pwmon's output uses spa_debug() or some related helper which
prints to stderr. Let's switch our explicit printfs over so we can
redirect the whole thing in one go.
2021-11-11 08:21:58 +00:00
Peter Hutterer
eb688a9f57 man: add a man page for pipewire-pulse 2021-11-11 08:19:51 +00:00
Peter Hutterer
82e321da14 ci: use FDO_CI_CONCURRENT to determine the ninja job count 2021-11-11 08:19:28 +00:00
columbarius
06b0512b22 examples: video-play-fixate.c add fallback for older PipeWire versions
The posibility to drop single modifier was added in this development
circle (after 0.3.39 release). To have clients work with older versions
of PipeWire dropping all modifiers can be an option.
2021-11-10 22:23:30 +00:00
columbarius
1c922958bc examples: video-src-fixate.c cleanup example
Cleanup printed messages and rename memfd.
2021-11-10 22:23:30 +00:00
columbarius
2c10894970 docs: Update fixation on DmaBuf-docs 2021-11-10 22:23:30 +00:00
columbarius
ed3be2114c examples: video-play-fixate.c remove fixated check 2021-11-10 22:23:30 +00:00
Nicolai Syvertsen
a84cfac28a Only handle -EPIPE eerrors. 2021-11-10 19:26:03 +00:00
Nicolai Syvertsen
7b773433f4 pipewire-pulse: add manager disconnect event
Drop client connections when pipewire goes away. pipewire-pulse daemon can remain running and pulseaudio clients will be able to connect again once pipewire is up and running.
2021-11-10 19:26:03 +00:00
Barnabás Pőcze
df3ea8dafa pipewire: module-profiler: destroy event source
Even though all event sources are kept in a list in the current
implementation of the event loop in the SPA support plugin, relying
on it freeing all sources could lead to unbounded memory use
if the profiler module is loaded and unloaded over and over again.
2021-11-10 14:05:35 +00:00
Barnabás Pőcze
d4e4b5df98 pipewire: module-profiler: handle global's destroy event
Handle if the global is destroyed (e.g. `pw-cli destroy X`) to
avoid a use-after-free in `pw_global_destroy()` when it is called
with a dangling pointer from `module_destroy()`.
2021-11-10 14:05:35 +00:00
Barnabás Pőcze
336e4d5f03 pipewire: module-echo-cancel: aec-webrtc: use unique_ptr
Use `std::unique_ptr<>` to clean up memory in the destructor
instead of manually freeing resources in the destroy callback
and error code paths.
2021-11-09 22:27:31 +01:00
Barnabás Pőcze
5896083545 pipewire: module-echo-cancel: aec-webrtc: use appropriate casts
Use the suitable C++ cast instead of C-style casts.
2021-11-09 22:27:03 +01:00
Barnabás Pőcze
144face6ad pipewire: module-echo-cancel: aec-webrtc: use getters with default
Instead of get-check-parse, use `pw_properties_get_bool()`
which does all three in one convenient function.
2021-11-09 22:27:01 +01:00
Barnabás Pőcze
175efc4c1d pipewire: module-echo-cancel: avoid extra allocation
Use `pw_properties_setf()` instead of `calloc()` +
`sprintf()` + `pw_properties_set()` + `free()`.

Furthermore, check the return value of `sscanf()`.
2021-11-09 22:02:55 +01:00
Wim Taymans
c9fc3d7f42 pulse-server: don't process while the stream is created
When the stream is still being created, avoid doing any processing
because some things might not be configured yet.
2021-11-09 16:29:46 +01:00
Wim Taymans
daf761a87f utils: export pw_getrandom
Export the symbol and move it to utils.
2021-11-09 16:16:30 +01:00
Wim Taymans
62509f23d7 impl-core: pass data to listener user_data
So that we can get to the registry resource.
2021-11-08 12:56:00 +01:00
Wim Taymans
5ed4977b38 destroy proxies when global is removed
When a global is removed, also remove the proxies. We can have multiple
proxies to a global otherwise when a client has a sequence of events
queued from the server like this:

Global 1 added
Global 1 removed
Global 1 added

The proxy we added in the firt event would not be destroyed because the
server did not know about it when global 1 was removed and then a
second one would be made.
2021-11-08 12:55:41 +01:00
Pauli Virtanen
2329a4d323 bluez5: quirks for headset without a2dp duplex codecs
See #1756 (another headset with non-working, probably faststream duplex)
2021-11-08 08:25:55 +00:00
Wim Taymans
fc12e5bed0 jack: improve port sort order
Sort ports per node and then per node-specific port_id. This will
keep related ports together and will sort them based on when they
were created.

Fixes #1780
2021-11-08 09:23:20 +01:00
KangJing Huang (Chaserhkj)
bb407e8153 Wire up webrtc aec parameters to args 2021-11-06 05:20:33 -04:00
Wim Taymans
743f699193 pulse-server: try to not put pointers in info messages
It's not very helpful, prefer to use human readable strings and move the
more techincal stuff in debug messages.
2021-11-05 16:22:22 +01:00
Wim Taymans
2f3e65c049 pulse-server: leave the draining state
Use pw_stream_set_active() to leave the draining state so that our
process methods are called again and we can resume.
2021-11-05 15:47:49 +01:00
Wim Taymans
90fe579b29 stream: make _set_active(true) leave the draining state
If the stream is drained, make _set_active(true) leave the draining
state so that the process() events are emitted again and buffers will
be pushed().
2021-11-05 15:45:55 +01:00
Wim Taymans
0cccff517b pulse-server: send the drained event only once
Only send the drained command once. pw-stream keeps on emitting drained
events as longs as the stream is drained.
2021-11-05 15:42:33 +01:00
Wim Taymans
6ca297797f pulse-server: ensure latency is multiple of frame_size 2021-11-05 13:31:09 +01:00
Barnabás Pőcze
01de0b966a spa: bluez: simplify and move handling of some AT commands
Simplify the key-value pair parsing for AT+IPHONEACCEV commands,
and move the handling of {key,indicator}-value pairs into
dedicated functions. Furthermore, fix a comment.
2021-11-04 18:42:29 +01:00
Barnabás Pőcze
bdd7570c6f spa: bluez: simplify loop
`spa_list_for_each_safe()` is not needed as the list is not
modified during the traversal, so use `spa_list_for_each()`.
2021-11-04 17:16:14 +00:00
Barnabás Pőcze
f71910c665 spa: bluez: rename variable
The `optlen` variable holds the size of a socket address,
so rename it to `addrlen`.
2021-11-04 17:16:14 +00:00
Barnabás Pőcze
6410a2dfa4 spa: bluez: fix spelling 2021-11-04 17:16:14 +00:00
Barnabás Pőcze
1f927838e2 spa: bluez: remove unnecessary return 2021-11-04 17:16:14 +00:00
Barnabás Pőcze
4bdf495747 spa: bluez: move profile selection to function
Move the profile selection from `profile_new_connection()`
into a separate function to avoid checking the string more
than necessary.
2021-11-04 17:16:14 +00:00
Barnabás Pőcze
dd4587acef spa: bluez: change argument type
Take the `rfcomm` object directly instead of taking a `spa_source`
object and retrieving the `rfcomm` object via its `data` member.
2021-11-04 17:16:14 +00:00
Barnabás Pőcze
4cf889a5f0 spa: bluez: use switch
Use a switch statement instead of an `if` because it is more
suitable in the presence of `#ifdef`s, it avoids potential
unnecessary extra checks.
2021-11-04 17:16:14 +00:00
Barnabás Pőcze
73690d6662 spa: bluez: add missing else 2021-11-04 17:16:14 +00:00
Barnabás Pőcze
57ff7abc68 spa: bluez: use spa_startstartswith() where appropriate 2021-11-04 17:16:14 +00:00
Wim Taymans
b96f15d2fe pulse-server: improve latency setup a little
Reorganize the latency setup in one place, return a desired device
latency for use as quantum.

PulseAudio assigns half of the (tlength - minreq) latency to the sink
but we can't do that because our sinks have a max-quantum of latency.
Fix this by clamping our calculated sink latency to the quantum

PulseAudio subtracts the sink latency from the tlength in adjust latency
mode, so we need to do the same.

This makes PULSE_LATENCY_MSEC values bahave more like pulseaudio.

See #1769
2021-11-04 18:07:30 +01:00
Wim Taymans
86ca0f8466 acp: improve debug of channel map
Increase the size of the channel_map debug printf buffer.
Use a safer version of the snprintf that avoids buffer overruns.

See #1781
2021-11-04 16:41:32 +01:00
Wim Taymans
efd8ac25e3 pulse-server: don't emit _removed without havine emitted _added
Don't emit _removed for objects that are still being created because
we did not emit an _added signal for them yet.
2021-11-04 12:50:18 +01:00
Wim Taymans
abacea5ca0 libcamera: improve debug 2021-11-03 17:49:10 +01:00