From 663e41f933a842725303b0a60fd28de68480df21 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 16 Dec 2021 11:01:05 +0100 Subject: [PATCH] alsa: ucm - fix h/w mute mixer control probe BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/100 BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1849 Signed-off-by: Jaroslav Kysela Part-of: --- src/modules/alsa/alsa-ucm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c index 263f0a111..6ec9d7399 100644 --- a/src/modules/alsa/alsa-ucm.c +++ b/src/modules/alsa/alsa-ucm.c @@ -964,11 +964,12 @@ static void probe_volumes(pa_hashmap *hash, bool is_sink, snd_pcm_t *pcm_handle, if (pa_alsa_path_probe(path, NULL, mixer_handle, ignore_dB) < 0) { pa_log_warn("Could not probe path: %s, using s/w volume", path->name); pa_hashmap_remove(data->paths, profile); - } else if (!path->has_volume) { - pa_log_warn("Path %s is not a volume control", path->name); + } else if (!path->has_volume && !path->has_mute) { + pa_log_warn("Path %s is not a volume or mute control", path->name); pa_hashmap_remove(data->paths, profile); } else - pa_log_debug("Set up h/w volume using '%s' for %s:%s", path->name, profile, port->name); + pa_log_debug("Set up h/w %s using '%s' for %s:%s", path->has_volume ? "volume" : "mute", + path->name, profile, port->name); } }