Commit graph

3436 commits

Author SHA1 Message Date
Wim Taymans
0e91233569 impl-client: fix crash when updating permissions
After ensure_permissions, the default permission might be moved to a
different memory location. Get the new default permission in case it
moved.
2021-04-20 17:56:28 +02:00
Wim Taymans
648c9b432c pulse-server: set monitor.channel-volumes=true by default
Make a null-sink with monitor.channel-volumes=true by default if not
defined otherwise. This ensures the volume of the null-sink is
always transfered to the monitor ports.

Also only set the object.linger flag when undefined.
2021-04-20 09:36:14 +02:00
Peter Hutterer
83ed03d4cf Remove .gitignore files in subdirectories
With meson we no longer have generated files messing up the tree, so we no
longer need these files.
2021-04-20 07:10:15 +00:00
Wim Taymans
575163e644 pulse-server: use args_to_audioinfo to parse channels 2021-04-19 16:49:25 +02:00
Wim Taymans
649d21ac02 pipewire-pulse: improve channels and channel_map parsing
If we have channels and channelmap, make sure they match.
If we have only channel_map, use this to derive channels instead of
taking the default number of channels and then ending up with a
mismatch.
If we have only channels, use this to generate a channelmap from
predefined maps or just unknown channels instead of taking the default
channel map.
If neither channels or channelmap is defined, use the defaults.
2021-04-19 16:41:14 +02:00
Wim Taymans
66e37f6bb7 pw-cli: free properties in create_ functions 2021-04-19 16:37:05 +02:00
Wim Taymans
50bae0a209 pipewire: free i18n domain in deinit() 2021-04-19 16:34:49 +02:00
Wim Taymans
a9b8aa27c1 media-session: improve bluetooth icon name
Move the icon we get from bluez to a separate property, it is not
a good icon to show.
Copy form factor from device to node properties.
Set device.bus in the device properties and copy it to the node
properties.
Use form factor and bus to make a nice icon-name for the node and
device.

Fixes #1064
2021-04-19 13:21:32 +02:00
Wim Taymans
f64b62c3c4 media-session: improve alsa icon name 2021-04-19 12:32:04 +02:00
Wim Taymans
69666f937d pipewire: fix ngettext method name 2021-04-19 11:31:58 +02:00
Pauli Virtanen
b5f75c3ec6 pipewire: add missing header for setlocale 2021-04-17 13:19:14 +00:00
Huang-Huang Bao
edee633f96
bluez5: add property to enable hardware volume control 2021-04-17 19:35:46 +08:00
Wim Taymans
f27ad659f8 spa: add property to force VM
Also add PIPEWIRE_VM to force a VM type.
2021-04-16 16:50:34 +02:00
Frédéric Danis
07c9dbbffa bluez-monitor: Propagate the msbc-support global property to device
msbc-support global property can be used for all backends, or for native
backend overloaded on a per device rule.
2021-04-16 11:05:54 +00:00
Arun Raghavan
74140abada pulse-server: Factor out module code to compile independently
This starts breaking up the giant monolith that is the pulse-server.c
code into more manageable chunks by trying to split the module code into
individual compilation units.
2021-04-15 19:37:15 -04:00
Arun Raghavan
abf193452c pulse-server: Factor out sample spec/channel parsing from modargs
This should be more broadly useful for other modules.
2021-04-15 15:55:51 -04:00
Wim Taymans
036c54b043 Add i18n support for some more user-visible strings 2021-04-15 17:56:40 +02:00
Wim Taymans
5f09e302a9 pipewire: add i18n initialization
Initialize the i18n support.
Add two methods to call the i18n interface.
Add defines for _() and N_() for translations.
2021-04-15 17:56:40 +02:00
Wim Taymans
646842098c pipewire: add functions to get and set textdomain 2021-04-15 17:56:40 +02:00
Peter Hutterer
223f20709d meson: replace join_paths(a, b) with a / b
More readable and from the meson reference manual:
(since 0.49.0) Using the/ operator on strings is equivalent to calling join_paths.
2021-04-15 06:57:00 +00:00
Wim Taymans
0b5741e725 pipewire: add i18n interface to support
Implement the i18n interface and add it to support.
2021-04-14 18:03:46 +02:00
George Kiagiadakis
ac91383cf5 pipewiresink: stop bufferpool flushing after resuming from pause
See #1048
2021-04-14 13:33:01 +00:00
Wim Taymans
60b405fdfd pulse-server: only send 32 channels max to a client
Limit the amount of channels we send to a client to 32 because this
is the pulseaudio limit.

This means that only the first 32 channels are accessible from the
pulseaudio API.

Fixes #1033
2021-04-14 15:29:46 +02:00
Wim Taymans
8bf7ce5fa4 pulse-server: fix channels property
Setting the channel property should create as many channels as
requested, not just the number from the default channel map.

If no channel_map is set, use the default one if the channels match
or use one with unknown channel layout otherwise.

