platform/upstream/pulseaudio.git
3 years agoUpdate NEWS v14.1
Arun Raghavan [Wed, 13 Jan 2021 02:43:40 +0000 (21:43 -0500)]
Update NEWS

Add notes for 14.1.

3 years agoUpdate NEWS
Arun Raghavan [Wed, 13 Jan 2021 02:36:01 +0000 (21:36 -0500)]
Update NEWS

Missed this in the 14.0 release.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/465>

3 years agocli: Fix crash when using .include with an empty directory
Patrick Gaskin [Sun, 3 Jan 2021 08:29:35 +0000 (03:29 -0500)]
cli: Fix crash when using .include with an empty directory

This would previously fail the size > 0 assertion in pa_xmalloc.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/454>

3 years agodatabase: clean up remaining references to CANONICAL_HOST
Igor V. Kovalenko [Mon, 21 Dec 2020 16:55:00 +0000 (19:55 +0300)]
database: clean up remaining references to CANONICAL_HOST

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>

3 years agodatabase: pick old database file from any arch
Igor V. Kovalenko [Mon, 21 Dec 2020 16:27:53 +0000 (19:27 +0300)]
database: pick old database file from any arch

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>

3 years agodatabase: drop arch from newly created database file name
Igor V. Kovalenko [Sun, 20 Dec 2020 18:36:21 +0000 (21:36 +0300)]
database: drop arch from newly created database file name

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>

3 years agodatabase: use existing database matching same architecture prefix
Igor V. Kovalenko [Sun, 29 Nov 2020 12:16:26 +0000 (15:16 +0300)]
database: use existing database matching same architecture prefix

State database binary file format may depend on system architecture,
for instance gdbm binary format depends on architecture word size,
making x86 and x64 gdbm files incompatible.

If this is the case, it is handled by adding system architecture name to
database file name using automatically configured CANONICAL_HOST string.
Meson build define CANONICAL_HOST to be system architecture name, while
autotools build extends this with vendor and and operating system components.

Switch autotools build to use host_cpu for CANONICAL_HOST to match Meson
configuration. For backwards compatibility always use existing database file
matching CANONICAL_HOST prefix if it exists.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>

3 years agodatabase: extract common method to handle machine id and architecture
Igor V. Kovalenko [Sun, 29 Nov 2020 08:21:29 +0000 (11:21 +0300)]
database: extract common method to handle machine id and architecture

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425>

3 years agobuild-sys: meson: use target_machine.cpu_family() for CANONICAL_HOST
Igor V. Kovalenko [Mon, 30 Nov 2020 10:31:19 +0000 (13:31 +0300)]
build-sys: meson: use target_machine.cpu_family() for CANONICAL_HOST

target_machine provides information about the machine on which the compiled
binary's output will run.

cpu_family() returns CPU family name (such as x86_64, not more specific amd64)

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/426>

3 years agoladspa-sink: do not call pa_sink_suspend if PA_SINK_IS_LINKED is false
Igor V. Kovalenko [Sun, 27 Dec 2020 12:25:40 +0000 (15:25 +0300)]
ladspa-sink: do not call pa_sink_suspend if PA_SINK_IS_LINKED is false

While module-ladspa-sink is still being loaded and before pa_sink_put() is
called there may be an attempt to reconfigure master sink when avoid-resampling
is true. This breaks attempting to suspend ladspa-sink which is still in INIT
state.

Fix this by skipping pa_sink_suspend if PA_SINK_IS_LINKED is false.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/445>

3 years agoalsa-mixer: Add support for the Headphone,1 element
Tanu Kaskinen [Sat, 26 Dec 2020 20:29:06 +0000 (22:29 +0200)]
alsa-mixer: Add support for the Headphone,1 element

This is seen at least on HP EliteDesk 800 DM and HP EliteDesk 800 SFF.

