alsa: don't assume that hw:x is an analog output

Previously, if front:x didn't work, we would try to use hw:x for analog
stereo output. There's no guarantee that hw:x is an analog output,
however. For example, the Intel HDMI LPE driver uses hw:x for HDMI
output, and PulseAudio incorrectly created analog profiles for that
card, because front:x doesn't work but hw:x does.

This patch changes things so that the analog stereo mapping doesn't any
more use hw:x as a fallback. A separate "unknown stereo" fallback
mapping is added to handle the rare case where hw:x is the only PCM
device that works.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=100488
This commit is contained in:
Tanu Kaskinen 2017-04-24 18:06:52 +03:00
parent 68203100ff
commit ea3ebd09d1
2 changed files with 10 additions and 2 deletions

View file

@ -4015,7 +4015,8 @@ static int mapping_verify(pa_alsa_mapping *m, const pa_channel_map *bonus) {
{ "iec958-ac3-surround-51", N_("Digital Surround 5.1 (IEC958/AC3)") },
{ "iec958-dts-surround-51", N_("Digital Surround 5.1 (IEC958/DTS)") },
{ "hdmi-stereo", N_("Digital Stereo (HDMI)") },
{ "hdmi-surround-51", N_("Digital Surround 5.1 (HDMI)") }
{ "hdmi-surround-51", N_("Digital Surround 5.1 (HDMI)") },
{ "unknown-stereo", N_("Stereo") },
};
pa_assert(m);
@ -4152,6 +4153,7 @@ static int profile_verify(pa_alsa_profile *p) {
{ "output:analog-stereo+input:analog-stereo", N_("Analog Stereo Duplex") },
{ "output:iec958-stereo+input:iec958-stereo", N_("Digital Stereo Duplex (IEC958)") },
{ "output:multichannel-output+input:multichannel-input", N_("Multichannel Duplex") },
{ "output:unknown-stereo+input:unknown-stereo", N_("Stereo Duplex") },
{ "off", N_("Off") }
};