Commit graph

7287 commits

Author SHA1 Message Date
Peter Hutterer 959d289bca ci: add a check for modules being linked correctly in the doc
A new module requires a \subpage entry in the respective parent page.
Check for that.
2021-09-07 07:52:45 +00:00
Wim Taymans 7e4d5b142f pulse-server: don't leak format info 2021-09-07 09:51:58 +02:00
Peter Hutterer 8bb0e340c7 protocol-pulse: fix two -Wformat-nonliteral warnings
For the stream group, we break into the three components we write out
and print those.

For the IPv6 address printing inside [], we can make this a condition on
the printf statement.
2021-09-07 08:57:28 +10:00
Peter Hutterer e55a5441b8 spa: silence two -Wformat-nonliteral warnings
In one we can duplicate the spa_asprintf call without real drawbacks.

The second one can be split up without losing details. Note that there
is another one in backend-native.c where splitting it up will make the
code harder to understand. The warning for that one remains.
2021-09-07 08:26:54 +10:00
Peter Hutterer 6a18272fed spa: mark the gettext wrappers with __attribute__((format_arg))
This removes the -Wformat-literal warnings for all _("some message")
calls. Remaining warnings are those where we pass in a custom buffer.
2021-09-07 08:26:10 +10:00
Pauli Virtanen b5ad37c7ac bluez5: make codec loading compatible with old conf files
Change codec factory names to api.codec.bluez5.*, so that they won't
conflict with old config file lib name rules for api.bluez5.*

Specify the fallback library name when loading the codecs, so that it
works without the rules in config files.
2021-09-06 18:04:35 +03:00
Wim Taymans 435de99428 Increase pod buffer size
The props of a 64 channel node are at least 2048 bytes long so make sure
we can build and filter them.

Fixes #1574
2021-09-06 15:09:28 +02:00
Wim Taymans f9d8bdb9b8 spa: improve param result handling
Check if we actually managed to add the param to the builder before we
try to deref it.
Use a safer deref that checks the sizes of the pod and builder.
2021-09-06 15:09:25 +02:00
Wim Taymans c54f64cd13 alsa: clean up rate matching code
Remove some useless fields.
Use macros for time<->rate conversions.
2021-09-06 12:55:06 +02:00
Peter Hutterer 8d741d6077 alsa-monitor: document this module in some detail 2021-09-06 07:29:28 +00:00
Peter Hutterer 7cb718833b alsa-monitor: reword the match rule comment in the config file
Each dictionary needs to fully match but out of the dicts we have, only
one needs to match to apply. Reword that for clarity.

Also document regex vs normal string comparison vs the magic null
string.
2021-09-06 07:29:28 +00:00
Peter Hutterer 6f9586bf54 media-session: use more descriptive names for parsing match rules
Easier to understand this way what is being passed around and where
we're at with the parsing.
2021-09-06 07:29:28 +00:00
Peter Hutterer 7d13c7750d doc: document the portal negotation process with graphs
This is a multi-step process involving 4 processes and two modules.
Let's add some graphs to make this slightly easier to comprehend for
those not familiar with how portals work.
2021-09-06 07:29:28 +00:00
Peter Hutterer 6b6f5f3659 doc: mention xdg-desktop-portal in the media-session access-portal module
Makes it slightly easier to connect the dots.
2021-09-06 07:29:28 +00:00
Peter Hutterer 55f01ae679 media-session: document the access-flatpak module 2021-09-06 07:29:28 +00:00
Peter Hutterer 83ed6e0be3 doc: swap two @ doxygen tags for the backslash ones 2021-09-06 07:29:28 +00:00
Peter Hutterer 08be841a9e doc: fix a doxygen undocumented parameter warning 2021-09-06 07:29:28 +00:00
Pauli Virtanen abc01083d4 context: fixup integer overflow 2021-09-05 06:26:58 +00:00
Pauli Virtanen 18dde01d87 bluez5: minor error handling etc. fixups 2021-09-05 06:26:58 +00:00
Wim Taymans 44f10330e8 alsa: remove AES0 settings
Remove this for now, we should only add this when actually sending
encoded formats.