This is used by the analog-output-headphones-2 path, but all other paths
on the same sink need to handle the element too. The existing
configuration is inconsistent between files regarding whether headphone
outputs should be muted or not when not using them. I chose to be
consistent within files, which means that Headphone,1 handling is
inconsistent between files in the same way that the existing Headphone
and Headphone2 handling is. (My opinion is that unused paths should be
always muted, but I didn't want to do that policy change in this patch.)

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>

3 years agoalsa-mixer: Move HP EliteDesk 800 SFF/DM second headphone output to path analog-outpu...
Tanu Kaskinen [Sat, 26 Dec 2020 20:22:06 +0000 (22:22 +0200)]
alsa-mixer: Move HP EliteDesk 800 SFF/DM second headphone output to path analog-output-headphones-2

The two headphone outputs should be handled in separate paths so that
volume control can be implemented properly for both outputs.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>

3 years agoalsa-mixer: Use unambiguous descriptions with dual headphone outputs
Tanu Kaskinen [Sat, 26 Dec 2020 20:15:20 +0000 (22:15 +0200)]
alsa-mixer: Use unambiguous descriptions with dual headphone outputs

Previously both paths had description "Headphones", which I assume can
cause confusion with users who see two ports with identical names. I
don't have this kind of hardware myself nor have I heard complaints from
users, this is just something I noticed while reading the configuration
files.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>

3 years agoalsa-mixer: Support dual Front Headphone Jack
Kai-Heng Feng [Wed, 25 Mar 2020 10:08:56 +0000 (18:08 +0800)]
alsa-mixer: Support dual Front Headphone Jack

There are dual Front Headphone Jacks with different indices or with
different names, they can be found on HP EliteDesk 800 SFF and HP
EliteDesk 800 DM, respectively.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>

3 years agoalsa-mixer: Handle the index for ALSA mixer jack identifiers
Kai-Heng Feng [Tue, 22 Dec 2020 05:39:05 +0000 (13:39 +0800)]
alsa-mixer: Handle the index for ALSA mixer jack identifiers

Some systems have two jacks with same name but different index, we need
to take index into consideration to use both jacks.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/272>

3 years agobluetooth: correct possible segmentation fault
morrishoresh [Thu, 24 Dec 2020 21:58:54 +0000 (23:58 +0200)]
bluetooth: correct possible segmentation fault

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/443>

3 years agoswitch-on-port-available: Switch to headset or mic on unknown avail
Hui Wang [Mon, 23 Nov 2020 03:25:51 +0000 (11:25 +0800)]
switch-on-port-available: Switch to headset or mic on unknown avail

On some Dell AIO machines, there is no internal mic, only a multi
function audio jack, so the only input devices are headphone-mic and
headset-mic, and they share the Jack with headphone.

When there is no headset plugged in that Jack, the headphone-mic
and headset-mic are off. And since there is no available port under
the analog input source, this source is unlinked (if there is
internal mic, the source will not be unlinked). so the only pa-source
left in the PA is analog-stereo-monitor.

After the headset is plugged, we need to let switch_to_port() handle
headset-mic and headphone-mic conditionally, this will guarantee the
source will be created if it is unlinked before plugging, and then the
input profile could be selected correctly.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/390>

3 years agoalsa: mixer - add support up 8 mixer channels
Jaroslav Kysela [Wed, 14 Oct 2020 20:20:37 +0000 (22:20 +0200)]
alsa: mixer - add support up 8 mixer channels

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

POSITION_MASK_CHANNELS define was added for the future extensions.

The override_map variable was changed from bool to mask (unsigned int).
The channel map override settings is handled for channels up to eight now.

Also added missing override-map.3 .. override-map.8 to the configuration
parser array.

The driver channel position was added to the override mask arguments
(syntax is driver:pulseaudio like left:all-left). If ommited, the ALSA's
channel positions are guessed by index.

Link: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/292
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/389>

3 years agoalsa: mixer - use safe dB range values when the override mask is unset
Jaroslav Kysela [Sat, 24 Oct 2020 16:20:59 +0000 (18:20 +0200)]
alsa: mixer - use safe dB range values when the override mask is unset

Use safe values for the min_dB and max_dB fields when the position mask
is unset to avoid breakage for the upper levels.

If the range is incorrect, the volume range shown in pavucontrol shows
strange values.

(Thanks to Wim Taymans for the idea.)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/389>

3 years agobuild-sys: Bump libpulse soversion v14.0
Arun Raghavan [Mon, 23 Nov 2020 18:22:25 +0000 (13:22 -0500)]
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.

3 years agoRevert "mainloop: fix timeout assignment in pa_mainloop_prepare"
Arun Raghavan [Mon, 23 Nov 2020 17:56:41 +0000 (12:56 -0500)]
Revert "mainloop: fix timeout assignment in pa_mainloop_prepare"

This reverts commit 6b1719d0ed100ce5a65f28c3c4d4f3b59f3f56a0, as it
inadvertently broke the semantics of timeout in the API.

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

3 years agobuild-sys: Disable GStreamer by default with Autotools
Tanu Kaskinen [Mon, 23 Nov 2020 17:12:27 +0000 (19:12 +0200)]
build-sys: Disable GStreamer by default with Autotools

With Meson GStreamer is already disabled by default, let's match that
with Autotools.

3 years agoalsa: Fix compile warnings
Pali Rohár [Sat, 21 Nov 2020 10:58:05 +0000 (11:58 +0100)]
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);
                                                                       ^

