]> git.alsa-project.org Git - alsa-lib.git/commitdiff
control: namehint - do not support 'card' devices
authorJaroslav Kysela <perex@perex.cz>
Mon, 24 Oct 2022 08:02:51 +0000 (10:02 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 24 Oct 2022 08:02:54 +0000 (10:02 +0200)
The card: devices do not exist. Do not return -ENOENT,
but -EINVAL in this case.

Fixes: https://github.com/alsa-project/alsa-lib/issues/277
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/control/namehint.c

index e4f696ad061d1c5806e06920f7555fdd4113491d..64ecafa5751d9cb43a191775fc557b820a2482e1 100644 (file)
@@ -602,9 +602,7 @@ int snd_device_name_hint(int card, const char *iface, void ***hints)
        list.siface = iface;
        list.show_all = 0;
        list.cardname = NULL;
-       if (strcmp(iface, "card") == 0)
-               list.iface = SND_CTL_ELEM_IFACE_CARD;
-       else if (strcmp(iface, "pcm") == 0)
+       if (strcmp(iface, "pcm") == 0)
                list.iface = SND_CTL_ELEM_IFACE_PCM;
        else if (strcmp(iface, "rawmidi") == 0)
                list.iface = SND_CTL_ELEM_IFACE_RAWMIDI;