Commit graph

176 commits

Author SHA1 Message Date
Wim Taymans
63dbf7b7b7 context: connect to given server 2020-07-23 20:12:10 +02:00
Wim Taymans
266e1301d2 use id to store default sink/source
This is easier to handle in general and we should not use the name
as a unique id. If the session manager wants to save things, it can
use whatever fields it wants from the object to create a unique
persistent name.
2020-07-23 11:59:13 +02:00
Wim Taymans
cc0727e62f pulse: remove useless leaked property 2020-07-21 17:39:08 +02:00
Wim Taymans
2909786eb2 stream: put target string in node.target 2020-07-20 16:27:50 +02:00
Wim Taymans
ff876bf58e introspect: set metadata type as well 2020-07-20 14:40:34 +02:00
Wim Taymans
5d0a1c4838 stream: remove wrong warning 2020-07-20 13:27:25 +02:00
Wim Taymans
62f7da880a pulse: clean up introspection
Make sure we always first update the registry.
Call callbacks with the right return value and set the context
error on errors correctly.
Remove some old code.
2020-07-20 13:13:22 +02:00
Wim Taymans
246ad5fb37 introspect: set target node as property
Use the metadata to tag streams with the desired target node.
2020-07-20 11:26:32 +02:00
Wim Taymans
ac97175380 pulse: don't try to do set_param when not writable 2020-07-16 13:25:03 +02:00
Wim Taymans
bf9b58e1f5 pulse: emit server change events when default sink/source change 2020-07-08 17:10:27 +02:00
Wim Taymans
6d41e17ca3 pulse: improve name of monitors 2020-07-08 16:10:45 +02:00
Wim Taymans
4de3403c99 metadata: free item value as well 2020-07-07 20:25:01 +02:00
Wim Taymans
ee54cb96aa pulse: use metadata to store default source/sink
The metadata is implemented by the session manager and it can decide
what to do when the defaults change. It can also choose to save
(some of) the metadata to a database.

