Commit graph

9012 commits

Author SHA1 Message Date
Sangchul Lee
547998db44 alsa-sink/source, sink, source: Consider sample format for avoid-resampling/passthrough
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>
2018-11-16 08:30:05 +02:00
Alexander E. Patrakov
73156649e7 resampler: Fix confusion between rear and side channels for 5.1 layouts
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>
2018-11-15 09:48:14 +02:00
Tanu Kaskinen
3e80e0f777 alsa-mixer: swap lineout and headphone priorities
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.
2018-10-28 13:15:53 +02:00
Tanu Kaskinen
78dfb8043b alsa-mixer: don't make lineout unavailable when headphones are plugged in
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
2018-10-28 13:10:36 +02:00
Tanu Kaskinen
874fe7b15d .gitignore: add passthrough-test 2018-10-23 19:18:26 +03:00
Tanu Kaskinen
fa2a753477 daemon-conf: fix printing avoid-resampling in pa_daemon_conf_dump()
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
2018-10-23 18:35:09 +03:00
Arun Raghavan
ee1160f2ef gitignore: Ignore cscope files 2018-10-21 17:00:31 +01:00
David Hewitt
eb1c694874 Remove active_profile 2018-10-17 17:12:29 +00:00
David Hewitt
07ce79c757 vala: add pa_card_port_info bindings 2018-10-17 10:09:55 +00:00
David Hewitt
6c21a5678b vala: Fix card profile array bindings 2018-10-15 09:15:15 +00:00
Joseph Herlant
5f727f0faf volume-test: Allow rounding without having to allow a random number of errors 2018-10-13 05:14:42 +00:00
Arun Raghavan
b176c84a85 passthrough-test: Add a test for volume set/restore 2018-10-12 19:36:37 +05:30
Arun Raghavan
cda9a5f1d3 tests: Add a unit test for passthrough support
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.
2018-10-12 19:36:34 +05:30
Arun Raghavan
5fd17efc6c null-sink: Add support for reconfiguration and non-PCM formats
This makes it easier to manually test as well as add unit tests for
passthrough support.
2018-10-12 19:35:23 +05:30
Arun Raghavan
56c1e7c615 build-sys: Fix meson version detection logic
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.
2018-10-11 14:56:09 +00:00
Arun Raghavan
c46e95ca63 i18n: Provide *ngettext() stubs when NLS is diabled 2018-10-11 14:34:11 +00:00
João Paulo Rechi Vita
a720938855 card: Log initial profile selection
Add logs to pa_card_choose_initial_profile and pa_card_set_profile to
have detailed logging of the profile initialization logic.
2018-10-11 13:08:41 +00:00
João Paulo Rechi Vita
784853004c device-port: Use pa_available_to_string
Replace using the ternary operator with pa_available_to_string to print
value of a pa_available_t.
2018-10-11 13:08:41 +00:00
João Paulo Rechi Vita
d983cde529 cli-text: Use pa_available_to_string
Replace the local available_to_string with calling
pa_available_to_string from card.h.
2018-10-11 13:08:41 +00:00
João Paulo Rechi Vita
a94ae3f20f card: Create pa_available_to_string
Add a new function to the card API that returns the string
representation of a pa_available_t variable.
2018-10-11 13:08:41 +00:00
Arun Raghavan
cae15753d4 build-sys: Set minimum required meson version to 0.44.0
We now use get_unquoted() during manual page generation which requires
0.44.0 or greater.
2018-10-11 15:30:01 +05:30
Marek Cernocky
65c9195e8f i18n: Fixed plural forms handling 2018-10-09 11:56:31 +03:00
Arnaud Rebillout
7f05b835df meson: Build and install man pages
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
66ac9ee37a webrtc: Silence -Wsign-compare warning
webrtc.cc:202:19: warning: comparison of integer expressions of different signedness:
  'int' and 'std::vector<webrtc::CartesianPoint<float> >::size_type' {aka 'long unsigned int'}

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
88d77ff852 meson: Enable echo-cancel module, add libwebrtc_util lib, add speex and webrtc dependencies
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
31fd820702 meson: Enable ladspa module
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
5b0a1df228 meson: Enable oss module and padsp util
Regarding the module:

This is unlike the autotools where liboss-util is built as a library,
here we build everything in the oss module, as apparently there's no
other consumer for liboss-util.

Regarding padsp:

Setting the install mode for padsp requires meson 0.47, so instead we
set padsp.in as executable in the git repository (which is what glib
does for gdbus-codegen btw).

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
0d6ea15eea meson: Enable bluetooth modules, add bluez_util lib, add bluez and sbc dependencies
Please notice that the bluez5 version seems wrong in the dependency
declaration: `>= 4.x`, while we're talking about version 5.

The ofono part will need to be made optional when we start to work on
the meson_options file.

I follow the current configure.ac to define 'HAVE_BLUEZ', but it looks
like this part would benefit from a bit of rework. Setting HAVE_BLUEZ
when we have dbus+sbc sounds weird, there's probably a better name for
this variable.

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
147462b276 meson: Do not build dbus files as a library
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
fd6599089b meson: Enable console-kit module
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
14486eb08c meson: Enable lirc module, add lirc dependency
This is unlike the autotools where we check that a header exist, here we
use pkgconfig because upstream ships a pkgconfig. I don't know from
which version though...

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
cf1795bccc meson: Enable mmkbd-evdev module
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
ceba420257 meson: Enable zeroconf modules
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
6ee4f86fa4 meson: Enable x11 modules, add x11 related dependencies
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
90c6416b18 meson: Enable raop-discover module, add avahi dependency
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
4e6c3c0d79 meson: modules/raop: Fix rtsp_client.h include path
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
4c9b6370d1 meson: Enable raop-sink module, add raop lib, add openssl dependency
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
83b6903849 meson: Enable jack modules, add jack dependency
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
7f320318ff meson: Enable dbus-protocol module
This is similar to alsa and rtp modules.

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
8bc6e40daf meson: Fix all the missing dependencies uncovered by -Wl,--no-undefined
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
dac59dbf81 meson: Build modules with '-Wl,no-undefined'
This flag will make the loader fail if symbols are not resolved. It
seems to be our best bet to uncover every missing module dependencies.

For more details, I recommend to read:
<http://www.kaizou.org/2015/01/linux-libraries/>

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
13adc3a805 meson: Comment bluez5 modules for now
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
918af59268 meson: Add the rtp module library
This is based on the existing libalsa-util library.

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
aed8e9f417 meson: Add pulsecore internal libraries
This is based on the initial protocol_native library that is already
defined, and then by looking at the Makefile.am to work out the
dependencies.

It's not clear whether we really need database_c_args, maybe there's
things that can be simplified.

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
5c1a9bb10f meson: Make equalizer-sink modulde depend on fftw, add fftw dependency
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
026768311b meson: Make systemd-login module depend on systemd
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
ec46f73f56 meson: Propagate systemd dep to libpulsecommon and daemon
This is needed now that we define HAVE_SYSTEMD_xxx

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
caa2821ee2 meson: Add systemd-login to core dependencies
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
50bb97261e meson: modules/alsa: Fix udev-util include path
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30
Arnaud Rebillout
652d3db8f4 meson: modules/alsa: Make alsa-util a shared library
This is to be consistent. In pa currently, as built by the autotools,
libalsa-util is a shared library. Moreover, all the libraries for the
modules, as defined in `src/meson.build`, are also shared libraries.

So let's stick to shared libraries everywhere for now, for simplicity.

We can rework that later on.

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2018-10-04 08:44:18 +05:30