From: Takashi Iwai Date: Fri, 7 Mar 2008 16:00:45 +0000 (+0100) Subject: Fix device number assignment in hints X-Git-Tag: v1.0.17rc1~18 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=e58bd6762f726872efa0b5a377f7f3f891d08ad1;p=alsa-lib.git Fix device number assignment in hints Handle the device number properly if given in hints. The current code resets the device number to -1 wrongly. --- diff --git a/src/control/namehint.c b/src/control/namehint.c index 11adcaa1..d62830bd 100644 --- a/src/control/namehint.c +++ b/src/control/namehint.c @@ -304,8 +304,8 @@ static int try_config(struct hint_list *list, err = -EINVAL; goto __cleanup; } - list->device_input = -1; - list->device_output = -1; + list->device_input = dev; + list->device_output = dev; } if (snd_config_search(cfg, "device_input", &n) >= 0) { if (snd_config_get_integer(n, &list->device_input) < 0) {