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 <perex@perex.cz>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/670>
This commit is contained in:
Jaroslav Kysela 2021-12-16 11:01:05 +01:00
parent 4d98c8bbf1
commit 663e41f933

View file

@ -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);
}
}