diff options
author | Tanu Kaskinen <tanuk@iki.fi> | 2018-06-01 11:24:01 +0300 |
---|---|---|
committer | Arun Raghavan <arun@arunraghavan.net> | 2018-06-21 06:30:25 +0530 |
commit | 3455d62e4906174e83bf0ea9af8b584808d3e779 (patch) | |
tree | 21012a49276ff2c54c2718309cebfe7f37d77c1b /src/modules/alsa/alsa-mixer.c | |
parent | 5c2d28f6dff160c51fd6627323377795bbcd35b2 (diff) |
alsa-mixer: make the mono mapping a fallback only
If a sound card doesn't have the "front" device defined for it, we have
to use the "hw" device for stereo. Not so long ago, the analog-stereo
mapping had "hw:%f" in its device-strings and everything worked great,
except that it caused trouble with the Intel HDMI LPE driver that uses
the first "hw" device for HDMI, and we were incorrectly detecting it as
an analog device. That problem was fixed in commit ea3ebd09, which
removed "hw:%f" from analog-stereo and added a new stereo fallback
mapping for "hw".
Now the problem is that if a sound card doesn't have the "front" device
defined for it, and it supports both mono and stereo, only the mono
mapping is used, because the stereo mapping is only a fallback. This
patch makes the mono mapping a fallback too, so the mono mapping is used
only if there's absolutely nothing else that works.
This can cause trouble at least in theory. Maybe someone actually wants
to use mono output on a card that supports both mono and stereo. But
that seems quite unlikely.
Diffstat (limited to 'src/modules/alsa/alsa-mixer.c')
-rw-r--r-- | src/modules/alsa/alsa-mixer.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c index a07c43511..7d50fc7b8 100644 --- a/src/modules/alsa/alsa-mixer.c +++ b/src/modules/alsa/alsa-mixer.c @@ -4060,6 +4060,7 @@ static int mapping_verify(pa_alsa_mapping *m, const pa_channel_map *bonus) { static const struct description_map well_known_descriptions[] = { { "analog-mono", N_("Analog Mono") }, { "analog-stereo", N_("Analog Stereo") }, + { "mono-fallback", N_("Mono") }, { "stereo-fallback", N_("Stereo") }, /* Note: Not translated to "Analog Stereo Input", because the source * name gets "Input" appended to it automatically, so adding "Input" |