Commit graph

9471 commits

Author SHA1 Message Date
Arun Raghavan
b546beef21 proplist-util: Drop deprecated G_CONST_RETURN macro
The preference in glib is now to just use the const qualifier directly.
2020-11-23 19:02:33 +00:00
Arun Raghavan
d1e0594e93 build-sys: Bump libpulse soversion
This is because we reverted the previous API breaking change to the
meaning of the pa_mainloop_prepare() timeout argument.
2020-11-23 13:24:03 -05:00
Arun Raghavan
e6b3edd3c1 Revert "mainloop: fix timeout assignment in pa_mainloop_prepare"
This reverts commit 6b1719d0ed, as it
inadvertently broke the semantics of timeout in the API.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1039
2020-11-23 18:05:27 +00:00
Tanu Kaskinen
2ea425d194 build-sys: Disable GStreamer by default with Autotools
With Meson GStreamer is already disabled by default, let's match that
with Autotools.
2020-11-23 19:12:27 +02:00
Pali Rohár
e99e862a3d alsa: Fix compile warnings
modules/alsa/alsa-sink.c: In function ‘pa_alsa_sink_new’:
modules/alsa/alsa-sink.c:2603:15: warning: declaration of ‘state’ shadows a previous local [-Wshadow]
         void *state;
               ^~~~~
modules/alsa/alsa-sink.c:2270:11: note: shadowed declaration is here
     void *state = NULL;
           ^~~~~
  CC       modules/alsa/module_alsa_sink_la-module-alsa-sink.lo
modules/alsa/alsa-source.c: In function ‘pa_alsa_source_new’:
modules/alsa/alsa-source.c:2289:15: warning: declaration of ‘state’ shadows a previous local [-Wshadow]
         void *state;
               ^~~~~
modules/alsa/alsa-source.c:1975:11: note: shadowed declaration is here
     void *state = NULL;
           ^~~~~
modules/alsa/module-alsa-card.c: In function ‘prune_singleton_availability_groups’:
modules/alsa/module-alsa-card.c:691:71: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
             pa_hashmap_put(group_counts, p->availability_group, count + 1);
                                                                       ^
