Commit graph

2955 commits

Author SHA1 Message Date
Wim Taymans
90d8589fb9 pw-dump: always output colors and add option to disable
-N disables colors now. Usually we want to preserve them in debug
files and grep etc.
Use less -R to get colors

See #698
2021-02-08 19:52:24 +01:00
jasker5183
246f7bd77e bluez-monitor.conf Formatting/Punctuation Fixes 2021-02-08 18:19:16 +00:00
jasker5183
dc66df134b alsa-monitor.conf Spelling/Punctuation Fixes 2021-02-08 18:17:33 +00:00
jasker5183
c14361b19d Spelling/Punctuation Fixes 2021-02-08 17:14:02 +00:00
Wim Taymans
085fd536be daemon: make flags parse like an array 2021-02-08 17:30:26 +01:00
Wim Taymans
ecd1d3e1d7 Move node.pause-on-idle setting to config files
So that we can configure it.
Add some more docs to the config file
2021-02-08 17:19:47 +01:00
Wim Taymans
cd5ceae69e systemd: remove LimitMEMLOCK lines
The LimitMEMLOCK lines can only lower the use limits so it is not
very useful.

See #692
2021-02-08 14:56:50 +01:00
Wim Taymans
210950dc0a context: disable mlock warnings by default
Make this a tunable option instead.
2021-02-08 10:59:02 +01:00
Wim Taymans
746c714b0c properties: fix value allocation
We need an extra byte for the \0
2021-02-07 19:25:35 +01:00
Wim Taymans
b61c4a88c4 properties: use json parse_string
So that properties with object values get stripped properly.
2021-02-06 20:46:44 +01:00
Pauli Virtanen
3e9bf908ac pulse-server: clients expect stream names to be non-null
Fixes crash in pavucontrol when media name is missing.
2021-02-06 20:19:19 +02:00
Pauli Virtanen
d617d7e1a3 pulse-server: SET_DEFAULT_* commands change the configured values 2021-02-06 18:10:28 +00:00
Pauli Virtanen
db6baf6188 media-session: use separate keys for configured default nodes
Use separate metadata keys for the current effective default nodes
(default.*), and user-configured ones (default.configured.*).

default-nodes saves and restores the configured ones, and policy-node
keeps the effective ones up to date.

For pipewire users, the effective default values should be considered
read-only, as changing them will not have an effect.  To avoid
confusion, policy-nodes will reset their values back immediately if they
are changed.
2021-02-06 18:10:28 +00:00
Wim Taymans
ce7a8c9538 media-session: put match rules in "" to avoid confusion 2021-02-05 17:34:30 +01:00
Wim Taymans
4f28edd4f7 pulse-server: limit packets to fragsize
When sending captured data to a client, pulseaudio limits the
size of the block to the fragsize. Let's do the same just in case
a client can't deal with more data.

See #615
2021-02-05 11:36:23 +01:00
Wim Taymans
c25bdce645 rework param updates
Make it possible to add a NULL param to the pending list. The NULL
param removes all previous updates.
When applying the updates, the NULL param removes the params from
the target list.

For the cached params in the node/device/port we need to be careful
because multiple clients might ask for updates concurrently. Clear
the pending list whenever a new param update starts so that we always
only keep the last set of updates.

This has two advantages: it actually removes params that become
unreadable or that got removed and it allows us to update the target
list more efficiently in one single loop.
2021-02-05 11:03:47 +01:00
Wim Taymans
994fc1169e Revert "rework param updates"
This reverts commit 5aa7746c95.

Routes are duplicated for some reason, needs more debugging.
2021-02-04 20:56:54 +01:00
Wim Taymans
be25a00ddb pulse-server: detect flatpak and pass on the pipewire connection 2021-02-04 17:18:33 +01:00
Wim Taymans
20008b4846 pulse-server: actually fill in the maxlenght and fragsize.. 2021-02-04 14:53:28 +01:00
Wim Taymans
5aa7746c95 rework param updates
Make it possible to add a NULL param to the pending list. The NULL
param removes all previous updates.
When applying the updates, the NULL param removes the params from
the target list.

This has two advantages: it actually removes params that become
unreadable or that got removed and it allows us to update the target
list more efficiently in one single loop.
2021-02-04 13:26:35 +01:00
Wim Taymans
1581b6cfce media-session: give more permissions to Manager flatpaks
If a flatpak app has the Manager media.category set, assign more
permissions to it for now. We should later check with the
permission store if this is really allowed.
2021-02-04 11:53:03 +01:00
Wim Taymans
d85862af71 module-access: fall back to client requested access mode
When nothing else was decided, use the client requested access
method. The idea is that pipewire-pulse will detect a flatpak client
an performs the pipewire connection on behalf of the client,
requesting flatpak access restrictions.
2021-02-04 11:48:45 +01:00
Wim Taymans
4c46495c38 pw-dump: don't print unreadable params 2021-02-03 19:27:57 +01:00
Wim Taymans
be7415dac8 pw-top: improve period and rate columns 2021-02-03 11:46:01 +01:00
Wim Taymans
8befe9e238 pulse-server: allow objects with priority 0 to be default
Also use the object with priority 0 as a best option when there
is not yet anything else.
2021-02-03 10:02:22 +01:00
Wim Taymans
a48a4fc1bd conf: add comments for the other access permissions 2021-02-02 17:48:25 +01:00
Wim Taymans
b8ef0fc5bb module-access: make access.allowed an array
Reformat the config file a little
2021-02-02 17:48:25 +01:00
Wim Taymans
7c0081eb6f pulse-server: move memblock back to debug 2021-02-02 15:24:05 +01:00
Wim Taymans
379cbeaa5d pw-cat: fix option for playback
Fixes #665
2021-02-02 15:17:38 +01:00
Wim Taymans
0d2b9104d1 pulse-server: fix seek modes
Adjust missing when seeking and update the filled level correctly.

