Use _alibpref to check if a device needs a UCM local config. Mark
the device as such and use this to set the OPEN_UCM property on
the device.
Open the UCM for a card when the device has the property set. Use the
same logic for loading the UCM as the acp code.
See #1251
UCM devices can require local data from use_case_mgr_open() but since
we do that in a separate process, make sure we reopen the use case
manager in case we are passed a UCM device so that the config is
available.
See #1251
When we enable a device, the node will be created and its software
volume will be set to 100%. Update the device volume with this as
well so that changing the volume has an effect.
Fixes#1198
According to the alsa-info.txt in the pipewire issues of #747 and #1206,
the Front Playback Volume is shared by Headphone and Lineout or
Headphone and Speaker, But Headphone, Lineout or Speaker they all have
independent Playback Switch, change to only use switch to mute the
Lineout or Speaker. This could resolve the issues of #747 and #1206.
See #1206 and #747
If the message was too long, then the `vsnprintf()` call would
fill up `location`, leaving no space for the color escape sequence
and the newline, causing a stack buffer overrun here:
size += snprintf(p + size, len - size, "%s\n", impl->colors ? suffix : "");
Fix that by reserving the last 24 bytes of the message buffer.
Implement a port recalculate latency method that takes the min
and max latency of all peer ports and sets that as the new port
latency.
When a link is made, let the output and input port recalculate
latencies.
Pass latency param in audioconvert.
Add a new latency param that contains a latency object.
The latency object contains the min and max delay from a port to
the terminal sink/source. It is also possible to express this
delay as a fraction of the quantum to avoid having to recalculate
the latency every time the quantum changes.
When we add a new listener to an object, it will emit the full state
of the object. For this it temporarily sets the change_mask to all
changes. Restore the previous state after this or else we might not
emit the right change_mask for the next listener.
Consider the case where one there are two listeners on an object.
The object emits a change and the first listener wants to enumerate the
changed params. For this is adds a new listener and then triggers the
enumeration. If we set the change_mask to 0 after adding the listener,
the second listener would get a 0 change_mask and fail to update
its state.
This requires a helper script: doxygen doesn't differ between static methods
and static inline methods. EXTRACT_STATIC defines whether it parses *any*
static method but we're currently using all C files as input files as well. We
cannot convince doxygen to just parse static inline functions in header files
so for SPA we hack around this: meson passes the spa headers to a shell script
with simply copies those changed to `/* static */ inline void (foo)` and doxygen
then runs on those header files.
The result: we get all spa functions added to your doxygen output at the cost
of a few sed calls.
Subdirectories buffer, control, debug, monitor, pod, support and utils, others
are still missing. Headers are grouped either per subdirectory (e.g. buffer/
gets added to group spa_buffer) or per-file (e.g. spa_json is a separate
group), whatever seemed like the most sensible approach.
Motu M4 has four inputs (two line-in inputs, and two complete ones
with gain and XLR and whatnot), as well as four outputs (two monitor
pairs, and an unnaccounted headphone).
Sadly, like a few other interfaces, it wasn't being given an input
profile, since the matching code goes through default.conf testing
each config, and ends up selecting 'analog-surround-40', which does
not have input mapping. The inputs would fallback to 'multichannel-
input', which also doesn't have input paths.
Add input paths to all analog-surround-* mappings, and remove their
'direction=output' fields since they handle both out and in.
This flag is used to announce that the respective key is mandatory and
therefore the object containing this key is not suitable to be merged
with other objects missing it.
This replaces the manual check for "true" and some (inconsistent) return value
of atoi. All those instances now require either "true" or "1" to parse as
true, any other value (including NULL) is boolean false.
Easier to use than strcmp() since their return value matches expectations. And
they do what is expected with NULL strings, two NULL pointers are equal, one
NULL pointer is not equal.
udev's ID_MODEL_ID and ID_VENDOR_ID are inconsistent: always 4-digit hex but
sound devices are prefixed with 0x, v4l devices are not. Depending on the
actual ID, the value will look like decimal (1234) or hex (a234).
pw-dump will then print those as either decimal integers (i.e. 0x1234 becomes
decimal 1234) or double (i.e. a234 becomes 41524.00).
Make this consistent by converting the string from hex do decimal where we
get it.
Most of the time when we convert a string to an integer we only care about
success. Let's wrap this with a helper function that sets the value to the
result and returns true on success.