Fixes #1570
2021-09-05 08:21:07 +02:00
Pauli Virtanen f85d3907ef bluez5: add a device to hw-volume blocklist 2021-09-03 19:09:16 +00:00
Pauli Virtanen 68e8846096 bluez5: update kernel version blocklist
Patch fixing ALT1 mSBC is in Linux 5.10.62, 5.13.14, 5.14.1, 5.15-rc
2021-09-03 19:09:16 +00:00
Pauli Virtanen 59d572de09 bluez5: split A2DP codecs to separate SPA plugins
Make easier to package A2DP codecs separately, by splitting each to a
separate SPA plugin.  Adjust the code to not use a global variable for
the codec list.

The A2DP SPA interface API is in the bluez5 private headers, and not
exposed in installed SPA headers, as it's too close to the
implementation.
2021-09-03 20:40:30 +03:00
Pauli Virtanen 3115775c02 context: add SPA plugin loader interface to support plugins 2021-09-03 20:12:28 +03:00
Pauli Virtanen 987282b376 spa/support: add plugin loader interface
Add a SPA interface for loading SPA plugins, so that plugins can request
the host to load other plugins.
2021-09-03 20:12:28 +03:00
Julian Bouzas 90371440b0 media-session: add alsa-no-dsp module
Instruct the policy to not configure audio adapter nodes in DSP mode. Instead,
Device nodes will always be configured in passthrough mode, and client nodes
will be configured in convert or passthrough mode depending on whether the
client format matches the device format or not.
2021-09-03 14:00:27 +00:00
Wim Taymans 699bfbc095 jack: improve lookup of removed objects
Keep the original type of the object around in the free list so that we
can still look it up.

Make most methods only find the still active object by checking if the
client matches.

Make some methods (jack_port_by_id() for example) also find the removed
objects for as long as they are in the cache and not overwritten.

This make carla and catia work better because they expect to access the
old object after it has been destroyed.

See #1531
2021-09-03 15:46:21 +02:00
Wim Taymans 2ce1dc113e jack: also find uuid for monitor nodes 2021-09-03 15:45:50 +02:00
Niklāvs Koļesņikovs 40cbcf2887 Meson: Update two pipewire.org URLs to HTTPS 2021-09-03 11:41:45 +00:00
Niklāvs Koļesņikovs e41187d643 man: move from xmltoman to rst2man
xmltoman looks dead and uses XML as well as pulls in a long list of
Perl dependencies. This replaces it with rst2man that has almost no
dependencies beyond Python, which is already required for the Meson
build system.

Naturally rst2man uses reStructuredText and the pages were rewritten
via regex and manual editing to be as close to original XML format
as possible. A few fixes and updates were done too. Most notably a
note was added to indicate that production deployments should not be
starting the session manager via pipewire.conf file.

There's three slight formatting issues/differences:
1. rst2man produces simpler footer.
2. "-f | --foo=value" confuses the parser and it fails to correctly
   add argument specific syntax highlighting to assignment value.
3. XML version had inconsistent use of <arg> and <opt> which has
   been partially addressed. But different manual pages still have
   their differences to what and how is highlighted.
2021-09-03 11:41:45 +00:00
Wim Taymans 91f1b44499 introspect: improve info updates
The current _info_update() methods will always reset the change_mask in
the new info structure.

This causes problems if multiple updates are applied to the info before
the rescan in the session manager of pulse-server is excuted. The first
update is cleared and this causes the session manager to sometimes miss
the state changes of nodes and fail to suspend them.

Add a new method to merge with optional reset of the various
introspection info structures. We can use this instead and simply
accumulate all changes until the rescan code has processed all changes.
2021-09-03 13:41:14 +02:00
columbarius 63521c1063 doc: add section about v4l2 dmabuf sharing 2021-09-03 09:34:26 +00:00
Simon Ser 7a618390ec doc: add warning about mapping DMA-BUFs
A list of reasons why DMA-BUFs have to be treated specially. This
should make it clearer why mmaping DMA-BUFs should be avoided and hint
clients on how treat them correctly

Co-authored-by: columbarius <co1umbarius@protonmail.com>
2021-09-03 09:34:26 +00:00
columbarius 112d50c8b9 doc: clarify format negotiation
Describing different behaviour for modifier-less and modifier-aware case
and how a EnumFormat with modifier should be fixated. Also adding a Note
about `SPA_PARAM_BUFFERS_blocks`, which is important for multiplane
DMA-BUFS.
2021-09-03 09:34:26 +00:00
Wim Taymans a5e37540ff impl-node: recalc graph when destroying a node with driver
When we destroy a node that still has another driver, recalculate the
graph so that the driver has a chance to idle.