The metadata is also shared between applications so that changes can
be picked up immediately.
2020-07-07 17:09:46 +02:00
Wim Taymans
2991a814cd pulse: wait for READY before calling callbacks 2020-07-07 13:42:56 +02:00
Wim Taymans
e030445e49 acp: add volume base and step
Add a READONLY property flag to makr properties READONLY
Set the base_volume and volume_step in the acp device
Send the base volume and step as REAONLY properties. Use these
in pulse layer.
2020-07-07 13:12:57 +02:00
Wim Taymans
cf8db93cd4 pod: add HARDWARE flag to spa_pod_prop
Add HARDWARE flag to mark a property that does some hardware control.
Mark the device volume/mute property as HARDWARE or not.
Use the HARDWARE property in pulse to set the right flags.
2020-07-06 17:46:32 +02:00
Wim Taymans
5c6247daef internal: improve assert
Pulse just logs to the debug log for a return_val_if_fail
2020-07-03 17:32:20 +02:00
Wim Taymans
d3748ef254 introspect: fix default source/sink 2020-07-01 15:38:42 +02:00
Wim Taymans
f30a8f6895 context: fix context_id, use the client bound id 2020-07-01 15:38:36 +02:00
Wim Taymans
813e2d22a6 context: fix sorted insert 2020-07-01 15:38:29 +02:00
Wim Taymans
34775b7577 context: use different variable to avoid confusion 2020-07-01 15:38:24 +02:00
Wim Taymans
f126501f83 context: don't enum profile/route when one is pending 2020-07-01 15:38:17 +02:00
Wim Taymans
dc7868a476 pulse: control volume on device or node
Send the mute and volume values in the route param when hw volume
is available.
Check if the route has volume/mute and then use that to control the
volume instead of them node volume.
2020-07-01 15:36:50 +02:00
Wim Taymans
9ad2732405 pulse: handle volume and mute with the Route params
Update the device volume with properties from the Route param is
available.
Rework pulse a little to make sure we have all the globals ready
before performing the operation.
Update the volume/mute in the device route
2020-07-01 15:31:19 +02:00
Wim Taymans
4d7d9484e6 pulse: use route param to set current active ports 2020-07-01 15:24:50 +02:00
Wim Taymans
2bffb3561f pulse: handle error from volume set 2020-07-01 15:20:32 +02:00
Wim Taymans
ebd8695345 pulse: use route param to get/set current active routes 2020-07-01 14:02:59 +02:00
Wim Taymans
1277e6cded context: update the Profiles and Routes in the card
Update the Profile and Route information directly into the card
info. Use this info to fill the port info for the sink and sources.
2020-07-01 13:57:14 +02:00
Wim Taymans
42cc30e1ee pulse: use EnumRoute to collect and report port info 2020-07-01 13:52:25 +02:00
Wim Taymans
698509ef55 alsa: set classes in the profile
parse classes in the pulse layer
2020-07-01 13:39:10 +02:00
Wim Taymans
03cef06dd2 pulse: improve introspect of profile availability 2020-07-01 13:27:20 +02:00
Wim Taymans
f79f0de681 introspect: improve card info 2020-07-01 13:24:57 +02:00
Wim Taymans
5feedbfd42 context: ensure the registry exists
Make sure we are watching the registry before we try to enumerate
objects.
When we wait for new object info, resync the pending operations
because they might depend on the info.
2020-06-24 19:36:47 +02:00
Wim Taymans
d560499054 stream: handle NULL context 2020-06-24 12:52:50 +02:00
George Kiagiadakis
715be5dfe7 pulse: fix counter while populating card_info profiles 2020-06-18 10:01:47 +02:00
Wim Taymans
ba57de9b81 pulse: fix size calculation 2020-06-17 16:56:40 +02:00
George Kiagiadakis
9c8279aa6e pulse: fix pa_card_info.profiles2 array to be NULL terminated
profiles2 is meant to be NULL terminated, according to its documentation
Fixes a crash in pavucontrol-qt
2020-06-17 17:17:51 +03:00
Wim Taymans
64fc8dda20 stream: check for NULL context
If a stream was killed, the context is cleared. Disconnecting a killed
stream should not crash but return BADSTATE.
2020-06-08 11:58:32 +02:00
Wim Taymans
65798ca566 context: only set TERMINATED when -EPIPE
Other errors don't cause the connection to terminate.
2020-06-08 11:57:51 +02:00
Simon McVittie
e493be3844 scripts: Use special ${LIB} token for architecture-independence
On GNU/Linux systems, the literal string '${LIB}' in dynamic linker
paths expands to "lib", a biarch libQUAL directory such as "lib64", or
a Debian-style multiarch directory such as "lib/x86_64-linux-gnu".
If we're installing libraries to such a directory, and we have both
word-sizes' compatibility libraries available, then pw-pulse can
use LD_LIBRARY_PATH='/usr/${LIB}/pipewire-0.3/pulse' to make both
i386 and x86_64 programs load the correct version.

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-06-05 13:40:50 +00:00
Simon McVittie
96eb6e4df8 scripts: Don't add an empty entry to LD_LIBRARY_PATH
LD_LIBRARY_PATH="/path/to/lib:" is interpreted as equivalent to
LD_LIBRARY_PATH="/path/to/lib:.", loading libraries from the current
working directory, which could lead to malicious libraries being loaded
if the current working directory is untrusted. To avoid this, only add
the current LD_LIBRARY_PATH to the new LD_LIBRARY_PATH if it is
actually set.

This commit also single-quotes the interpolated @VARIABLES@ so that
their values can contain shell special characters (other than single
quotes).

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-06-05 13:40:50 +00:00
Wim Taymans
ee5d6b4451 pulse: add more checks 2020-06-05 12:43:26 +02:00
Martin Koch
2ae621c975 fix warning: passing argument 1 of ‘pa_proplist_iterate’ discards ‘const’ qualifier
in pipewire-pulseaudio/src/proplist.c
	for pulseaudio version < 13.0

Signed-off-by: Martin Koch <martin.koch@ese.de>
2020-06-04 18:11:52 +00:00
Wim Taymans
549431e8f3 pulse: fix leaks 2020-06-04 18:26:36 +02:00
Wim Taymans
c546167ad3 require meson 0.49 2020-05-20 15:26:35 +02:00
Wim Taymans
cab645d155 stream: we can get the index before we are ready 2020-05-12 17:50:24 +02:00
Wim Taymans
a7d8e805ac stream: do some extra checks 2020-05-11 14:16:19 +02:00
Wim Taymans
df8ad59e37 stream: fix writable size when no timing info received
Always report that we can write a buffer, even when we have
not yet received timing info. Fixes stalled spotify.

Fixes #238
2020-05-11 11:30:24 +02:00
Wim Taymans
e6ccc72feb fix compiler warnings 2020-05-08 20:40:02 +02:00
Wim Taymans
4e44da6c4b pulse: hide the pa_proplist implementation
Hide the proplist implementation.
Add some more methods to update the proplist
Make sure our integration functions only use exported symbols
so that they even work against the original pulse implementations
in case they are loaded first.

Fixes #236
2020-05-08 14:17:45 +02:00