Commit graph

5700 commits

Author SHA1 Message Date
Pauli Virtanen
a5dc2493df bluez5: route shouldn't list a2dp profiles when not connected 2021-02-19 21:16:27 +02:00
Wim Taymans
3673265ae2 policy-node: don't crash without metadata 2021-02-19 17:54:31 +01:00
Wim Taymans
72e03e3dc8 media-session: add -c option to load custom config 2021-02-19 17:48:27 +01:00
Wim Taymans
91875c1fd8 pw-cli: always output to stdout
Use spa_debug_pod because spa_debug_format outputs to stderr
2021-02-19 16:42:21 +01:00
Wim Taymans
715a3a642a jack: handle client init error with -EIO 2021-02-19 16:10:34 +01:00
dreamer
b35969c706 script depends on bash, set bash with shebang 2021-02-19 14:33:07 +00:00
Wim Taymans
fcf00b3d35 pulse-server: handle unsupported formats
We can only handle PCM encodings for now, fail conversion otherwise.
If we have no supported formats, return an error code.

VLC first try to send AC3 or EAC3 passthrough and then tries again
with decoded data. If we accept the encoded data we are just playing
noise.

Fixes #428
2021-02-19 15:25:32 +01:00
Wim Taymans
4b591df145 pulse-server: print encoding name in format_info 2021-02-19 14:57:11 +01:00
Wim Taymans
686524ce40 context: use the log.level from the config file
Use log.level from the config file if not otherwise set with
PIPEWIRE_DEBUG env.
Make client log.level = 0 by default to avoid spamming the console
with errors.

Fixes #725
Fixes #769
2021-02-19 12:44:03 +01:00
Wim Taymans
08ea7d5cd6 properties: ignore some property updates
Ignore property updates for keys that we manage ourselves like the
object.id, node.id etc. Otherwise a client can replace this with
their local ids and cause confusion.
2021-02-19 11:43:46 +01:00
Bryan Quigley
dd1bf796cb systemd: add sandboxing and slice similar to pulseaudio
Adds as much sandboxing as seems to work with user sessions.
Adds pipewire to session slice per https://systemd.io/DESKTOP_ENVIRONMENTS/

Inspired from https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/blob/master/src/daemon/systemd/user/pulseaudio.service.in

Fixes: 763
2021-02-19 09:08:51 +00:00
Wim Taymans
b9241b1d73 alsa: set application.name 2021-02-19 10:06:40 +01:00
Wim Taymans
44919c83fc audioconvert: keep better track of param changes
Keep track of the param changes with the user counter. Make sure to
flip the serial switch whenever a change is pending. Previously
we copied the param from the channelmixer or follower but that
did not always result in a serial change.

Fixes #764
2021-02-19 09:57:59 +01:00
Wim Taymans
84fc63e601 media-session: don't switch to pro-audio by default
Ignore the pro-audio profile when finding the best profile. We only
want to enable the profile when explicitly set.

Fixes #761
2021-02-18 19:51:00 +01:00
Frédéric Danis
7a5a944704 bluez5: backend-native: Check volume values
The value from +VGM/+VGS AT commands or events should be between 0 than 15.
2021-02-18 18:32:21 +00:00
Wim Taymans
930b411075 bluez5: set the right volumes on the node 2021-02-18 19:25:04 +01:00
Wim Taymans
8c5ca000ef bluez5: volumes need to be distributed to all channels
Otherwise some channels might become silent.

See #741
2021-02-18 17:47:22 +01:00
Wim Taymans
250a10cd63 conf: put "" around string with potential special chars 2021-02-18 17:21:29 +01:00
Wim Taymans
a22602f436 README: update some documentation 2021-02-18 16:18:40 +01:00
eater
6a21909281
spa: escape double quotes 2021-02-18 14:01:28 +01:00
Wim Taymans
63a3811aa7 fix some warnings 2021-02-18 12:42:06 +01:00
Pauli Virtanen
2efdb78239 media-session: save and restore latencyOffsetNsec 2021-02-18 11:33:45 +00:00
Pauli Virtanen
ed9614077c pulse-server: implement node latency offset
Also add facility for storing user data on objects.
2021-02-18 11:33:45 +00:00
Pauli Virtanen
d75a79babc bluez5: add delay adjustment property + fallback value for a2dp-sink
Not all devices report their A2DP delay. In those cases, use a fallback
value of 150ms by default.