3 years agoswitch-on-port-available: Fix switching away from unplugged headphones
Tanu Kaskinen [Sat, 21 Nov 2020 14:52:23 +0000 (16:52 +0200)]
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

3 years agoalsa-mixer: Document the description and description-key mapping options
Tanu Kaskinen [Sun, 22 Nov 2020 14:14:58 +0000 (16:14 +0200)]
alsa-mixer: Document the description and description-key mapping options

3 years agoTranslated using Weblate (Bulgarian)
Emanuil Novachev [Wed, 14 Oct 2020 21:14:42 +0000 (21:14 +0000)]
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/

3 years agoTranslated using Weblate (Slovak)
Dusan Kazik [Tue, 6 Oct 2020 08:39:43 +0000 (08:39 +0000)]
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/

3 years agoTranslated using Weblate (Spanish)
Emilio Herrera [Wed, 30 Sep 2020 15:16:23 +0000 (15:16 +0000)]
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/

3 years agoTranslated using Weblate (Norwegian Nynorsk)
Karl Ove Hufthammer [Sun, 20 Sep 2020 13:02:19 +0000 (13:02 +0000)]
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/

3 years agoswitch-on-port-available: Add logging for port availability group
Igor V. Kovalenko [Thu, 19 Nov 2020 18:45:40 +0000 (21:45 +0300)]
switch-on-port-available: Add logging for port availability group

3 years agomodule-alsa-card: Add debug logging if availability group was pruned
Igor V. Kovalenko [Fri, 20 Nov 2020 07:52:12 +0000 (10:52 +0300)]
module-alsa-card: Add debug logging if availability group was pruned

3 years agoi18n: Update pulseaudio.pot
Igor V. Kovalenko [Sat, 21 Nov 2020 13:49:10 +0000 (16:49 +0300)]
i18n: Update pulseaudio.pot

3 years agopactl: explicitly print if port availability is unknown
Igor V. Kovalenko [Tue, 3 Nov 2020 17:23:20 +0000 (20:23 +0300)]
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.

3 years agomodule-alsa-card: Drop availability groups with only one port
Arun Raghavan [Fri, 30 Oct 2020 19:01:19 +0000 (15:01 -0400)]
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

3 years agoswitch-on-port-available: Switch to headphones on unknown availability
Arun Raghavan [Wed, 11 Nov 2020 02:04:11 +0000 (21:04 -0500)]
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

3 years agoalsa-mixer: Remove references to non-existent multichannel paths
Tanu Kaskinen [Sat, 31 Oct 2020 10:00:54 +0000 (12:00 +0200)]
alsa-mixer: Remove references to non-existent multichannel paths

We don't have any mixer configuration for the multichannel mappings.

3 years agogitlab: Remove trailing whitespace from the issue template
Tanu Kaskinen [Sat, 31 Oct 2020 07:43:26 +0000 (09:43 +0200)]
gitlab: Remove trailing whitespace from the issue template

3 years agoalsa-mixer: Fix jack name comparison v13.99.3
Tanu Kaskinen [Sun, 4 Oct 2020 10:18:16 +0000 (13:18 +0300)]
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.

3 years agoalsa-mixer: Set availability groups once per card
Tanu Kaskinen [Sun, 4 Oct 2020 10:00:58 +0000 (13:00 +0300)]
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.

3 years agosink, source: Skip filter streams while changing default sink/source
Arun Raghavan [Mon, 26 Oct 2020 15:45:27 +0000 (11:45 -0400)]
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

