Commit graph

17 commits

Author SHA1 Message Date
Wim Taymans
11f1298f53 spa: make a function to make a channel short name
Make a function that can generate and parse a short name for
the positions that are not in the type list, like the AUX channels.
2025-10-22 13:04:53 +02:00
Wim Taymans
818d1435ce treewide: access the position information using helpers
Make sure we don't access out of bounds and that we use the helpers
wherever we can to access the position information.
2025-10-21 13:06:25 +02:00
Wim Taymans
cf7e917024 pulse-server: make a function to silence a buffer 2025-01-16 16:16:39 +01:00
Wim Taymans
feaa36560d pulse-server: increase max rate to 768000
Fixes #4482
2025-01-08 17:23:15 +01:00
Barnabás Pőcze
3b4a255dec pulse-server: format_info_from_spec(): remove redundant decl 2023-07-03 19:40:31 +02:00
Wim Taymans
8a24f58cd1 pulse-server: improve format parsing
The pulseaudio format should be parsed case insensitive.
Add some more pulseaudio supported formats.
2023-03-01 13:44:24 +01:00
Wim Taymans
eb797cac48 pulse-server: improve FIX_ flag handling
When a stream uses the FIX_ flags it should negotiate to the format of
the sink or source it connects to. To do this, look up the sink or
source and look at the format, use this as the allowed format for the
stream when the FIX flags are set.

Make it still possible to override with with properties. Use
audio.position to make it possible to set a channelmap override.
2023-02-23 12:53:58 +01:00
Wim Taymans
ad6ab7e0b7 pulse-server: refactor channel position parsing 2023-02-23 12:39:36 +01:00
Wim Taymans
d11f8d5dea pulse-server: move fix function to format functions 2023-02-23 09:23:32 +01:00
Barnabás Pőcze
934ab3036e treewide: use SPDX tags to specify copyright information
SPDX tags make the licensing information easy to understand and clear,
and they are machine parseable.

See https://spdx.dev for more information.
2023-02-16 10:54:48 +00:00
Wim Taymans
edb5664017 pulse-server: fix IEC958 passthrough again
We need to create fake channels when parsing the IEC958 format or
else we get an invalid format and IEC958 passthrough doesn't work.

Ignore the IEC958 formats when collecting formats for the device or else
the fake channels mess with the real channels of the device.

See #1442
2022-02-21 16:53:03 +01:00
Wim Taymans
49eb31f670 pulse-server: add device-restore extension
This is mostly to read and set the supported formats of a sink.
2021-09-01 13:23:10 +02:00
Wim Taymans
a9169cf491 pulse-server: Handle formats of virtual devices better
Virtual devices tend to start with partial fields set in the EnumFormat
param (usually rate is missing). This causes virtual devices to be
invisible until they are used in some way.

Fix this by relaxing the parsing of EnumFormat and by falling back to
the server defaults for the unspecified fields.

Fixes #1413
2021-08-25 17:33:22 +02:00
Wim Taymans
bceb9a4b6e pipewire-pulse: enumerate iec958 formats for sinks 2021-08-23 11:58:29 +02:00
Wim Taymans
f96fa1bf36 pulse-server: find the rate in the format_info
Also look for the highest rate in the format_info to suggest as
the graph sample rate.

See #1523
2021-08-18 16:58:22 +02:00
Barnabás Pőcze
43e2c64307 pulse-server: split out format handling
Part of !776.
2021-06-25 03:22:59 +02: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