Commit graph

6339 commits

Author SHA1 Message Date
Peter Hutterer b758afbc22 ci: abstract the default build options into a variable
This enables us to have build jobs that set custom meson options instead of
always relying on the default set.
2021-04-14 11:04:03 +00:00
Peter Hutterer 6eb4114238 meson: fix handling of the alsa option
Option 'pipewire-alsa' is a meson feature and defaults to 'auto'. This is
different to 'disabled', so on systems where alsa's deps weren't available
we would still end up trying to build. Switch to checking alsa_dep.found()
instead.
2021-04-14 09:59:06 +10: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
jasker5183 5c92928eab Add No Color #2 2021-04-12 13:05:57 +00:00
jasker5183 1e3bbfbbc6 Add No Color 2021-04-12 12:52:12 +00: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 20e383cea7 v4l2: remove device if inotify reports it's no longer accessible 2021-04-11 16:38:10 +00:00
Pauli Virtanen bf3b5d4286 alsa: remove device if inotify reports it's no longer accessible
When the session becomes inactive (eg. user on active seat switched),
udev may make devices inaccessible.  In this case, pipewire should give
up the devices and close their open file descriptors.
2021-04-11 16:38:10 +00:00
Pauli Virtanen 277a9a2577 bluez5: retry initial HFP codec selection after a timeout
In case headset fails to reply with AT+BCS to the codec selection
following AT+CMER, try to retry the codec selection, and if it still
fails, assume the headset is configured for CVSD.
2021-04-11 16:34:33 +00:00
Pauli Virtanen 87e06783d1 bluez5: more cleanup on impl_clear
Remove dbus filters and close the dbus connection.  Closing the
connection lets BlueZ to clean up, so we don't call its unregistration
API.
2021-04-10 23:07:51 +03: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
Pauli Virtanen 87aa18edb1 bluez5: free rfcomm when device is freed
Avoids use-after-free if device gets freed before the corresponding
rfcomm.
2021-04-10 15:47:46 +00: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
Huang-Huang Bao 4292e8fe7e
a2dp: set marker bit on AAC header 2021-04-10 04:51:16 +08:00
Huang-Huang Bao b874362c8e
a2dp: don't reset buffer on EAGAIN
Allow it to resend packet until next port data is received.
2021-04-10 04:50:34 +08: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
Wim Taymans 5d20f50df8 pulse-server: use the right config property 2021-04-09 11:45:06 +02:00
Wim Taymans 8251dc11cc spa: add type mappings for F32 and F32OE
so that we can refer to the native float32 format with F32 and the
other endian one with F32OE.
2021-04-09 11:38:54 +02:00
Wim Taymans 44e6e7f5c8 pulse-server: use PipeWire format and channel names
Use the PipeWire format and channel names in the config to avoid
confusion.
2021-04-09 11:30:57 +02:00
Wim Taymans b305f57e4d pulse-server: make sample format and channel_map configurable
Add an entry in the config file for default format and channel map.
Use the defaults in the server_info request
Use the defaults for the default channels and map in the modules.
2021-04-09 11:12:13 +02:00
Wim Taymans 877309bfbe use priority.session to select the default sink/source
priority.session is meant to be used to set routing priorities.

priority.driver is meant to be used by the scheduler to select what
nodes is best for driving the graph. This usually depends on the
hardware quality and the use case (Pro Audio devices are likely
to be used as driving the graph).

See #1028
2021-04-08 17:48:13 +02:00
Frédéric Danis 136511fbc8 bluez5: backend-ofono: Enable SCO deferred socket
The incoming SCO socket should be first read to authorize the connection.
2021-04-08 14:18:17 +00:00
Wim Taymans 2e18d8d005 module-loopback: fix connecting to the .monitor source
When a pulseaudio clients asks to be connected to a monitor of a sink
we need to specify the sink to the session manager as the target.

Fixes #1024
2021-04-08 16:02:28 +02:00
Wim Taymans 9019edec31 pw-link: improve unlink
When we only have one argument, just check the link id and if that
fails don't try to check the second argument because we would crash.
2021-04-08 15:32:06 +02:00
Wim Taymans 1b29531336 pw-link: make it possible to use ids
Make it possible to link/unlink using port ids
Make it possible to unlink using the link id
2021-04-08 13:09:51 +02:00
Wim Taymans 40194833ce pw-link: add option to print ids
Add an option to print the object ids
Improve monitor output
2021-04-08 12:54:53 +02:00
Wim Taymans a296007ed9 pw-link: implement monitor 2021-04-08 12:08:04 +02:00
Wim Taymans a57dae918a link-factory: improve the link factory
Make it possible to use object.id, node.name, node.nick,
node.description and object.path to select nodes and object.id,
port.name, port.alias and object.path to select ports when linking.

This makes it possible to use pw-cli creat-link to make nodes
without having to deal with the ids.
2021-04-08 11:06:44 +02:00
Wim Taymans 67a3f28bdf tools: add new pw-link tool
pw-link can be used to list, link and unlink ports.
2021-04-07 18:56:44 +02:00