3 years agoalsa: move the exceptionally large value errors from error to debug level
Jaroslav Kysela [Wed, 14 Oct 2020 15:16:44 +0000 (17:16 +0200)]
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>
3 years agobuild-sys: Set the GStreamer RTP backend to disabled by default
Arun Raghavan [Wed, 14 Oct 2020 13:09:53 +0000 (09:09 -0400)]
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.

3 years agortp: gstreamer: Account for rounding errors in RTP timestamp conversion
Arun Raghavan [Thu, 22 Oct 2020 14:12:03 +0000 (10:12 -0400)]
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.

3 years agortp: gstreamer: Don't count on buffer DTS for capture time
Arun Raghavan [Thu, 22 Oct 2020 14:06:40 +0000 (10:06 -0400)]
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.

3 years agomodule-bluez5-discover: avoid use after free on de-init
Igor V. Kovalenko [Thu, 15 Oct 2020 20:55:17 +0000 (23:55 +0300)]
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.

3 years agobuild-sys: meson: adjust path to gsettings-helper runing from build tree
Igor V. Kovalenko [Thu, 15 Oct 2020 21:24:50 +0000 (00:24 +0300)]
build-sys: meson: adjust path to gsettings-helper runing from build tree

3 years agobuild-sys: meson: Add libm dep to raop module
Arun Raghavan [Tue, 20 Oct 2020 18:36:20 +0000 (14:36 -0400)]
build-sys: meson: Add libm dep to raop module

This is required for using pow().

3 years agodevice-port: fire port available changed hook after streams are moved
Igor V. Kovalenko [Mon, 19 Oct 2020 05:29:43 +0000 (08:29 +0300)]
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

3 years agoRevert "alsa-mixer: support up to 8 channels per mixer element"
Arun Raghavan [Wed, 14 Oct 2020 01:03:30 +0000 (21:03 -0400)]
Revert "alsa-mixer: support up to 8 channels per mixer element"

This reverts commit e0ab9fa4a478a79fac5fa25a957daff4947d5133.

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

3 years agoci: Fix comment
Tanu Kaskinen [Tue, 13 Oct 2020 14:14:00 +0000 (17:14 +0300)]
ci: Fix comment

The UBUNTU_DEBS variable has been replaced by FDO_DISTRIBUTION_PACKAGES.

3 years agomodule-stream-restore: check if dbus entry exists in dbus_entries map before creating it
Igor V. Kovalenko [Tue, 13 Oct 2020 06:36:50 +0000 (09:36 +0300)]
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

3 years agomodule-stream-restore: log error writing volume/mute/device entry to database
Igor V. Kovalenko [Tue, 13 Oct 2020 06:50:31 +0000 (09:50 +0300)]
module-stream-restore: log error writing volume/mute/device entry to database

3 years agoalsa-mixer: support up to 8 channels per mixer element
Jaroslav Kysela [Mon, 4 May 2020 11:04:28 +0000 (13:04 +0200)]
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>
3 years agoalsa-mixer: Document the intended-roles mapping option
Tanu Kaskinen [Tue, 13 Oct 2020 10:22:11 +0000 (13:22 +0300)]
alsa-mixer: Document the intended-roles mapping option

3 years agoalsa: fix type for legacy hdmi devices
Jaroslav Kysela [Sun, 4 Oct 2020 19:35:52 +0000 (21:35 +0200)]
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>
3 years agoalsa: fix analog-input-microphone-headset device type
Jaroslav Kysela [Fri, 18 Sep 2020 14:32:00 +0000 (16:32 +0200)]
alsa: fix analog-input-microphone-headset device type

From: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
3 years agoalsa: mixer - reorder the type field in path parser
Jaroslav Kysela [Fri, 18 Sep 2020 14:30:02 +0000 (16:30 +0200)]
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>
3 years agoalsa-mixer: Add Razer Kraken Tournament Edition USB headset
Michael Pivonka [Sat, 26 Sep 2020 16:39:37 +0000 (12:39 -0400)]
alsa-mixer: Add Razer Kraken Tournament Edition USB headset

3 years agomacos: Add missing import statement
Ralph Seichter [Thu, 10 Sep 2020 18:25:05 +0000 (20:25 +0200)]
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

4 years agortp: Fix sending of small packets
Sanchayan Maity [Mon, 7 Sep 2020 13:05:40 +0000 (18:35 +0530)]
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.

