From 2827a615dc80674770ef38f3cd9bd07d902ef476 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 14 Mar 2017 15:46:11 +0100 Subject: 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. --- audio/out/ao_alsa.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'audio') diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c index f9d8f9a335..e2f9130f98 100644 --- a/audio/out/ao_alsa.c +++ b/audio/out/ao_alsa.c @@ -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 && -- cgit v1.2.3