Check the configured channels against the channel map and error
if there is a mismatch.
2021-04-14 15:29:46 +02:00
Wim Taymans
23854539fe pw-dump: reparse and format JSON metadata values
Reparse the metadata value as json and dump it. This ensures the JSON
is valid and that the colors are applied properly.
2021-04-13 20:59:42 +02:00
Wim Taymans
bded2a02a0 pw-dump: output Spa:String:JSON values as literal
Don't escape the Spa:String:JSON types in the metadata as it is
supposed to be valid JSON that can be output directly. We might want
to reparse and reformat it later to be sure.
2021-04-13 19:03:06 +02:00
Wim Taymans
d8e3f9b801 context: fall back to loading the configured PIPEWIRE_CONF_NAME
First try to load the PIPEWIRE_CONF_NAME environment file, then
fall back to the application configured value (instead of client.conf)
and then fall back to client.conf.
2021-04-13 19:01:32 +02:00
jasker5183
99eeec5854 Add Version Info to v4l2-monitor.conf 2021-04-12 15:46:35 +00:00
jasker5183
508aa2c156 Add Version Info to media-session.conf + Formatting 2021-04-12 15:44:27 +00:00
jasker5183
f328a92b9e Add Version Info to bluez-monitor.conf 2021-04-12 15:42:38 +00:00
jasker5183
54ac9d2378 Add Version Info to alsa-monitor.conf 2021-04-12 15:41:12 +00:00
jasker5183
ba61d5823b Update pipewire-pulse.conf.in Formatting 2021-04-12 15:33:39 +00:00
jasker5183
4767bbc169 Update pipewire.conf.in Formatting 2021-04-12 15:30:03 +00:00
jasker5183
f36f464d7f Update client.conf.in Formatting 2021-04-12 15:26:46 +00:00
Wim Taymans
22ffed456c pulse-server: improve event handling
Do the check for the client event mask in only one place where we
are actually going to send the event. This avoids sending events to
clients that did not register them.

Rework some of the event handling when the manager emit an
add/remove/change event. Make it possible to send multiple events, like
when a sink changes, also emit a change for the monitor.

See #1042
2021-04-12 17:19:15 +02:00
Wim Taymans
af6e212817 pulse-server: add simple protocol module
Fixes #954
2021-04-12 16:17:06 +02:00
Wim Taymans
2a99e7afa8 Add simple protocol
The simple protocol listens on a socket, creates a new pw_client for
each connected client and reads/writes raw audio bytes on the
socket. Incomming bytes are copied to a playback stream, outgoing
bytes are copied from a capture pw_stream.

Fixes #954
2021-04-12 13:24:49 +02:00
Pauli Virtanen
1c550d850b media-session: stop/start bluez monitor when seat inactive/active
When current user is no longer active on the seat, unregister the bluez
handler. This disconnects all bluez devices.

When the user becomes active on a seat, start bluez monitor again.
This will also reconnect devices.
2021-04-10 21:53:29 +03:00
Pauli Virtanen
0e80a2497a media-session: add logind seat status support 2021-04-10 21:53:29 +03:00
Huang-Huang Bao
0beb6bfc6c
bluez-monitor: improve documentation for 'bluez5.msbc-support', set values of some properties in comment to default 2021-04-10 17:56:50 +08:00
Wim Taymans
d8f86ca6e5 pulse-server: make name in create_server const
constify the name in create_server() and make a copy of the name
were it is needed instead of modifying the argument in-place.
2021-04-10 11:22:41 +02:00
Wim Taymans
47bf30d734 pulse-server: create pid file only once
Only try to create the pid file once, not for every socket
we listen to.
2021-04-10 11:06:18 +02:00
Wim Taymans
225c9ebc2d pulse-server: limit the aux channels to 32
PulseAudio does not have more than 32 AUX channels so when we generate
them from unknown positions, make sure we wrap around.

See #1033
2021-04-09 19:20:46 +02:00
Wim Taymans
33ddd5f760 pulse-server: implement module-native-protocol-tcp
The module creates a tcp server on the given ip/port pair.
2021-04-09 18:27:30 +02:00
Wim Taymans
378f655a3d context: report ENOENT when a spa lib is not found 2021-04-09 17:26:22 +02:00
Wim Taymans
ca4b549472 pw-cli: handle properties without type info
Some properties don't have type info and then we want to skip
constructing the pod instead of crashing. This makes it possible to
cut and paste the output of pw-dump Route into pw-cli s <card> Route,
for example.
2021-04-09 16:14:50 +02:00
Wim Taymans
d57979517e pw-loopback: fix help text
The id in the help text is not supported
2021-04-09 15:56:00 +02:00
Wim Taymans
6217f20c04 pw-cli: allow param names in enum-params
So that "pw-cli e <object.id> Props" works
2021-04-09 15:55:04 +02:00
Wim Taymans
87706c7442 pw-cli: use more powerful pw_properties_new_string()
Remove our custom property parsing code and use
pw_properties_new_string() for more powerful syntax.
2021-04-09 15:53:33 +02:00
Wim Taymans
59ed07864d media-session: log info when loading monitor fails
Log info in all monitor plugins instead of an error.
2021-04-09 11:55:55 +02:00