4 years agoUpdate Portuguese translation
Juliano de Souza Camargo [Sat, 19 Sep 2020 03:39:58 +0000 (04:39 +0100)]
Update Portuguese translation

4 years agobuild-sys: Bump gettext dependency v13.99.2
Arun Raghavan [Mon, 21 Sep 2020 00:11:52 +0000 (20:11 -0400)]
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.

4 years agobuild-sys: Add doxygen/meson.build to distfiles
Arun Raghavan [Sun, 20 Sep 2020 23:02:56 +0000 (19:02 -0400)]
build-sys: Add doxygen/meson.build to distfiles

4 years agobuild-sys: Bump soversions
Arun Raghavan [Sun, 20 Sep 2020 22:43:05 +0000 (18:43 -0400)]
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.

4 years agoucm: add possibility to skip the UCM card completely (Linked)
Jaroslav Kysela [Sun, 7 Jun 2020 16:25:41 +0000 (18:25 +0200)]
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>
4 years agoUpdate Brazilian Portuguese translation
Rafael Fontenelle [Sat, 12 Sep 2020 15:24:11 +0000 (12:24 -0300)]
Update Brazilian Portuguese translation

4 years agoman: client.conf: Explain that autospawn=no doesn't disable systemd autostarting
Tanu Kaskinen [Fri, 11 Sep 2020 08:13:02 +0000 (11:13 +0300)]
man: client.conf: Explain that autospawn=no doesn't disable systemd autostarting

4 years agoTranslated using Weblate (Italian)
Milo Casagrande [Mon, 7 Sep 2020 08:56:16 +0000 (08:56 +0000)]
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/

4 years agoTranslated using Weblate (Swedish)
Göran Uddeborg [Thu, 13 Aug 2020 19:24:58 +0000 (19:24 +0000)]
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/

4 years agoalsa-mixer: Add an explicit profile-set for Audigy devices
Arun Raghavan [Tue, 11 Aug 2020 04:46:56 +0000 (00:46 -0400)]
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

4 years agoman: mention that exit-idle-time is complied if the user is lingering
Tom Yan [Sun, 16 Aug 2020 22:16:23 +0000 (22:16 +0000)]
man: mention that exit-idle-time is complied if the user is lingering

4 years agomain, core: check idle after loading conf
Tom Yan [Sun, 16 Aug 2020 20:16:01 +0000 (20:16 +0000)]
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.

4 years agopulsecore: Replace gendered pronouns with gender neutral ones
itsthem [Fri, 28 Aug 2020 13:15:50 +0000 (13:15 +0000)]
pulsecore: Replace gendered pronouns with gender neutral ones

4 years agoshell-completion: zsh: Correct a typo
Felix Yan [Fri, 14 Aug 2020 14:13:32 +0000 (14:13 +0000)]
shell-completion: zsh: Correct a typo

4 years agoi18n: Update pulseaudio.pot
Tanu Kaskinen [Thu, 13 Aug 2020 19:01:18 +0000 (22:01 +0300)]
i18n: Update pulseaudio.pot

4 years agoTranslated using Weblate (Hungarian)
Balázs Meskó [Mon, 20 Jul 2020 14:15:48 +0000 (14:15 +0000)]
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/

4 years agoTranslated using Weblate (Croatian)
Milo Ivir [Tue, 14 Jul 2020 18:17:36 +0000 (18:17 +0000)]
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/

4 years agoTranslated using Weblate (Dutch)
Geert Warrink [Fri, 10 Jul 2020 19:00:45 +0000 (19:00 +0000)]
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/

4 years agoalsa-mixer: Fix indentation
Tanu Kaskinen [Mon, 10 Aug 2020 17:56:43 +0000 (20:56 +0300)]
alsa-mixer: Fix indentation

4 years agoRename "available group" to "availability group"
Tanu Kaskinen [Wed, 17 Jun 2020 05:40:16 +0000 (08:40 +0300)]
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.

4 years agoalsa-mixer: Fix mapping_group_available() logic
Tanu Kaskinen [Tue, 21 Jul 2020 07:26:43 +0000 (10:26 +0300)]
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.

4 years agoImprove the port available_group and type documentation
Tanu Kaskinen [Wed, 17 Jun 2020 05:14:18 +0000 (08:14 +0300)]
Improve the port available_group and type documentation

