diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2024-01-15 21:08:12 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2024-01-15 22:41:39 +0100 |
commit | 715f1e2e38983e25a4108fdf7ef0f12449617670 (patch) | |
tree | c21821733c328c0027ee22573be952162a6c5a57 /source/l/pulseaudio | |
parent | b12c0fed430cc064cc7ee88878c9f0c5ad8de86a (diff) | |
download | current-715f1e2e38983e25a4108fdf7ef0f12449617670.tar.gz current-715f1e2e38983e25a4108fdf7ef0f12449617670.tar.xz |
Mon Jan 15 21:08:12 UTC 202420240115210812
a/kernel-firmware-20240115_9b6d0b0-noarch-1.txz: Upgraded.
a/kernel-generic-6.6.12-x86_64-1.txz: Upgraded.
a/kernel-huge-6.6.12-x86_64-1.txz: Upgraded.
a/kernel-modules-6.6.12-x86_64-1.txz: Upgraded.
d/kernel-headers-6.6.12-x86-1.txz: Upgraded.
k/kernel-source-6.6.12-noarch-1.txz: Upgraded.
l/libxml2-2.12.4-x86_64-1.txz: Upgraded.
l/pulseaudio-17.0-x86_64-2.txz: Rebuilt.
Patch regressions:
[PATCH] alsa-ucm: Check UCM verb before working with device status.
[PATCH] alsa-ucm: Replace port device UCM context assertion with an error.
l/readline-8.2.010-x86_64-1.txz: Upgraded.
x/libinput-1.25.0-x86_64-1.txz: Upgraded.
isolinux/initrd.img: Rebuilt.
kernels/*: Upgraded.
usb-and-pxe-installers/usbboot.img: Rebuilt.
Diffstat (limited to 'source/l/pulseaudio')
3 files changed, 165 insertions, 2 deletions
diff --git a/source/l/pulseaudio/ed3d4f0837f670e5e5afb1afa5bcfc8ff05d3407.patch b/source/l/pulseaudio/ed3d4f0837f670e5e5afb1afa5bcfc8ff05d3407.patch new file mode 100644 index 000000000..3fd2adc0c --- /dev/null +++ b/source/l/pulseaudio/ed3d4f0837f670e5e5afb1afa5bcfc8ff05d3407.patch @@ -0,0 +1,64 @@ +From ed3d4f0837f670e5e5afb1afa5bcfc8ff05d3407 Mon Sep 17 00:00:00 2001 +From: Alper Nebi Yasak <alpernebiyasak@gmail.com> +Date: Fri, 1 Dec 2023 13:28:05 +0300 +Subject: [PATCH] alsa-ucm: Replace port device UCM context assertion with an + error + +The pa_alsa_ucm_set_port() function is passed both a mapping context and +a device port, and both of these refer to their respective UCM device. +While switching over to having one port per mapping per UCM device, I +expected both of these to be the same device struct, so added an assert +checking so. + +This assertion gets triggered when we have multiple UCM verbs declaring +the same UCM device name. The root cause here is that the ports' UCM +device references are set once while creating the ports for the card, so +they happen to be those of a specific verb and may not match those from +a different UCM verb's profiles' mappings. + +Solving the root cause necessitates a larger refactor. What we actually +assume here is that name of the UCM device is same for both the port and +the UCM context, which ends up always true in practice. For now, replace +the assert with a check and error. + +Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> +Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/802> +--- + src/modules/alsa/alsa-ucm.c | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c +index 7f5136249..018c01739 100644 +--- a/src/modules/alsa/alsa-ucm.c ++++ b/src/modules/alsa/alsa-ucm.c +@@ -1581,6 +1581,7 @@ int pa_alsa_ucm_set_port(pa_alsa_ucm_mapping_context *context, pa_device_port *p + pa_alsa_ucm_config *ucm; + pa_alsa_ucm_device *dev; + pa_alsa_ucm_port_data *data; ++ const char *dev_name, *ucm_dev_name; + + pa_assert(context && context->ucm); + +@@ -1588,8 +1589,17 @@ int pa_alsa_ucm_set_port(pa_alsa_ucm_mapping_context *context, pa_device_port *p + pa_assert(ucm->ucm_mgr); + + data = PA_DEVICE_PORT_DATA(port); +- dev = context->ucm_device; +- pa_assert(dev == data->device); ++ dev = data->device; ++ pa_assert(dev); ++ ++ if (context->ucm_device) { ++ dev_name = pa_proplist_gets(dev->proplist, PA_ALSA_PROP_UCM_NAME); ++ ucm_dev_name = pa_proplist_gets(context->ucm_device->proplist, PA_ALSA_PROP_UCM_NAME); ++ if (!pa_streq(dev_name, ucm_dev_name)) { ++ pa_log_error("Failed to set port %s with wrong UCM context: %s", dev_name, ucm_dev_name); ++ return -1; ++ } ++ } + + return ucm_device_enable(ucm, dev); + } +-- +GitLab + diff --git a/source/l/pulseaudio/f5cacd94abcc47003bd88ad7ca1450de649ffb15.patch b/source/l/pulseaudio/f5cacd94abcc47003bd88ad7ca1450de649ffb15.patch new file mode 100644 index 000000000..6e1bd3389 --- /dev/null +++ b/source/l/pulseaudio/f5cacd94abcc47003bd88ad7ca1450de649ffb15.patch @@ -0,0 +1,95 @@ +From f5cacd94abcc47003bd88ad7ca1450de649ffb15 Mon Sep 17 00:00:00 2001 +From: Alper Nebi Yasak <alpernebiyasak@gmail.com> +Date: Thu, 30 Nov 2023 20:17:22 +0300 +Subject: [PATCH] alsa-ucm: Check UCM verb before working with device status + +Some versions of the ALSA libraries run into a segmentation fault when +we query a UCM device/modifier status without first setting a UCM verb. +It's not a reasonable thing to do anyway, so check for this case and +return an error. Also do the check in other helpers. + +Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> +Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/801> +--- + src/modules/alsa/alsa-ucm.c | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + +diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c +index bb9438f79..7f5136249 100644 +--- a/src/modules/alsa/alsa-ucm.c ++++ b/src/modules/alsa/alsa-ucm.c +@@ -624,6 +624,11 @@ static long ucm_device_status(pa_alsa_ucm_config *ucm, pa_alsa_ucm_device *dev) + char *devstatus; + long status = 0; + ++ if (!ucm->active_verb) { ++ pa_log_error("Failed to get status for UCM device %s: no UCM verb set", dev_name); ++ return -1; ++ } ++ + devstatus = pa_sprintf_malloc("_devstatus/%s", dev_name); + if (snd_use_case_geti(ucm->ucm_mgr, devstatus, &status) < 0) { + pa_log_debug("Failed to get status for UCM device %s", dev_name); +@@ -637,6 +642,11 @@ static long ucm_device_status(pa_alsa_ucm_config *ucm, pa_alsa_ucm_device *dev) + static int ucm_device_disable(pa_alsa_ucm_config *ucm, pa_alsa_ucm_device *dev) { + const char *dev_name = pa_proplist_gets(dev->proplist, PA_ALSA_PROP_UCM_NAME); + ++ if (!ucm->active_verb) { ++ pa_log_error("Failed to disable UCM device %s: no UCM verb set", dev_name); ++ return -1; ++ } ++ + /* If any of dev's conflicting devices is enabled, trying to disable + * dev gives an error despite the fact that it's already disabled. + * Check that dev is enabled to avoid this error. */ +@@ -657,6 +667,11 @@ static int ucm_device_disable(pa_alsa_ucm_config *ucm, pa_alsa_ucm_device *dev) + static int ucm_device_enable(pa_alsa_ucm_config *ucm, pa_alsa_ucm_device *dev) { + const char *dev_name = pa_proplist_gets(dev->proplist, PA_ALSA_PROP_UCM_NAME); + ++ if (!ucm->active_verb) { ++ pa_log_error("Failed to enable UCM device %s: no UCM verb set", dev_name); ++ return -1; ++ } ++ + /* We don't need to enable devices that are already enabled */ + if (ucm_device_status(ucm, dev) > 0) { + pa_log_debug("UCM device %s is already enabled", dev_name); +@@ -707,6 +722,11 @@ static long ucm_modifier_status(pa_alsa_ucm_config *ucm, pa_alsa_ucm_modifier *m + char *modstatus; + long status = 0; + ++ if (!ucm->active_verb) { ++ pa_log_error("Failed to get status for UCM modifier %s: no UCM verb set", mod_name); ++ return -1; ++ } ++ + modstatus = pa_sprintf_malloc("_modstatus/%s", mod_name); + if (snd_use_case_geti(ucm->ucm_mgr, modstatus, &status) < 0) { + pa_log_debug("Failed to get status for UCM modifier %s", mod_name); +@@ -720,6 +740,11 @@ static long ucm_modifier_status(pa_alsa_ucm_config *ucm, pa_alsa_ucm_modifier *m + static int ucm_modifier_disable(pa_alsa_ucm_config *ucm, pa_alsa_ucm_modifier *mod) { + const char *mod_name = pa_proplist_gets(mod->proplist, PA_ALSA_PROP_UCM_NAME); + ++ if (!ucm->active_verb) { ++ pa_log_error("Failed to disable UCM modifier %s: no UCM verb set", mod_name); ++ return -1; ++ } ++ + /* We don't need to disable modifiers that are already disabled */ + if (ucm_modifier_status(ucm, mod) == 0) { + pa_log_debug("UCM modifier %s is already disabled", mod_name); +@@ -738,6 +763,11 @@ static int ucm_modifier_disable(pa_alsa_ucm_config *ucm, pa_alsa_ucm_modifier *m + static int ucm_modifier_enable(pa_alsa_ucm_config *ucm, pa_alsa_ucm_modifier *mod) { + const char *mod_name = pa_proplist_gets(mod->proplist, PA_ALSA_PROP_UCM_NAME); + ++ if (!ucm->active_verb) { ++ pa_log_error("Failed to disable UCM modifier %s: no UCM verb set", mod_name); ++ return -1; ++ } ++ + /* We don't need to enable modifiers that are already enabled */ + if (ucm_modifier_status(ucm, mod) > 0) { + pa_log_debug("UCM modifier %s is already enabled", mod_name); +-- +GitLab + diff --git a/source/l/pulseaudio/pulseaudio.SlackBuild b/source/l/pulseaudio/pulseaudio.SlackBuild index 910670e3c..788149095 100755 --- a/source/l/pulseaudio/pulseaudio.SlackBuild +++ b/source/l/pulseaudio/pulseaudio.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for pulseaudio # Copyright 2015 Christoph Willing Brisbane, Australia -# Copyright 2016, 2018, 2020 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2016, 2018, 2020, 2024 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=pulseaudio VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -94,6 +94,10 @@ zcat $CWD/pulseaudio-autostart.patch.gz | patch -p1 --verbose || exit 1 # When built by meson, this patch also required to fix the above issue: zcat $CWD/pulseaudio-autostart-meson.build.patch.gz | patch -p1 --verbose || exit 1 +# Fix 17.0 regressions: +zcat $CWD/ed3d4f0837f670e5e5afb1afa5bcfc8ff05d3407.patch.gz | patch -p1 --verbose || exit 1 +zcat $CWD/f5cacd94abcc47003bd88ad7ca1450de649ffb15.patch.gz | patch -p1 --verbose || exit 1 + # Configure, build, and install: export CFLAGS="$SLKCFLAGS" export CXXFLAGS="$SLKCFLAGS" |