alsa-mixer: Pick at most one fallback mapping
authorTanu Kaskinen <tanuk@iki.fi>
Sat, 6 Jun 2020 14:00:01 +0000 (17:00 +0300)
committerPulseAudio Marge Bot <pulseaudio-maintainers@lists.freedesktop.org>
Mon, 14 Dec 2020 19:31:28 +0000 (19:31 +0000)
commite3f2c25face8f964827f75dbc8fd766fc02aaf6d
tree8750dc2fd53641d7ad1880232fa35a585c2ca046
parent9b0ae8327d990584bb9a966d8d7bee6badbdb8c0
alsa-mixer: Pick at most one fallback mapping

The old behaviour was such that if none of the normal mappings worked,
we would probe ALL fallbacks. I don't think that makes sense, and it
caused concrete issues: let's say we have a regular stereo mic device,
but there's no "front" PCM defined for it. In this situation we would
probe the stereo-fallback mapping (which uses "hw" instead of "front"),
and it would work, but then we'd also probe the "multichannel-input"
mapping, which would also work, so we end up with two mappings that
don't have any difference in behaviour.

I think it's better to simply pick the first working fallback and ignore
the rest.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/901
(issue is marked as confidential due to unreleased hardware)

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/304>
src/modules/alsa/alsa-mixer.c