Commit graph

5579 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
19b6942965 jack: use PIPEWIRE_PROFILE_MODULES first
We want to respect the PROFILE_MODULES settings if any or else
we use the default,rtkit profile.

See #683
2021-02-08 18:02:58 +01: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
0f028dab40 jack: use the context data thread
Configure the data thread as cancelable, there is no need to make
another thread.

See #683
2021-02-08 15:29:48 +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
94ec577dcd alsa: make sure _recover() works from SUSPENDED
Pass -ESTRPIPE to _recover() when our state is SUSPENDED so that
it always attempts to resume, regardless of the error code.
2021-02-08 11:48:32 +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
cd2a7aebaf a2dp-sink: don't force flush on every buffer
Don't force flush on every buffer but accumulate enough data
first. This avoids sending many small packets when the quantum is
small.

See #680
2021-02-08 10:24:50 +01:00
Wim Taymans
e3d19e5602 a2dp: small cleanups 2021-02-08 10:24:27 +01:00
Wim Taymans
37d8cbd5d6 bluez5: make min buffer size match the latency
We request a latency of at least 512 so make sure we have buffers that
large.

See #680
2021-02-07 20:22:55 +01:00
Wim Taymans
63c5fadcfc a2dp: fix compiler warnings 2021-02-07 19:43:09 +01:00
Huang-Huang
cd78003e66 bluez5: don't create device if there is no connected profile 2021-02-07 18:38:10 +00:00
Pauli Virtanen
f99eefeb4f bluez5: a2dp-source: release transport if it went idle
Release the transport if it went idle, ensuring that the fd is closed,
and add safeguards we won't double-acquire/release it.

This can occur if the device pauses the playback. The transport may also
activate again later on, and in this case we need to reacquire a new fd.
Not closing the old fd causes problems in this case.

However, apparently the BlueZ Release() call fails if the transport is
idle. We just ignore the error and downgrade the error message; it might
not be safe to not call Release() because the idle property update is
async.
2021-02-07 18:32:44 +00:00
Pauli Virtanen
d3d31c4317 bluez5: don't force a2dp-source as driver
Don't force a2dp-source to be driver, because it won't advance clock if
the device is not sending data, and possibly blocks other streams.
2021-02-07 18:32:44 +00:00
Pauli Virtanen
d68bad4673 bluez5: fix a2dp-source clock rate + stuttering
Make a2dp clock advance at the correct rate.

Revert back to accumulating to a single buffer before sending it out.
What it did previously seemed hard to get to work properly with e.g.
aptx which produces block of varying sizes on decoding.
2021-02-07 18:32:44 +00: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
febe8054e4 json: revert strippinf code, this needs more work 2021-02-06 21:08:29 +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
Wim Taymans
78e2e2c27b json: handle comments when stripping
Or else everything becomes part of the first comment.
2021-02-06 20:45:48 +01:00
Wim Taymans
0be2959f11 json: strip spaces and special chars when copying objects
When turning an object into a string, strip out all special chars
and duplicate spaces.
2021-02-06 20:20:26 +01:00
Pauli Virtanen
f1e56b2317 bluez5: provide media.name for a2dp source streams
A2DP source acts as Stream/Output/Audio, so provide media.name for it
indicating the device it comes from (e.g. shown in pulseaudio apps).
2021-02-06 20:24:04 +02: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
e0557e0ca8 bluez5: disable codec switching when in A2DP sink role
Devices that expect pipewire to function as a sink don't seem to like it
switching codecs. Disable codec switching when device is a source.
2021-02-06 18:12:19 +00: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
6c02fd663a merger: handle monitor mute as well 2021-02-05 17:41:56 +01:00
Wim Taymans
ce7a8c9538 media-session: put match rules in "" to avoid confusion 2021-02-05 17:34:30 +01:00
Wim Taymans
11900bbd67 audioconvert: add missing file 2021-02-05 17:29:43 +01:00
Wim Taymans
1511f19f70 audioconvert: handle monitor volumes
Implement monitor volumes in the merger. There are two volumes,
the channel volume and the monitor volume. The monitor volume
is always applied.

By default the monitor volume will now follow the main volume of
the node. This can be disabled with a monitor.channel-volumes
property.

See #674
2021-02-05 17:12:51 +01:00
Wim Taymans
cf6d7b5dee spa: add properties for monitor volume/mute 2021-02-05 17:11:58 +01:00
Wim Taymans
6249b00b9a audioconvert: add volume ops
Add volume helpers and use this for the monitor output ports so
that we can add volumes to the monitor output signal as well.
2021-02-05 15:08:26 +01:00
Wim Taymans
972e740519 Don't advertize formats we don't yet support
We don't handle the reverse endian formats yet so make sure we
don't advertize them.
2021-02-05 12:12:44 +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
Pauli Virtanen
da5f17f653 bluez5: enable A2DP delay reporting
Inform BlueZ we'd like delay reporting from remote devices.
2021-02-05 05:00:06 +02: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
32a3913933 alsa-plugin: use MIN_BUFFERS for max as well
To get a more reasonable max
2021-02-04 17:15:46 +01:00
thedannysmith
5e9246e1f7 alsa-plugin: change hw-constrainy buffer-size 2021-02-04 17:14:19 +01:00
Wim Taymans
3450bea416 jack: implement some missing methods
to make qjackctl 0.9.0 work
2021-02-04 15:48:36 +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
62cf8c6130 alsa-plugin: improve client name 2021-02-04 12:52:23 +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
3659d70aef acp: complain louder when profile files are missing 2021-02-04 10:31:55 +01:00