]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Fix device number assignment in hints
authorTakashi Iwai <tiwai@suse.de>
Fri, 7 Mar 2008 16:00:45 +0000 (17:00 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 7 Mar 2008 16:00:45 +0000 (17:00 +0100)
Handle the device number properly if given in hints.
The current code resets the device number to -1 wrongly.

src/control/namehint.c

index 11adcaa10d170b69e35f98147acd73b212a286a1..d62830bd78891a52e2110ba5e7ea0abc2a007a04 100644 (file)
@@ -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) {