summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-03-14 15:46:11 +0100
committerwm4 <wm4@nowhere>2017-03-14 15:50:24 +0100
commit2827a615dc80674770ef38f3cd9bd07d902ef476 (patch)
treeb2e8b36733e07a6c10e61259b7b92d40e9cf32d9 /audio
parentbc04acf3a76eb579ad0012286ac3bfeadaa07cc0 (diff)
downloadmpv-2827a615dc80674770ef38f3cd9bd07d902ef476.tar.bz2
mpv-2827a615dc80674770ef38f3cd9bd07d902ef476.tar.xz
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.
Diffstat (limited to 'audio')
-rw-r--r--audio/out/ao_alsa.c6
1 files changed, 2 insertions, 4 deletions
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 &&