Commit graph

631 commits

Author SHA1 Message Date
Frédéric Danis
6308c5d806 bluez5: backend-hsphfpd: Add mSBC support
mSBC can be enabled by passing "bluez5.msbc-support=true" parameter to
pipewire-media-session.
mSBC is automatically selected if remote device supports it.
2020-11-16 18:15:39 +01:00
Wim Taymans
6fa622d2d9 policy-node: only reconnect to given path_id
When the node is not found and we are not allowed to reconnect to
something else, error.
2020-11-16 13:28:35 +01:00
Wim Taymans
10207456f0 media-session: don't start pulse-bridge automatically
Don't start the pulse-bridge automatically because we don't
know what socket to listen on.
Also, listen by default on a safe socket, not used by pulseaudio.
2020-11-12 16:50:24 +01:00
Wim Taymans
1d001974d7 media-session: enable pulse-bridge by default
Now that we don't interfere with pulseaudio, enable it by default.
2020-11-12 11:11:53 +01:00
Greg V
cc0386e1c5 media-session: ifdef Linux-specific file option 2020-11-09 11:14:20 +00:00
Wim Taymans
1570e62635 remove hooks from objects
Remove the hooks we installed on objects in the destroy/free event
or before calling _destroy. This is not really needed but it is
a nice thing to do because it calls the hook removed callbacks.
2020-11-06 15:53:32 +01:00
Wim Taymans
9d598cde63 policy-node: always up or downmix to device format
Always remix the channels to match the ones on the device even if
that means upmixing.

This will make mono streams go to all inputs of the device instead
of just one.

Fixes #355
2020-11-04 09:47:20 +01:00
Wim Taymans
4f2b1c7684 media-session: avoid recursive rescan
A rescan can trigger a new rescan and with a blocking rountrip this
can recursively never end. Catch a rescan while rescanning and queue
it for when we end the current scan.

Fixes #364
2020-11-03 20:25:51 +01:00
Wim Taymans
6962c27af9 media-session: disable bluez5 and pulse-bridge by default
Some distros don't patch this up which interferes with the pulseaudio
server.

Fixes #360
2020-11-03 09:11:20 +01:00
Wim Taymans
c43026d93e don't handle EINTR and EAGAIN as the same
EAGAIN means a non-blocking operation would block and we should not
try again right away but leave the loop and wait instead.

See #358
2020-11-02 16:43:56 +01:00
Wim Taymans
e094640c7b handle EINTR and EAGAIN
Just do the call again instead of failing or logging an error.

Fixes #358
2020-11-02 14:51:07 +01:00
Wim Taymans
0ef41252bd access: debug access control some more 2020-10-30 11:54:39 +01:00
Wim Taymans
f953efdefb media-session: improve enabled/disabled options
Always use a default set of options and have enable/disable
add/remove options to/from it. Previously to enable just one option
you had to list all the other default enabled options as well.
2020-10-30 09:54:18 +01:00
Wim Taymans
952326323e policy-node: also allow node name as NODE_TARGET 2020-10-24 15:50:09 +02:00
Wim Taymans
d55bc1eb86 keys: add PW_KEY_STREAM_CAPTURE_SINK
Add a property for capture stream to signal that they would like
to capture the output (monitor) of the default sink instead of the
default source.
Check the desired device we would like to capture from and handle
the capture from the sink by monitoring the monitor source.
2020-10-21 17:00:49 +02:00
Wim Taymans
a2c70781a3 media-session: use rtkit for session manager data thread 2020-10-21 16:36:37 +02:00
Wim Taymans
25e4f2088c policy-node: also handle the single stream move 2020-10-21 15:39:37 +02:00
Wim Taymans
bfac6f04db policy-node: avoid rescan when moving a node
When we are moving a node, the node becomes unlinked temporarily.
Make sure the rescan code doesn't try to link it to a node
meanwhile.