Fixes #653
2021-02-02 15:13:49 +01:00
Wim Taymans
2b44f42845 pass the complete buffer size to snprintf
There is no reason to pass size-1, snprintf will always put a \0
at the end.
2021-02-02 12:09:29 +01:00
Wim Taymans
748e205453 pulse-server: hand out silence when corked
In the corked state we simply hand out silence and don't try to
consume data from our ringbuffer.
Also set the corked state before syncing this with the data thread.

Fixes #662
2021-02-02 10:42:34 +01:00
Wim Taymans
a18a8c9e32 media-session: save and restore profile ports
Save the last explicitly set ports per profile.
When a profile change happens, restore the saved ports or select
the best port when nothing was saved.
2021-02-01 18:02:32 +01:00
Wim Taymans
5e15411af4 alsa-monitor: use max channels on non-ACP devices
Otherwise, they might still negotiate to something less than the
max channels.
2021-02-01 15:16:39 +01:00
Wim Taymans
80368ab8ae pulse-server: remove unused macro 2021-02-01 15:16:39 +01:00
Huang-Huang
b9f2e6a8c4
bluez5: disable HSP AG by default in native backend 2021-02-01 03:39:49 +08:00
Huang-Huang
f6cc45f736 bluez5: allow headset roles selecting 2021-01-31 18:12:07 +00:00
Wim Taymans
60aef11072 pulse-server: if prebuf == 0, keep increasing playing_for
Or else the client pauses and time stops. Makes GStreamer
pipelines complete.
2021-01-30 21:04:07 +01:00
Wim Taymans
d1c0244512 pulser-server: keep updating missing bytes if prebuf == 0 2021-01-30 20:38:47 +01:00
Wim Taymans
d37742b410 pulse-server: handle prebuf better
prebuf == 0 should keep the read pointer updating
prebuf > 0 should pause
2021-01-30 19:48:01 +01:00
Wim Taymans
98dab7903a pulse-server: add buffer attributes as properties 2021-01-30 19:32:13 +01:00
Pauli Virtanen
494194c4bf bluez5: allow selecting codecs to use in config file
For debugging, it may be useful to disable some of the codecs.  Enable
configuring this in config file, to make it more convenient for users,
who may not know how to recompile/install pipewire.
2021-01-30 17:23:07 +00:00
Pauli Virtanen
f7db158bd6 media-session: give bluez5 objects driver.priority
Makes bluez devices as automatic default devices, with priority slightly
larger than alsa devices.  The priority.driver is also used by
pulse-server on determining automatic default devices, when no default
has been manually set.
2021-01-30 15:00:33 +02:00
Wim Taymans
8fd120cb23 media-session: recheck route status when != available
Save the new state so we can detect changes
Check for available != yes to also recheck when the state becomes
unknown.
2021-01-29 17:23:02 +01:00
Wim Taymans
f43bcca35e media-session: implement route selection and restore
Disable automatic port configuration in acp and move the logic
to the session manager.
Implement initial port selection and restore on profile activation.
Implement route switch when unavailable
Implement port settings save.
2021-01-29 16:59:17 +01:00
Wim Taymans
7cc5026c02 pulse-server: remove useless _pop() 2021-01-29 16:58:17 +01:00
Wim Taymans
2a1875fc35 bluez: disable pause on idle by default 2021-01-29 15:37:32 +01:00
Wim Taymans
1ea8282a24 pulse-server: don't update ringbuffer in underrun 2021-01-29 10:45:26 +01:00
Jakub Adam
c64bf36e8e gst: avoid crash with zero SPA_PARAM_BUFFERS_size
With sending and receiving pipelines:

  gst-launch videotestsrc ! tee !  pipewiresink mode=provide

  gst-launch pipewiresrc path=<node_id> ! videoconvert ! autovideosink

The first pipeline crashes when the other connects.

It happens because SPA_PARAM_BUFFERS_size passed to
pw_stream_update_params() upon pipewiresink's buffer pool activation is
zero. As a consequence, in gst_pipewire_pool_wrap_buffer(), d->type will
be SPA_ID_INVALID and the created GstBuffer will have no memory
appended. This ultimately leads to segfault in do_send_buffer().

If size hasn't been set in GstPipeWirePool's config before the
first buffer is to be rendered by pipewiresink, configure the pool with
the size of that first incoming buffer and activate the pool.
2021-01-28 20:50:07 +01:00
Wim Taymans
f8d57d03ca pulse-server: keep separate counter for missing bytes
And only increment when consumed from ringbuffer. In underrun we
play silence and don't ask for the missing bytes.

Fixes #616
2021-01-28 20:00:48 +01:00