From 8d554635af336c89203676d3ff652ee87a5501a7 Mon Sep 17 00:00:00 2001 From: Abramo Bagnara Date: Sat, 14 Oct 2000 10:43:02 +0000 Subject: [PATCH] Interpret id as card if a definition is not found --- src/control/control.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/control/control.c b/src/control/control.c index e0b6c058..341af124 100644 --- a/src/control/control.c +++ b/src/control/control.c @@ -163,8 +163,10 @@ int snd_ctl_open(snd_ctl_t **ctlp, char *name) if (err < 0) return err; err = snd_config_searchv(snd_config, &ctl_conf, "ctl", name, 0); - if (err < 0) - return err; + if (err < 0) { + int cardno = snd_card_get_index(name); + return snd_ctl_hw_open(ctlp, name, cardno); + } if (snd_config_type(ctl_conf) != SND_CONFIG_TYPE_COMPOUND) return -EINVAL; err = snd_config_search(ctl_conf, "type", &conf); -- 2.47.1