Fixes #344
2020-10-21 15:27:50 +02:00
Wim Taymans
77b91823f3 a2dp: mark a2dp-source as stream and autoconnect 2020-10-19 18:53:18 +02:00
Wim Taymans
3733a5e219 media-session: save last target_node
Keep a per node entry of the saved target node and use this when
there is no other target node.
When explicitly moving a stream, save the new target node.
2020-10-14 12:35:27 +02:00
Wim Taymans
12e6dd89e2 client: register client global after update properties
This way we only expose the client after we have all the properties.
Also add a new CLIENT_ACCESS property that contains the desired
client access mode.
2020-10-09 13:31:22 +02:00
Wim Taymans
f0102fd490 pulse: move pulse protocol to module 2020-10-08 18:06:11 +02:00
Wim Taymans
17843ae7cb pulse-bridge: fix reply of record latency
Makes bluejeans in firefox work
2020-10-08 18:06:11 +02:00
Wim Taymans
fead5c18d6 pulse-bridge: fix state of source 2020-10-08 18:06:11 +02:00
Wim Taymans
3194d5ca81 pulse-bridge: add introspection of dummy sink/source 2020-10-08 18:06:11 +02:00
Wim Taymans
6f6337e732 pulse-bridge: support record streams 2020-10-08 18:06:11 +02:00
Wim Taymans
7c1fbf5bee pulse-bridge: rework messages
Make recycled message blocks for receiving and sending data.
Implement async flushing out the output queue.
2020-10-08 18:06:11 +02:00
Wim Taymans
4ad085ef96 pulse-bridge: work more on timings
Fixes sync in firefox
2020-10-08 18:06:11 +02:00
Wim Taymans
ab4def7e5f pulse: respect flags to set volume/mute 2020-10-08 18:06:11 +02:00
Wim Taymans
a4874abc46 pulse: restore volume and muted 2020-10-08 18:06:11 +02:00
Wim Taymans
630889493c pulse-bridge: Update client properties 2020-10-08 18:06:11 +02:00
Wim Taymans
949f923b80 pulse-bridge: implement timing and corking 2020-10-08 18:06:11 +02:00
Wim Taymans
a536c38fbe pulse: use send to avoid SIGPIPE signals 2020-10-08 18:06:11 +02:00
Wim Taymans
90b52b9ff4 pulse-bridge: add more commands 2020-10-08 18:06:11 +02:00
Wim Taymans
9dad175959 pulse-bridge: implement stream volume
Implement some more things.
2020-10-08 18:06:11 +02:00
Wim Taymans
7655aa7066 pulse-bridge: implement enough to play flatpak Spotify 2020-10-08 18:06:11 +02:00
Wim Taymans
d180b8d927 beginnings of pulse protocol 2020-10-08 18:06:11 +02:00
Wim Taymans
0da406d304 media-session: make sure we don't read invalid data 2020-10-01 11:32:40 +02:00
Wim Taymans
81ca70af9b alsa-monitor: avoid crash in release
Only try to release the device when we have a proxy.

Fixes #310
2020-09-28 18:23:23 +02:00
Wim Taymans
61523d383a tools: add pw-reserve to reverse and monitor a device 2020-09-23 10:24:06 +02:00
Wim Taymans
f4bf7bc7e6 media-session: don't emit busy when we are acquiring 2020-09-23 10:22:22 +02:00
Wim Taymans
3f844f7b09 media-session: make the same node name as PulseAudio
Fixes #299
2020-09-22 12:59:13 +02:00
Wim Taymans
a4e079e1cb media-session: guard against invalid input
See #304
2020-09-22 12:39:39 +02:00
Wim Taymans
cf2c32f0a9 alsa: rework device reservation
Always try to first reserve the device name and then start the probing
so that we can be sure that the device is not in use.
2020-09-21 15:23:36 +02:00
Wim Taymans
2b8568e14f reserve: don't call busy/available when we are the owner
Also ignore acquired from our other devices.
2020-09-21 14:35:32 +02:00
Wim Taymans
cc470c048b reserve: improve debug 2020-09-21 14:35:08 +02:00
Arun Raghavan
2c8e2f3a36 reserve: Fix check for whether acquire succeeded or not
We only deem success if we successfully became the primary name owner.
2020-09-19 11:02:04 +00:00
Arun Raghavan
272624fe83 alsa-monitor: Don't ignore device reservation failure
We were ignoring the reservation status, which is incorrect as we might
not have succeeded in grabbing the device.
2020-09-19 11:02:04 +00:00
Arun Raghavan
2acfa0ee10 alsa-monitor: Lower our device reservation priority
For now, let's lower our priority in device reservation below that of
PulseAudio (which currently uses a priority of 0), so that it takes
priority while contending for the same device.
2020-09-19 11:02:04 +00:00
Wim Taymans
8ee07c3c66 policy-node: always boost default node priority
Make sure the default node as the highest priority.
Fixes a problem with default nodes not being selected when their
priority happens to be too low (bluetooth devices)
2020-09-17 12:35:33 +02:00