Commit graph

9446 commits

Author SHA1 Message Date
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
Göran Uddeborg
d0ccc50c1e Translated using Weblate (Swedish)
Currently translated at 100.0% (534 of 534 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/sv/
2020-09-10 17:37:28 +03:00
Arun Raghavan
460d0c0b79 alsa-mixer: Add an explicit profile-set for Audigy devices
These lost analog-mono support when we made that a fallback profile, as
the stereo-fallback would be picked up as the only input profile, and
that does not work in duplex mode.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/750
2020-09-02 16:30:06 -04:00
Tom Yan
f003d6ca62 man: mention that exit-idle-time is complied if the user is lingering 2020-08-31 19:18:21 +03:00
Tom Yan
e36132b7dc main, core: check idle after loading conf
pa_core_check_idle() uses pa_core.exit_idle_time, which is set after the
pa_core_new() call, so pa_core_check_idle() needs to be called later.

This patch preserves the fact that core state is set to PA_CORE_RUNNING
after checking idle (now in main). It doesn't seem to matter anyway and
main(pa_core_new(state:PA_CORE_STARTUP)->...->state:PA_CORE_RUNNING)
seems right as well.
2020-08-31 19:09:02 +03:00
itsthem
90a6c5ef07 pulsecore: Replace gendered pronouns with gender neutral ones 2020-08-28 13:15:50 +00:00
Felix Yan
1887a0f88b shell-completion: zsh: Correct a typo 2020-08-14 22:31:33 +08:00
Tanu Kaskinen
1d066f2264 i18n: Update pulseaudio.pot 2020-08-13 22:01:18 +03:00
Balázs Meskó
09e03b7bc6 Translated using Weblate (Hungarian)
Currently translated at 100.0% (526 of 526 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/hu/
2020-08-13 21:58:11 +03:00
Milo Ivir
10964e0f08 Translated using Weblate (Croatian)
Currently translated at 100.0% (531 of 531 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/hr/
2020-08-13 21:58:11 +03:00
Geert Warrink
c7343ef683 Translated using Weblate (Dutch)
Currently translated at 85.8% (426 of 496 strings)

Translation: pulseaudio/pulseaudio
Translate-URL: https://translate.fedoraproject.org/projects/pulseaudio/pulseaudio/nl/
2020-08-13 21:58:11 +03:00
Tanu Kaskinen
a863b5795a alsa-mixer: Fix indentation 2020-08-10 20:56:43 +03:00
Tanu Kaskinen
af42b3eb6f Rename "available group" to "availability group"
"Availability group" is more clear about what the field is about.
Credits to Arun Raghavan for coming up with the better name.
2020-08-10 20:54:21 +03:00
Tanu Kaskinen
1b44b44c75 alsa-mixer: Fix mapping_group_available() logic
There were three bugs:

1) j->state_plugged was set to PA_AVAILABLE_UNKNOWN too early. It must
be set only after we have found that the jack is shared by two ports.
The result of setting it too early was that no jack ever could have
the PA_AVAILABLE_YES status.

2) The inner jack loop iterated through p->jacks instead of p2->jacks,
so the code didn't compare jacks between two ports at all. As a result
all ports were put in the same availability group.

3) The inner jack loop checked j->state_plugged instead of
j2->state_plugged. The result was that the speaker port, which uses the
Headphone jack to toggle between unknown and unavailable, was put in the
same group with the headphone port.
2020-08-10 20:54:21 +03:00
Tanu Kaskinen
0ce3008605 Improve the port available_group and type documentation 2020-08-10 20:54:21 +03:00
Tanu Kaskinen
2c790e1937 meson: Add doxygen target
The documentation can be generated with "ninja -C build doxygen". The
output will go to "doxygen/html" under the build directory.
2020-08-10 19:50:57 +03:00
Tanu Kaskinen
6fce5b2eac build-sys: Configure doxygen.conf.in a bit differently
This change prepares for adding a doxygen target to the Meson build
system. The DOXYGEN_OUTPUT_DIRECTORY substitution variable is needed so
that the output will go to the build directory. I also replaced @srcdir@
with @top_srcdir@. I think it looks cleaner, since the ".." parent
directory traversal is avoided. It also happened to make writing the
Meson rules easier.
2020-08-10 19:38:07 +03:00
Sanchayan Maity
1781031c8b modules: rtp-gstreamer: Fix RTP sound lag
In the current scenario of reading samples from the appsink, it is
observed that we do not actually read all the data available in the
appsink to read. This results in a choppy sound or heard as gaps in
the playback.

The underlying reason for this happening is as follows. Let's say
the appsink new sample callback is called 2-3 times, but, with the
underlying fdsem post machinery when pa_rtp_recv eventually gets
called, there would be those 2-3 samples to read. However, we were
only reading one sample in the current implementation.

Fix this by reading all samples from the appsink in a loop, coalescing
them and then writing to the memchunk.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/889

Signed-off-by: Sanchayan Maity <sanchayan@asymptotic.io>
2020-08-10 12:36:17 +00:00
Kai-Heng Feng
dd70c3c589 module-alsa-card: Set a minimum profile priority if it's not set
If the profile is generated from UCM, the priority won't be set so it
stays as 0.

Assume a card has two available profiles, when the selected one becomes
unavailable, module-switch-on-port-available's find_best_profile()
should pick the next available one. However, since the priority is 0,
the "off" profile was chosen instead of the available one.

So let's set the priority to 1 to make profile that is available has
higher priority than "off" profile.
2020-08-10 11:52:31 +00:00
Rosen Penev
ceaa69d71f raop-crypto: add missing header
Fixes compilation without deprecated OpenSSL APIs.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-08-10 11:38:48 +00:00
Rosen Penev
1ae8097b8b modules: fix wrong formats under 32-bit
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-08-10 10:56:40 +00:00
Jan Alexander Steffens (heftig)
b657cff400 build: Make alsadatadir configurable
Pipewire has started shipping copies of PulseAudio's ALSA card profiles.

It would be useful if both projects could share the same profiles and
this patch is a step toward that.
2020-08-09 01:57:01 +00:00
Jan Alexander Steffens (heftig)
af5ae60b33
meson: Add missing thread_dep to atomic-test
Otherwise it won't link.

    /usr/bin/ld: /tmp/atomic-test.uzrv5D.ltrans0.ltrans.o:
    undefined reference to symbol 'pthread_setaffinity_np@@GLIBC_2.3.4'
2020-08-09 03:29:23 +02:00
Tanu Kaskinen
628f068788 gitignore: Ignore hashmap-test 2020-08-06 14:34:56 +03:00
Kai-Heng Feng
e153fb8706 alsa-mixer: Recognize USB audio jack mixer
UAC v2 and v3 support insertion control (jack detection), and the
created jack mixers have "- Input" suffix and "- Output" suffix for
input jack and output jack, respectively.

Add these jacks so we don't always need to rely on UCM or PulseAudio
profile-set.
2020-08-05 00:42:26 +08:00
Tanu Kaskinen
9636c2940b udev: fix too long card name with HyperX Cloud Orbit S
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/820
2020-08-04 12:40:22 +00:00