Make the delay adjustable with a SPA_Prop, and expose it as a part of
the route. Implement the corresponding parts in media-session.
2021-02-18 11:33:45 +00:00
Pauli Virtanen
df1dbee687 bluez5: include a2dp codec profiles in route profiles 2021-02-18 11:33:45 +00:00
Wim Taymans
22d563720a 0.3.22 2021-02-18 11:12:15 +01:00
Wim Taymans
7053936ffd don't attempt to connect to empty remote name
Fixes jconvolver startup.

See #744
2021-02-18 10:22:39 +01:00
Wim Taymans
81ebc33b57 pw-top: period -> quantum
period has other connotations in alsa
2021-02-18 09:16:49 +01:00
Wim Taymans
c0d8edeb5a conf: improve state directory access checks
We only need RW permission on the last directory.
2021-02-17 20:21:14 +01:00
Wim Taymans
bf062e455a media-session: always remember the new route availability 2021-02-17 15:49:20 +01:00
jasker5183
76febf1c7f Add Link to Wiki 2021-02-17 13:53:25 +00:00
Frédéric Danis
bdbd0f17c6 bluez5: backend_native: Fix backend_native_new() error path 2021-02-17 14:03:06 +01:00
Wim Taymans
aea79cd79c media-session: sanitize description
Because we use the description as the JACK name, remove the : so
that it looks somewhat ok in more cases.
2021-02-17 13:12:22 +01:00
Wim Taymans
60233e30a7 jack: tweak names a little
Move the Description in the main node/port name. This then matches
the device names seen in pavucontrol.
Make the port alias contain the node nick.
2021-02-17 11:36:16 +01:00
Wim Taymans
e66cb18659 jack: find system: port names as well
Make a system:capture_N or system:playback_M name for each port
and use this also in find_node when the node is a default node.
This makes it possible to

jack_connect system:capture_1 system:playback_1

and make it link the default source to defaukt sink.

Fixes #446
2021-02-17 11:16:02 +01:00
Wim Taymans
39cf575210 jack: don't log errors, let app deal with it 2021-02-17 11:15:31 +01:00
Wim Taymans
1f2ba4b55f port: set port id in properties 2021-02-17 11:15:08 +01:00
Frédéric Danis
01b6dbfca6 bluez5: backend_native: Add mSBC support to HFP HF 2021-02-17 10:19:39 +01:00
Wim Taymans
38a7333608 adapter: number unknown ports from 1 instead of 0
This makes it like what jack does.
2021-02-17 10:14:47 +01:00
Wim Taymans
c7b7afa664 audioadapter: fix enum of properties
Keep track of the subelement we're iterating in the result index upper
bits. Use enum_sync to iterate each param and switch to the next
element when we run out of params.

See !468
2021-02-17 09:59:00 +01:00
Wim Taymans
0ed7e537fb acp: make Pro devices look better
Omit the Output/Input string from the name
Don't print a number for the first device.

See !466
2021-02-16 20:21:53 +01:00
Frédéric Danis
7a96f3a945 bluez5: backend_native: Fix SCO deferred setup accept
In BT_DEFER_SETUP mode, when a connection is accepted, the listening
socket is unblocked but the effective connection setup happens only on
first receive, allowing to configure the accepted socket.

First read from the accepted socket is non-blocking and returns a zero
length buffer.
2021-02-16 18:30:11 +01:00
Wim Taymans
344eb2baa3 bluez5: handle info == NULL when parsing codecs 2021-02-16 17:58:56 +01:00
Frédéric Danis
23823867b0 bluez5: backend_native: Fix +BRSF parsing for HFP HF 2021-02-16 16:49:04 +00:00
Frédéric Danis
be7caf0e66 bluez5: backend_native: Fix default HFP codec 2021-02-16 16:49:04 +00:00
Wim Taymans
3aa0a39e30 pulse-server: track volume/mute changes
When something else changes the volume of our stream, store the new
value in our volume/mute state so that we always have an up-to-date
value when we compare our volume to the desired volume.

See #721
2021-02-16 17:21:26 +01:00
Wim Taymans
6079830591 media-session: add option to configure suspend timeout
Set the property on the node and use the value when suspending the
node. a timeout of 0 disables suspend.
2021-02-16 15:41:53 +01:00
Wim Taymans
38e0ff55cd acp: don't add pro profile for UCM
For UCM, we can just as well make a use case in the UCM file.
2021-02-16 15:17:26 +01:00
Wim Taymans
ca10c6470f audioconvert: use sizeof for position size
And make the position field a little larger
2021-02-16 15:07:40 +01:00
Frédéric Danis
0061ddd6be audioconvert: Fix buffer overflow
This was introduced by commit c160a063b9
2021-02-16 14:56:17 +01:00