OBS-URL: https://build.opensuse.org/request/show/1079582 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pipewire?expand=0&rev=123
44 lines
2.1 KiB
Diff
44 lines
2.1 KiB
Diff
From 916f1cdfbfdc414d83031aef941a9909d1e603bd Mon Sep 17 00:00:00 2001
|
|
From: Wim Taymans <wtaymans@redhat.com>
|
|
Date: Fri, 14 Apr 2023 16:32:18 +0200
|
|
Subject: [PATCH] Revert "alsa-mixer: allow to re-attach the mixer control
|
|
element"
|
|
|
|
This reverts commit b554fc20e9ff97064721c89eb15b1b45870584e5.
|
|
---
|
|
spa/plugins/alsa/acp/alsa-util.c | 16 ++++------------
|
|
1 file changed, 4 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/spa/plugins/alsa/acp/alsa-util.c b/spa/plugins/alsa/acp/alsa-util.c
|
|
index 38ae934eb3..c76cef3e21 100644
|
|
--- a/spa/plugins/alsa/acp/alsa-util.c
|
|
+++ b/spa/plugins/alsa/acp/alsa-util.c
|
|
@@ -1648,20 +1648,12 @@ static int mixer_class_event(snd_mixer_class_t *class, unsigned int mask,
|
|
} else if (mask & SND_CTL_EVENT_MASK_ADD) {
|
|
snd_ctl_elem_iface_t iface = snd_hctl_elem_get_interface(helem);
|
|
if (iface == SND_CTL_ELEM_IFACE_CARD || iface == SND_CTL_ELEM_IFACE_PCM) {
|
|
- snd_mixer_t *mixer = snd_mixer_class_get_mixer(class);
|
|
- snd_ctl_elem_iface_t iface = snd_hctl_elem_get_interface(helem);
|
|
- const char *name = snd_hctl_elem_get_name(helem);
|
|
- const int index = snd_hctl_elem_get_index(helem);
|
|
- const int device = snd_hctl_elem_get_device(helem);
|
|
snd_mixer_elem_t *new_melem;
|
|
|
|
- new_melem = pa_alsa_mixer_find(mixer, iface, name, index, device);
|
|
- if (!new_melem) {
|
|
- /* Put the hctl pointer as our private data - it will be useful for callbacks */
|
|
- if ((err = snd_mixer_elem_new(&new_melem, SND_MIXER_ELEM_PULSEAUDIO, 0, helem, NULL)) < 0) {
|
|
- pa_log_warn("snd_mixer_elem_new failed: %s", pa_alsa_strerror(err));
|
|
- return 0;
|
|
- }
|
|
+ /* Put the hctl pointer as our private data - it will be useful for callbacks */
|
|
+ if ((err = snd_mixer_elem_new(&new_melem, SND_MIXER_ELEM_PULSEAUDIO, 0, helem, NULL)) < 0) {
|
|
+ pa_log_warn("snd_mixer_elem_new failed: %s", pa_alsa_strerror(err));
|
|
+ return 0;
|
|
}
|
|
|
|
if ((err = snd_mixer_elem_attach(new_melem, helem)) < 0) {
|
|
--
|
|
2.40.0
|
|
|