ao_alsa: filter fewer devices

It appears some device can be missing if we filter too many. In
particular, I've seen devices starting with "front" and "sysdefault"
being mapped to different hardware. I conclude that it's not sane trying
to present a nice device list to users in ALSA. It's fucked. (Although
kodi appears to attempt some intense "beautification" of the device
list, which includes parsing parameters from the device name and such.
Well, let's not.)

No other audio API requires such ridiculous acrobatics.
This commit is contained in:
wm4 2017-03-14 15:46:11 +01:00
parent bc04acf3a7
commit 2827a615dc
1 changed files with 2 additions and 4 deletions

View File

@ -1143,10 +1143,8 @@ alsa_error:
static bool is_useless_device(char *name)
{
char *crap[] = {"front", "rear", "center_lfe", "side", "surround21",
"surround40", "surround41", "surround50", "surround51", "surround71",
"sysdefault", "pulse", "null", "dsnoop", "dmix", "hw", "iec958",
"default"};
return false;
char *crap[] = {"rear", "center_lfe", "side", "pulse", "null", "dsnoop", "hw"};
for (int i = 0; i < MP_ARRAY_SIZE(crap); i++) {
int l = strlen(crap[i]);
if (name && strncmp(name, crap[i], l) == 0 &&