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.
Sample format(e.g. 16 bit, 24 bit) was not considered even if the
avoid-resampling option is set or the passthrough mode is used.
This patch checks both sample format and rate of a stream to
determine whether to avoid resampling in case of the option is set.
In other word, it is possble to use the stream's original sample
format and rate without resampling as long as these are supported
by the device.
pa_sink_input_update_rate() and pa_source_output_update_rate() are
renamed to pa_sink_input_update_resampler() and pa_source_output
_update_resampler() respectively.
functions are added as below.
pa_sink_set_sample_format(), pa_sink_set_sample_rate(),
pa_source_set_sample_format(), pa_source_set_sample_rate()
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
mpv and vlc play "normal" 5.1 AC3 and DTS files as if they had a
"5.1 (Side)" layout. Which is fine and consistent with ITU
recommendations if the user has a proper 7.1 system. But if the user
actually has a 5.1 system, PulseAudio will try to remap, poorly, between
the "5.1 (Side)" and "5.1" layouts, sending either an average between
front and rear channels, or an attenuated version of that average,
depending on the remixing-use-all-sink-channels setting.
This is not desired, the "Side" channels should be sent to "Rear", it is
only an unfortunate nomenclature confusion.
This patch does not fix 5.1 <-> 7.1 remixing.
Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
Headphones should have higher priority than lineout. Many people have
speakers always connected to lineout, and when plugging in headphones,
the audio should move to the headphones, which requires headphones
to have higher priority than lineout.
Previously this was handled by marking lineout unavailable when plugging
in headphones, but we don't do that any more.
This reverts commit 66f97c35bd. The commit
message was:
alsa-mixer: Disable line-out if headphone jack is plugged
Line-out gets muted when headphones are plugged in on HDA cards, encode
this in the line-out path so pulse can match that state.
I don't think the mentioned auto-muting happens any more by default,
and some users want to use lineout while having headphones plugged in.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/583
The bool was inverted for some reason - maybe because the next line
prints enable-remixing that needs to be inverted from disable_remixing,
and somehow this logic was accidentally copied to the avoid-resampling
handling.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/568
This adds some basic infrastructure to test passthrough support. Right
now, it just creates a passthrough stream and makes sure negotiation
works. We'll add in more tests as we go along.
This sync the meson version detection to match what we do in the
autotools build, which is to use git-version-gen, which in turn looks
for <topdir>/.tarball-version, or generates the version based on a git
tag or environment variable.