This can happen when we add an inactive node to the driver and then
destroy the node, like for jack clients.
2021-09-03 11:12:51 +02:00
Wim Taymans 034dd00813 alsa-seq: use better clock rate matching
Match the elapsed queue time against the elapsed graph time.
2021-09-02 18:37:27 +02:00
Wim Taymans c2c7dd040a alsa: CLAMP the error just in case something goes wrong.
The calculation of the elapsed time is actually not a good idea because
it becomes larger and larger and a tiny change in the rate could result
in a large difference that would make things fail quickly.

Until that is fixed, this patch will need to do..
2021-09-02 17:31:02 +02:00
Wim Taymans 5fa1ae99ae media-session: implement passthrough for S/PDIF
Make sure we always suspend before reconfiguring a device.

Put the node and the device in passthrough mode when requested. Move
back to DSP mode after the node is unlinked.

Parse the exclusive flag of a stream once when the node info changes.

Use a new variable 'passthrough' to remember the current state of
a node and the peer.

Parse non-raw formats as well.

Check if two nodes can passthrough by intersecting the EnumFormat
params. If it is possible, configure the node for passthrough.

Don't try to reconnect nodes in passthrough.

Fail if we can't find a node compatible with passthrough.

See #629
2021-09-02 16:12:03 +02:00
Wim Taymans ef795cc2e3 pulse-server: add quirk for skypeforlinux
Or else it refuses to show the output devices in some cases for some
reason.
2021-09-02 15:22:27 +02:00
Wim Taymans e5886b7bc6 alsa: pass POD_Long as (long) varargs 2021-09-02 15:17:36 +02:00
Wim Taymans 99e6c77525 alsa: improve device name construction
Get the ucm prefix only once, when we open the UCM card and then
use it for all devices using the card.

Construct the device name right before we open it with the ucm prefix
and possibly the AES flags instead of messing with the property.
2021-09-02 12:35:58 +02:00
Wim Taymans 9052b1be33 media-session: add option to restore bluetooth profile
Add default-profile.restore-bluetooth option to restore the BT
profile.

See #1567
2021-09-02 11:39:17 +02:00
Wim Taymans f277487887 media-session: save and restore IEC958 Codecs 2021-09-02 10:27:59 +02:00
Wim Taymans 80628f38e7 alsa: move codec config to acp-device
Just like the latency, move the codecs to the device Route param.
This way, it is easier for the session manager to save and restore
the codecs as part of the Route settings.
2021-09-02 10:27:59 +02:00
Julian Bouzas 1a93165e84 impl-port: use audiomixer for RAW media subtype when setting up mixer 2021-09-01 17:35:47 -04:00
Julian Bouzas c65ae2f2e6 audiomixer: refactor and add support for more formats
The audiomixer processing logic is now based on mixer-dsp.
2021-09-01 17:35:43 -04:00
Julian Bouzas dddbe289fb audiomixer: add support for more formats in the mix table
The S8, S16, S24 and S32 formats are now supported. The mixing process also
takes into account the number of channels.
2021-09-01 17:08:36 -04:00
Jonas Holmberg 28cf342bb8 media-session: Change some warnings to info
If a program using pipewire-alsa calls snd_pcm_close() immediately after
snd_pcm_prepare() without reading or writing any data the client node
may be removed before the session manager can link it, which would
result in the following log warnings:

can't link 35:40 -> 43:48: link-factory: unknown input port 48
error id:25 seq:11467 res:-22 (Invalid argument): link-factory: unknown input port 48
can't link 35:41 -> 43:46: link-factory: unknown input port 46
error id:16 seq:11468 res:-22 (Invalid argument): link-factory: unknown input port 46
2021-09-01 15:15:51 +00:00
Wim Taymans eafef40430 pulse-server: remove pod debug 2021-09-01 13:25:52 +02:00
Wim Taymans ea7a731106 pulse-server: set the SINK_SET_FORMATS flag
When we have an iec958Codecs property on the node, we can use it to
configure the codecs on the sink.
2021-09-01 13:24:50 +02:00