mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
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 <perex@perex.cz>
This commit is contained in:
parent
3bb9c44375
commit
7e678d70c2
1 changed files with 1 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue