Commit graph

4489 commits

Author SHA1 Message Date
Wim Taymans
4370675d2b pulse: fix crash when cleaning up signals
Also make sure the main pulseaudio binary can't be started.
2020-08-21 15:36:03 +02:00
Wim Taymans
f3c06372ef pulse: implement more directories 2020-08-21 15:35:21 +02:00
Wim Taymans
39513fb681 protocol-native: fix error reporting
Don't say that there is no runtime directory set when there is but
the server is not running.
Simplify things by first trying to connect to the user runtime directory
when set and then try the system directory. There is no need to manually
check the existance of the socket, connect wil that that and set the
appropriate error.
2020-08-21 11:15:24 +02:00
Wim Taymans
157b15d643 pulse: implement load_module of null-sink
Implement load_module of the null sink
Keep track of sink_input/source_output linked sink/source in a
better way.
Associate the global with our streams and the streams with the
global.
Don't emit the sink_input/source_output before there is a linked device
and before our stream is READY.
Improve server info to make it more look like pulse.
2020-08-20 18:00:00 +02:00
Wim Taymans
e8640683bb support: add null audio sink 2020-08-20 18:00:00 +02:00
Wim Taymans
7cdc36d506 pulse: DSP -> MONITOR 2020-08-20 18:00:00 +02:00
Wim Taymans
adfa88c961 pulse: always update and debug the error 2020-08-20 18:00:00 +02:00
Frédéric Danis
7120bfe059 bluez5: backend-hsphfpd: Add spa_bt_transport support
The ConnectAudio method triggers Introspect and NewConnection calls from
hsphfpd to the backend, which will set the fd to use for the SCO data.
This imply to run the DBus loop while waiting for ConnectAudio reply to be
able to reply to those method calls.

MTU is hard-coded to 48. Using MTU from hsphfpd may prevent correct
sound operations.

Volume management is not yet implemented.
2020-08-19 17:49:36 +00:00
Frédéric Danis
6d0c48cc82 bluez5: Add transport find function using a test callback
hsphfpd backend needs a way to retrieve bt_transport based on other entries
than the path one
2020-08-19 17:49:36 +00:00
Frédéric Danis
7bad76737e bluez5: Create backend skeleton for HSP/HFP support using hsphfpd
As hsphfpd is a prototype and its API subject to change, this backend is
disable by default.

This skeleton connects to hsphfpd daemon and list the managed devices.
2020-08-19 17:49:36 +00:00
Jonas Holmberg
3e7609dcaf protocol: Add system runtime directory for clients
Add /run/pipewire to the list of runtime directories so that clients can
connect to the system service without specifying runtime directory.

If the otherwise chosen directory (e.g. the user home directory) doesn't
contain any socket but /run/pipewire does, the latter will be used.
2020-08-19 17:46:50 +00:00
Jonas Holmberg
5c52670421 systemd: Add system service and socket
Add system service and socket in addition to the user service and
socket. The system service is started as pipewire user and group and
clients need to be in the pipewire group to be able to connect.
2020-08-19 17:46:50 +00:00
Wim Taymans
120090741a pulse: return NOENTITY when an item was not found
It's possible that the object was removed right after doing the call, in
that case we need to return NOENTITY because apps handle this
gracefully.
2020-08-19 17:03:44 +02:00
Wim Taymans
cde6b99890 stream: call latency_update callback 2020-08-19 16:49:30 +02:00
Wim Taymans
5037a97690 stream: call started callback when started
.. instead of the suspended callback
2020-08-19 16:49:02 +02:00
Wim Taymans
bb323a82a7 stream: call the moved_callback when moved 2020-08-19 16:48:25 +02:00
Wim Taymans
4e17d4cdf8 pulse: don't leak device_name
Small cleanups
2020-08-19 16:47:52 +02:00
Wim Taymans
1f298cb5bf stream: guard against old timestamps 2020-08-19 16:02:52 +02:00
Wim Taymans
825fe8ac54 stream: make time increase even when clock changed 2020-08-19 16:00:20 +02:00
Wim Taymans
5f4fd14a40 audioconvert: optimize prefered formats
First planar, then packed, then packed other endian formats.
First F32, S32, S24_32, S16, S24, U8 because of quality and
optimizations.
2020-08-19 13:45:57 +02:00
Wim Taymans
1e2d5e6837 policy-node: force channel setup of target node
When we are switching to a target node, force a downmix to the
target channel layout if we can. Don't try to upmix for now and
don't try to mix when the dont-mix flag is set.
2020-08-19 11:53:07 +02:00
Wim Taymans
d878843c2b policy-node: keep the original node format 2020-08-19 11:26:51 +02:00
Wim Taymans
35534baf9d remote-node: clear up mix structures when port is removed 2020-08-19 11:23:16 +02:00
Wim Taymans
0c04481ba7 metadata: improve default sink/source
Only check defaults when subject is PW_ID_CORE
Handle NULL keys: remove the defaults
2020-08-18 17:56:05 +02:00
Wim Taymans
759e1ccb6b jack: fix default source and sink handling 2020-08-18 17:18:37 +02:00
Wim Taymans
8c893cbc4a jack: improve debug 2020-08-18 16:52:27 +02:00
Wim Taymans
cfdd6cab20 acp: fix UCM off profile 2020-08-18 16:52:09 +02:00
Wim Taymans
69be14186e 0.3.10 2020-08-18 13:19:12 +02:00
Wim Taymans
a67af43cad alsa: sync with latest pulseaudio
Move some things around to make it easier to merge in changes.
2020-08-18 12:41:34 +02:00
Wim Taymans
6aa6b4eac7 pulse: improve debug 2020-08-18 12:12:49 +02:00
Wim Taymans
a92d060de9 context: make sure required fields are not NULL 2020-08-18 12:11:54 +02:00
Wim Taymans
35bec2c7c4 context: also find monitor names 2020-08-18 12:11:24 +02:00
Wim Taymans
fa66bf8187 pulse: use device.api property to mark HARDWARE
Check if there is a device.api property on the sink/source and
if there is, mark the sink/source as a hardware device.
2020-08-17 20:57:32 +02:00
Wim Taymans
21e7c77e5e pulse: add symbol to check for PipeWire lib 2020-08-17 20:07:04 +02:00
Wim Taymans
3174e8b69e media-session: fix spelling mistake 2020-08-17 19:30:26 +02:00
Emmanuel Gil Peyrot
14fdf07e8f Run codespell on the entire codebase
This tool detects and fixes common English spelling mistakes, with
generally very few mistakes.

