Wim Taymans
d03f29eb66
pulse-server: fix channel_map check
...
We store the spa channel ids in the channel_map so convert them to
pulseaudio ids before comparing them to the max pulseaudio id.
2021-07-21 11:12:37 +02:00
Peter Hutterer
257fd83f65
Replace Pipewire with PipeWire for consistency
...
And set up a CI job to check for that.
2021-07-14 16:56:54 +10:00
Arun Raghavan
3bde823e74
pipewire-pulse: Fix media.class setting on pipe sink/source
...
Fixes: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1407
2021-07-12 01:31:58 -04:00
Wim Taymans
33e07cc984
pipewire-pulse: don't republish when object changes
...
Ignore changes to the object. Otherwise, we would remove and publish
the device again for each volume change.
Fixes #1406
2021-07-07 17:38:17 +02:00
Wim Taymans
8184d4576a
handle snprintf errors better
2021-07-06 17:56:04 +02:00
Wim Taymans
d88e8edd11
avoid shadowing arguments
2021-07-06 17:55:16 +02:00
Wim Taymans
d14c383811
pulse-server: silence UNDERFLOW warning to info
...
Creating underflows is standard behaviour for many clients. PulseAudio
does not warn about this so we should not either.
Fixes #910
2021-07-03 21:14:48 +02:00
Wim Taymans
64a25110dc
pulse-server: move quirks to a json blob
...
Make the quirks table as a json blob so that we can move it
out when we need to.
2021-06-30 18:10:41 +02:00
Wim Taymans
900cb596d3
pipewire-pulse: implement simple quirk database
...
Add a simple quirks table.
Forces S16 formats for teams sink and source info.
Forces removal of the DONT_MOVE flag for capture streams for firefox.
See #838 and #1363
2021-06-30 17:17:36 +02:00
Barnabás Pőcze
f5d51162c4
treewide: mark things static and const
...
Mark some structures, arrays static/const at various places.
In some cases this prevents unnecessary initialization
when a function is entered.
All in all, the text segments across all shared
libraries are reduced by about 2 KiB. However,
the total size increases by about 2 KiB as well.
2021-06-30 14:44:08 +02:00
Barnabás Pőcze
73ea24a356
pulse-server: module-pipe-source: don't queue partial samples
...
If the number of bytes read is not a multiple of the stride,
then partial samples may be queued. Avoid that by storing the
last partial sample (if any) in a separate buffer,
and only queue full samples.
2021-06-30 14:44:08 +02:00
Barnabás Pőcze
8a61374592
pulse-server: module-pipe-source: set error code when entity is not pipe
...
Previously, the code did not set any error code, leaving res = 0,
when the file existed but it wasn't a pipe. This resulted in no
status code being returned to the client.
2021-06-30 14:44:08 +02:00
Barnabás Pőcze
9076e3e80b
pulse-server: module-pipe-source: do not unlink fifo if it was there
...
If the module did not create the FIFO, then it should not remove it.
2021-06-30 14:44:08 +02:00
Barnabás Pőcze
7cb7d8b15b
pulse-server: module-zeroconf-publish: handle uname() failure gracefully
...
Only add the "uname=..." entry to the Avahi string list
if `uname()` succeeds.
2021-06-30 14:44:08 +02:00
Barnabás Pőcze
9994a763d6
pulse-server: module-zeroconf-publish: remove static
...
`sysname` need not be static since `avahi_string_list_add_pair()`
creates a copy, and no other parts of the code have reference to
`sysname` that would require static lifetime.
Furthermore, do not hardcode the size of the array.
2021-06-30 14:44:08 +02:00
Wim Taymans
c4971d17c4
keys: add node.link-group property
...
The node.link-group property marks streams that are internally linked
together in some way. It is used to relate the input and output streams
of some of the module streams.
2021-06-29 13:49:55 +02:00
Wim Taymans
c68a7cd603
pulse-server: silence the ENOTSUP warnings
...
To stop the device restore extension warnings.
2021-06-28 12:43:31 +02:00
Sanchayan Maity
d8b5ab13a5
modules: Allow roc source/sink to be used as native modules
...
Move the implementation of roc source and sink so that they can be used
as pipewire native modules and make the pulse module implementation use
those.
2021-06-28 12:21:34 +05:30
Pauli Virtanen
2b515b5e50
dbus: keep a ref to DBusConnection if reconnecting is not handled
...
Several places in the code don't handle reconnecting DBus connections
yet. In those cases, a ref to the DBusConnection handle needs to be
kept, so that there's no use-after-free if it gets freed by spa_dbus
if the connection is broken.
Adjust spa_dbus so that others keeping additional refs is safe.
2021-06-26 16:11:40 +03:00
Evgeniy Khramtsov
cb6dbd165a
pulse-server: move defines to the common utils.h
...
Previous commit was an older version that got accidentally pushed.
Improves: 3ba62287ad
2021-06-25 19:08:26 +03:00
Evgeniy Khramtsov
3ba62287ad
pulse-server: add missing definitions for FreeBSD
...
Define struct statfs and LOCAL_PEERCRED for FreeBSD.
Fixes: 62832609c1
2021-06-25 18:53:02 +03:00
Wim Taymans
0c14ec769f
pulse-server: improve sink/source state
...
When a sink is RUNNING but there is nothing linked to the input it must
be the monitor that is keeping it active, report IDLE for the sink in
that case.
When a source is RUNNING but there is nothing linked to the output it
must be the sink part that is keeping it active, report IDLE for the
source.
Fixes #1345
2021-06-25 13:23:22 +02:00
Peter Hutterer
0880ff9a84
spa: add spa_strendswith (copy from protocol-pulse)
...
Useful function, let's make it generally available.
2021-06-25 08:42:24 +00:00
Barnabás Pőcze
887876bea8
pulse-server: add missing forward declarations
...
Part of !776 .
2021-06-25 03:24:00 +02:00
Barnabás Pőcze
378ba0d51b
pulse-server: clean up includes
...
* use <> for pipewire includes
* add missing includes
* move "manager.h"
Part of !776 .
2021-06-25 03:23:54 +02:00
Barnabás Pőcze
0e48ae9f50
pulse-server: remove unnecessary struct member and includes
...
Part of !776 .
2021-06-25 03:23:51 +02:00
Barnabás Pőcze
480fcbbba9
pulse-server: module-zeroconf-publish: use <> for system include
...
Part of !776 .
2021-06-25 03:23:45 +02:00
Barnabás Pőcze
e966b1d6f2
pulse-server: split out message-handler
...
Part of !776 .
2021-06-25 03:23:41 +02:00
Barnabás Pőcze
c9f5deb81d
pulse-server: split out module handling
...
Part of !776 .
2021-06-25 03:23:37 +02:00
Barnabás Pőcze
c49ae39888
pulse-server: split out extension handling
...
Part of !776 .
2021-06-25 03:23:35 +02:00
Barnabás Pőcze
d366487116
pulse-server: split out server creation and socket handling
...
Part of !776 .
2021-06-25 03:23:32 +02:00
Barnabás Pőcze
49d31ea0af
pulse-server: split out reply, operation, client, stream
...
Part of !776 .
2021-06-25 03:23:27 +02:00
Barnabás Pőcze
b2ec1fb60a
pulse-server: split out message handling
...
Part of !776 .
2021-06-25 03:23:24 +02:00
Barnabás Pőcze
5318c0eeca
pulse-server: split out media roles
...
Part of !776 .
2021-06-25 03:23:20 +02:00
Barnabás Pőcze
62832609c1
pulse-server: split out utils
...
Part of !776 .
2021-06-25 03:23:18 +02:00
Barnabás Pőcze
8a0f52ab78
pulse-server: split out pending-sample
...
Part of !776 .
2021-06-25 03:23:15 +02:00
Barnabás Pőcze
bee97b09e2
pulse-server: split out sample, sample-play
...
Part of !776 .
2021-06-25 03:23:12 +02:00
Barnabás Pőcze
bc4370e195
pulse-server: split out D-Bus parts
...
Part of !776 .
2021-06-25 03:23:09 +02:00
Barnabás Pőcze
acffe1b90b
pulse-server: split out "collect" functions
...
Part of !776 .
2021-06-25 03:23:04 +02:00
Barnabás Pőcze
4496c33751
pulse-server: split out volume handling
...
Part of !776 .
2021-06-25 03:23:01 +02:00
Barnabás Pőcze
43e2c64307
pulse-server: split out format handling
...
Part of !776 .
2021-06-25 03:22:59 +02:00
Barnabás Pőcze
8ac60cb0ae
pulse-server: split out commands
...
Part of !776 .
2021-06-25 03:22:56 +02:00
Barnabás Pőcze
738b764253
pulse-server: do not define NAME in header
...
Part of !776 .
2021-06-25 03:22:54 +02:00
Barnabás Pőcze
8208e60b33
pulse-server: add include guard to defs.h
...
Part of !776 .
2021-06-25 03:21:38 +02:00
Sanchayan Maity
badb76147f
module-protocol-pulse: Add module-roc-source
2021-06-24 11:04:23 +00:00
Sanchayan Maity
e60498df51
module-protocol-pulse: Add module-roc-sink
2021-06-24 11:04:23 +00:00
Wim Taymans
f85b0bfd16
pulse-server: Avoid overflow in stream read/write index
...
Keep separate counters for the ringbuffer and stream read/write
indexes.
The ringbuffer has 32 bits indexes while the pulse server is required
to keep 64 bit read/write indexes.
Also handle invalid seek flags.
Fixes #1331
2021-06-21 10:50:23 +02:00
Barnabás Pőcze
80e3da9b01
pulse-server: add missing minus sign
...
Noticed by @QuLogic.
Fixes: 87c00a6f00 ("pulse-server: add missing EWOULDBLOCK check")
2021-06-19 17:28:03 +00:00
George Kiagiadakis
59407d2f08
includes: update all references to extensions to point to pipewire/extensions
...
This also brings the advantage that all tools, examples, modules, components
can also be compiled standalone out-of-tree using libpipewire from the system
2021-06-18 17:54:18 +03:00
Wim Taymans
bbbc79647f
pulse-server: return INTERNAL error for ENFILE/EMFILE
2021-06-18 15:56:55 +02:00