I can't promise that the logic is *exactly* the same as the logic
currently in use with the autotools, but it seems correct to me.
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
If `x11-xcb` is found, then let's force other X11 dependencies to be
there as well. That makes things a bit easier, and that's also what is
done in the autotools build system.
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
This is to avoid using the construct 'join_paths(prefix, get_option(...))'
everywhere in the meson files. It's better to settle the paths question
once and for all at the beginning.
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
Before this commit ucm_port_contains() was using a strncmp to compare
UCM-device-names without first checking that the part of the port_name
being compared and the device-name have the same length, this was causing
it to return true for both "InternalMic-IN1" and "InternalMic-IN12" when
port_name contained "InternalMic-IN1".
We hit this with the bytcr_rt5651 UCM profile which has "InternalMic-IN1",
"InternalMic-IN2" and "InternalMic-IN12" devices, for devices with their
internal mic connected to IN1, or IN2, or using stereo internal mics
connected to both. This problem resulted in various problems including
the RECMIXL? BST2 switch getting turned on when selecting only
"InternalMic-IN1", as well as confusing the gnome-control-center sound
panel, which could not figure out which device is selected in this case.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This is because the meson build requires meson 0.47, which is not
available in the current Ubuntu LTS (18.04).
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
The previous commit introduces logic in module-switch-on-port-available
that may change a card's active profile when its availability changes to
PA_AVAILABLE_NO. To choose the new active profile, it needs a consistent
view of the new availability of all profiles, so this commit changes the
order which the ALSA driver updates all profiles' availability to ensure
the active profile is last.
This is not generic enough to cover cases were we may want to take an
action on availability changes of profiles other than the active one
that also need a consistent view of all profiles' availability. But we
don't have any callbacks implementing such action at the moment.
When a port becomes unavailble its profile may also become unavailable.
If that profile is the card's active profile, we need to switch the
card's active profile to a different one.
If we don't do that a card may get stuck on a profile without available
ports, but its sink and source will still exist, preventing
module-rescue-streams to move the streams to a different card with
available ports.
The relation between port availability and profile availability is
defined by the driver, and for the ALSA driver a profile is considered
available if there is at least one (available || unknown) port for each
direction implemented by the profile. Because of that we can only check
the profile's availability and priority when looking for the best
profile and don't need to look at port's priorities.
https://phabricator.endlessm.com/T24904
It is helpful to improve reproducibility build [1] since
PA_SRCDIR/PA_BUILDDIR contains build path,
--disable-running-from-build-tree could drop these macros at
precompilation.
[1] https://reproducible-builds.org/
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
HDMI ports are normally present on cards connected to an internal bus,
and module-switch-on-connect should switch to them when a HDMI monitor
is plugged.
This is specially relevant on setups where the HDMI port of a machine is
connected to a different audio card then the analog outputs, which is
the case for machines with AMD graphics cards.
When reviewing another change in rsa_encrypt(), Felipe Sateler pointed
out some deficiencies in error handling. This patch adds error handling
for all openssl calls in rsa_encrypt().
This patch doesn't propagate the error all the way up to the
pa_rtsp_client owner, because there's no mechanism for doing that. I
could implement such mechanism myself, but I think it's better I don't
make such complex changes to the RAOP code, because I don't have any
RAOP hardware to test the changes. The result is that module-raop-sink
will just sit around without doing anything. I think this is still
better than having no error handling at all.