Here is the command I used to generate this commit.  There were a few
changes that had to be done manually, and of course adding the ignore
file:
```shell
codespell -I .codespell-ignore -x .codespell-ignore -w
```

I didn’t add it to the CI, but this would be a good place for it.
2020-08-17 17:16:31 +00:00
Wim Taymans
688a1ab082 media-session: add module to restore stream settings 2020-08-17 17:55:20 +02:00
Wim Taymans
6b7928aee5 media-session: only debug param when loglevel set 2020-08-17 17:52:25 +02:00
Wim Taymans
28bb212630 policy-node: improve move
Don't try to do work when not needed
2020-08-17 17:50:42 +02:00
Wim Taymans
f9a5053c73 media-session: improve cleanup in some modules 2020-08-17 17:50:15 +02:00
Wim Taymans
451fee2208 pulse: implement some more extensions
Most just return nothing or say that the extension is not supported.
Remove some warnings, they should show up in the log from setting
the error in the context.
2020-08-17 17:40:34 +02:00
Wim Taymans
62cea9c6d5 pulse: implement some more methods
Makes paman work
2020-08-17 17:22:14 +02:00
Wim Taymans
e544f82004 Revert "default-profile: keep a restore and save list"
This reverts commit de71618b99.

Doesn't work when the device is removed and added again.
2020-08-17 16:04:22 +02:00
Wim Taymans
d337abf690 media-session: escape and unescape keys when saving
So that we can allow space in the keys.
2020-08-17 12:12:11 +02:00
Wim Taymans
de71618b99 default-profile: keep a restore and save list
Load the settings into the restore list, when we see a device and it's
in the restore list, restore the profile and remove from restore list.
All updates to profiles go into the save list and it is then saved.
2020-08-17 11:48:52 +02:00
Wim Taymans
03f1dfcf99 acp: handle unset profile
The active profile is set to -1 initially, don't try to do anything
with the profile if it is invalid.

See rhbz#1868332
2020-08-17 11:33:17 +02:00
Wim Taymans
48a7e83fab media-session: add module to restore route volumes 2020-08-17 11:17:21 +02:00
Wim Taymans
31a3fab554 media-session: use name from Profile param 2020-08-17 11:15:44 +02:00
Wim Taymans
05416b497c media-session: improve property save/load
Allow spaces in the property values.
2020-08-17 11:10:16 +02:00
Wim Taymans
dadb3a884d profile: refactor code to make EnumProfile and Profile params
Use the same code to enumerate the profiles and the current profile,
this makes sure we have all info in the Profile param as well and
don't need to do a lookup in the EnumProfile.
2020-08-17 11:08:26 +02:00