2020-11-23 16:06:03 +00:00
Tanu Kaskinen
eaa6d5d6c1 switch-on-port-available: Fix switching away from unplugged headphones
Commits 323195e305 ("switch-on-port-available: Switch to headphones on
unknown availability") and d83ad6990e ("module-alsa-card: Drop
availability groups with only one port") broke switching from headphones
to speakers when headphones are unplugged. switch_from_port() selects
speakers, whose availability is unknown and availability group is unset,
and then calls switch_to_port(). The new logic in switch_on_port()
unintentionally blocked that switch.

This patch moves the problematic logic from switch_to_port() to
port_available_hook_callback() where it doesn't interfere with
switch_from_port().

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1043
2020-11-23 02:07:22 +00:00
Tanu Kaskinen
6ad2d207c5 alsa-mixer: Document the description and description-key mapping options 2020-11-22 16:14:58 +02:00
Emanuil Novachev
3efca093f5 Translated using Weblate (Bulgarian)
Currently translated at 2.6% (14 of 521 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/bg/
2020-11-21 19:49:45 +02:00
Dusan Kazik
5c6681e2fb Translated using Weblate (Slovak)
Currently translated at 69.2% (364 of 526 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sk/
2020-11-21 19:49:45 +02:00
Emilio Herrera
f23394ef61 Translated using Weblate (Spanish)
Currently translated at 100.0% (521 of 521 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/es/
2020-11-21 19:49:45 +02:00
Karl Ove Hufthammer
ebbfa1bce1 Translated using Weblate (Norwegian Nynorsk)
Currently translated at 100.0% (527 of 527 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/nn/
2020-11-21 19:49:45 +02:00
Igor V. Kovalenko
e81873611c switch-on-port-available: Add logging for port availability group 2020-11-21 14:36:51 +00:00
Igor V. Kovalenko
329bfe8f20 module-alsa-card: Add debug logging if availability group was pruned 2020-11-21 14:36:51 +00:00
Igor V. Kovalenko
89a53e1b71 i18n: Update pulseaudio.pot 2020-11-21 16:49:12 +03:00
Igor V. Kovalenko
2d018a82ad pactl: explicitly print if port availability is unknown
Port availability is a tristate -- not-available / unknown / available.
Explicitly print if availability is unknown to reduce confusion.
2020-11-21 16:34:09 +03:00
Arun Raghavan
d83ad6990e module-alsa-card: Drop availability groups with only one port
These are not really meaningful, and can be confusing for clients.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1022
2020-11-17 16:38:56 +00:00
Arun Raghavan
323195e305 switch-on-port-available: Switch to headphones on unknown availability
Since not all users will have environments that asks what they plugged
in when their hardware supports TRRS inputs but don't have impedance
sensing, let's emulate our previous default behaviour of enabling the
headphone port at least.

This can likely be improved so users can configure the module to select
for the device they are most likely to plug in (so an option to enable
just the microphone, or headphones+headset-mic ports).

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1028
2020-11-15 04:00:25 -05:00
Tanu Kaskinen
e70d34ae18 alsa-mixer: Remove references to non-existent multichannel paths
We don't have any mixer configuration for the multichannel mappings.
2020-10-31 12:00:54 +02:00
Tanu Kaskinen
885cfc2c51 gitlab: Remove trailing whitespace from the issue template 2020-10-31 09:44:21 +02:00
Tanu Kaskinen
daf3a3c4b0 alsa-mixer: Fix jack name comparison
HDMI jacks are configured like this:

    [Jack HDMI/DP]
    append-pcm-to-name = yes

The pa_alsa_jack.name field is then "HDMI/DP" and pa_alsa_jack.alsa_name
is set to "HDMI/DP,pcm=3 Jack" or similar. If we compare the name fields
of HDMI paths, they appear to use the same jack element even though they
are different in reality, so all HDMI ports got incorrectly assigned to
the same availability group.
2020-10-30 16:55:39 +00:00
Tanu Kaskinen
eee8292ae1 alsa-mixer: Set availability groups once per card
Previously they were set once per mapping, which caused the numbering to
restart from 1 for every mapping, so ports were incorrectly assigned to
the same group.
2020-10-30 16:55:39 +00:00
Arun Raghavan
a9c6d43b7c sink, source: Skip filter streams while changing default sink/source
Streams connecting filter devices to their target devices shouldn't move
because of default settings (they are intended to be filtering the
specific device that are attached to).

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1015
2020-10-26 12:00:35 -04:00
Jaroslav Kysela
1d6bd6689f alsa: move the exceptionally large value errors from error to debug level
Almost all reports from users, I have seen in last years, were not valid.
The report is also printed when the system scheduler does not wake
the pulseaudio thread in the right time. Users are not able to distinguish
between slow machine and the real problem.

Move the log level from 'error' to 'debug' for those messages.

The right fix should be to measure the time between the call invocation and
return to determine (and skip) the scheduling problems, but it is another
extra code just to debug things.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-10-26 15:48:35 +00:00
Arun Raghavan
d8e708e44c build-sys: Set the GStreamer RTP backend to disabled by default
Packaging shouldn't be using the automatic setting anyway, and let's
disable by default for one release and mark this as experimental so we
can flush out any corner cases.
2020-10-23 12:11:46 -04:00
Arun Raghavan
314e97d995 rtp: gstreamer: Account for rounding errors in RTP timestamp conversion
Since the RTP timestamp is converted to time units and back, a small
error can creep up, which then results in a single frame error in where
we place the buffer in the output memblockq. This results in minor
glitches, so we check for and eliminate the error.
2020-10-23 12:11:35 -04:00
Arun Raghavan
5f12dde2f5 rtp: gstreamer: Don't count on buffer DTS for capture time
With GStreamer 1.18, the old behaviour of storing the capture time in
DTS is gone (which is reasonable, since the semantics really don't
match). So instead, we get a capture timestamp when the buffer is being
pushed from udpsrc. This should eventually move into udpsrc, and the
timestamp should come from the cmsg instead of the clock.

We still fallback to the DTS if the meta isn't available, as the meta
might be dropped in older versions of rtpL16pay due to a bug.
2020-10-23 12:11:35 -04:00
Igor V. Kovalenko
3fc2ac10c6 module-bluez5-discover: avoid use after free on de-init
Hashmap loaded_device_paths contain objects holding keys to entries, and
these objects must be alive while map is emptied.

Reorder freeing this hashmap before destroying device objects to fix
crash on exit.
2020-10-23 04:57:15 -04:00
Igor V. Kovalenko
ef6ceb83a2 build-sys: meson: adjust path to gsettings-helper runing from build tree 2020-10-20 15:24:52 -04:00
Arun Raghavan
40bb058a31 build-sys: meson: Add libm dep to raop module
This is required for using pow().
2020-10-20 14:37:10 -04:00
Igor V. Kovalenko
44c5317624 device-port: fire port available changed hook after streams are moved
If port becomes unavailable then PA_CORE_HOOK_PORT_AVAILABLE_CHANGED
callbacks may eventually destroy related source or sink object. Call
this hook after stream is moved to prevent crash reading from freed
memory.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1008
2020-10-20 17:31:29 +03:00
Arun Raghavan
7f4d7fcf5f Revert "alsa-mixer: support up to 8 channels per mixer element"
This reverts commit e0ab9fa4a4.

The change broke some Xonar cards, and we probably don't want to hold up
the 14.0 release for this.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1009
2020-10-13 21:03:30 -04:00
Tanu Kaskinen
8614a37a95 ci: Fix comment
The UBUNTU_DEBS variable has been replaced by FDO_DISTRIBUTION_PACKAGES.
2020-10-13 17:14:00 +03:00
Igor V. Kovalenko
05f567086b module-stream-restore: check if dbus entry exists in dbus_entries map before creating it
If write_entry fails to store new entry in database, next time we can try creating new entry again.
With DBUS enabled this will create another dbus entry for same name leading to crash inserting duplicate into dbus_entries map.

Fix this by checking if dbus entry exists in dbus_entries map before creating it.

Fixes: #974
2020-10-13 10:35:44 +00:00
Igor V. Kovalenko
99b2d88282 module-stream-restore: log error writing volume/mute/device entry to database 2020-10-13 10:35:44 +00:00
Jaroslav Kysela
e0ab9fa4a4 alsa-mixer: support up to 8 channels per mixer element
We have at least one USB hardware which supports the 8
channels in one mixer element:

  https://github.com/alsa-project/alsa-ucm-conf/pull/25

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-10-13 10:27:59 +00:00
Tanu Kaskinen
06990e32ff alsa-mixer: Document the intended-roles mapping option 2020-10-13 13:22:11 +03:00
Jaroslav Kysela
6101798c7a alsa: fix type for legacy hdmi devices
Although the hdmi-output is in well_known_descriptions[] table,
the hdmi device names are indexed (hdmi-output-0), thus there
is no match to assign the proper type automatically.

This patch puts the correct hdmi type to all relevant hdmi
configuration files.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-10-04 21:39:33 +02:00
Jaroslav Kysela
a46bdcedc1 alsa: fix analog-input-microphone-headset device type
From: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-10-04 14:22:53 +03:00
Jaroslav Kysela
3efcb6847d alsa: mixer - reorder the type field in path parser
The items array is assigned later and the order of fields is important.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-10-04 14:22:53 +03:00
Michael Pivonka
36a86d4149 alsa-mixer: Add Razer Kraken Tournament Edition USB headset 2020-09-29 15:32:45 +00:00
Ralph Seichter
0050e5863a macos: Add missing import statement
Add missing import of util.h. This fixes a build failure with the
Xcode 12 command line tools which manifests as follows:

  error: implicit declaration of function 'pa_thread_make_realtime'
  is invalid in C99 [-Werror,-Wimplicit-function-declaration]

Ref https://trac.macports.org/ticket/61107
2020-09-28 15:44:38 +03:00
Sanchayan Maity
410db7d216 rtp: Fix sending of small packets
The current implementation for RTP send isn't optimised for sending MTU
bytes of data like rtp-native. For eg. if MTU is 1280 bytes and we have
to send 1276 bytes, two packets are send out one of 1268 bytes and other
of 8 bytes. Sending out a packet of 8 bytes has a significant overhead
and we should be sending MTU bytes of data.

Fix this by accumulating MTU bytes of data and sending data only on
accumulation of MTU worth of data.
2020-09-21 10:06:48 +05:30
Juliano de Souza Camargo
faf027050e Update Portuguese translation 2020-09-21 02:48:03 +00:00
Arun Raghavan
8705980364 build-sys: Bump gettext dependency
Needed for distcheck to work with a checked-in pulseaudio.pot. Not
updating to the very latest (0.21) to not force the dependency bump to
something "too new" on distros.
2020-09-20 20:57:54 -04:00
Arun Raghavan
44da249624 build-sys: Add doxygen/meson.build to distfiles 2020-09-20 19:10:03 -04:00
Arun Raghavan
d0c3ef1a7d build-sys: Bump soversions
libpulse gets a full API bump due to the addition of availability
groups, and libpulse-mainloop-glib gets a minor bump for implementation
change.
2020-09-20 19:10:03 -04:00
Jaroslav Kysela
c1a7e3c59d ucm: add possibility to skip the UCM card completely (Linked)
We have a requirement to "hide" some hardware drivers, because
other (main) UCM configuration will refer them.

This patch use special error codes to notify the upper layers
to skip the module loading.

BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/30
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-09-17 14:52:50 +00:00
Rafael Fontenelle
b72724369b Update Brazilian Portuguese translation 2020-09-12 12:24:11 -03:00
Tanu Kaskinen
c1a7d516b1 man: client.conf: Explain that autospawn=no doesn't disable systemd autostarting 2020-09-11 11:15:09 +03:00
Milo Casagrande
c2b05eb704 Translated using Weblate (Italian)
Currently translated at 100.0% (533 of 533 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/it/
2020-09-10 17:37:28 +03:00