From 7e678d70c20e5d9f55b72ef0da6d8c0b38067b17 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 24 Oct 2022 10:02:51 +0200 Subject: [PATCH] control: namehint - do not support 'card' devices 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 --- src/control/namehint.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/control/namehint.c b/src/control/namehint.c index e4f696ad..64ecafa5 100644 --- a/src/control/namehint.c +++ b/src/control/namehint.c @@ -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; -- 2.47.1