Commit 8e1994614cff9b532446a3e3968d9c216254cdba

Sam Lantinga 2016-10-06T06:08:16

fix for finding ALSA hotplug devices on Steam Link James Zipperer The device names show up as "default:", not "hw:"

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c
index 2a3f3a3..c6ec6c6 100644
--- a/src/audio/alsa/SDL_alsa_audio.c
+++ b/src/audio/alsa/SDL_alsa_audio.c
@@ -779,7 +779,8 @@ ALSA_HotplugThread(void *arg)
                 }
 
                 /* only want physical hardware interfaces */
-                if (SDL_strncmp(name, "hw:", 3) == 0) {
+                if (SDL_strncmp(name, "hw:", 3) == 0 ||
+                    SDL_strncmp(name, "default:", 8) == 0) {
                     char *ioid = ALSA_snd_device_name_get_hint(hints[i], "IOID");
                     const SDL_bool isoutput = (ioid == NULL) || (SDL_strcmp(ioid, "Output") == 0);
                     const SDL_bool isinput = (ioid == NULL) || (SDL_strcmp(ioid, "Input") == 0);