4 years agomeson: Add doxygen target
Tanu Kaskinen [Mon, 10 Aug 2020 16:47:45 +0000 (19:47 +0300)]
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.

4 years agobuild-sys: Configure doxygen.conf.in a bit differently
Tanu Kaskinen [Mon, 10 Aug 2020 16:38:07 +0000 (19:38 +0300)]
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.

4 years agomodules: rtp-gstreamer: Fix RTP sound lag
Sanchayan Maity [Tue, 28 Jul 2020 08:41:05 +0000 (14:11 +0530)]
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>
4 years agomodule-alsa-card: Set a minimum profile priority if it's not set
Kai-Heng Feng [Thu, 6 Aug 2020 09:17:27 +0000 (17:17 +0800)]
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.

4 years agoraop-crypto: add missing header
Rosen Penev [Thu, 6 Aug 2020 01:32:03 +0000 (18:32 -0700)]
raop-crypto: add missing header

Fixes compilation without deprecated OpenSSL APIs.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years agomodules: fix wrong formats under 32-bit
Rosen Penev [Thu, 6 Aug 2020 01:38:19 +0000 (18:38 -0700)]
modules: fix wrong formats under 32-bit

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years agobuild: Make alsadatadir configurable
Jan Alexander Steffens (heftig) [Sun, 2 Aug 2020 15:43:03 +0000 (17:43 +0200)]
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.

4 years agomeson: Add missing thread_dep to atomic-test
Jan Alexander Steffens (heftig) [Sun, 9 Aug 2020 01:28:52 +0000 (03:28 +0200)]
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'

4 years agogitignore: Ignore hashmap-test
Tanu Kaskinen [Thu, 6 Aug 2020 11:34:56 +0000 (14:34 +0300)]
gitignore: Ignore hashmap-test

4 years agoalsa-mixer: Recognize USB audio jack mixer
Kai-Heng Feng [Mon, 3 Aug 2020 16:20:02 +0000 (00:20 +0800)]
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.

4 years agoudev: fix too long card name with HyperX Cloud Orbit S
Tanu Kaskinen [Tue, 4 Aug 2020 08:38:41 +0000 (11:38 +0300)]
udev: fix too long card name with HyperX Cloud Orbit S

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

4 years agomeson: Build atomic-test
Tanu Kaskinen [Tue, 4 Aug 2020 11:44:38 +0000 (14:44 +0300)]
meson: Build atomic-test

The test was missing from the build system.

4 years agobuild-sys: Build atomic-test only if pthread_setaffinity_np() is available
Tanu Kaskinen [Tue, 4 Aug 2020 11:42:59 +0000 (14:42 +0300)]
build-sys: Build atomic-test only if pthread_setaffinity_np() is available

The function seems to be essential to the test, so the test has to be
disabled entirely if pthread_setaffinity_np() is not available.

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

4 years agoalsa-util: fix check for digit
Wim Taymans [Mon, 3 Aug 2020 07:58:39 +0000 (09:58 +0200)]
alsa-util: fix check for digit

Fix the check for a digit by checking if the value is between the
*character* '0' (not *value* 0) and '9'.

4 years agoalsa-mixer: add support for Astro A50 gaming headset
Tomasz Kontusz [Sun, 12 Jul 2020 12:53:14 +0000 (14:53 +0200)]
alsa-mixer: add support for Astro A50 gaming headset

4 years agoalsa-mixer: add description-key to Mappings and Profiles
Tomasz Kontusz [Wed, 22 Jul 2020 05:45:22 +0000 (07:45 +0200)]
alsa-mixer: add description-key to Mappings and Profiles

4 years agoalsa-mixer: Remove unused iec958-passthrough* descriptions
Tomasz Kontusz [Mon, 20 Jul 2020 15:55:18 +0000 (17:55 +0200)]
alsa-mixer: Remove unused iec958-passthrough* descriptions

They were unused since 20f1fa17bebe086cb9cff09a5157dc7ca009ba61.

4 years agoalsa-mixer: Fix well-known descriptions for steelseries game/chat outputs
Tomasz Kontusz [Sun, 19 Jul 2020 13:06:55 +0000 (15:06 +0200)]
alsa-mixer: Fix well-known descriptions for steelseries game/chat outputs