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.
This commit is contained in:
Takashi Iwai 2008-03-07 17:00:45 +01:00
parent 91726ddf83
commit e58bd6762f

View file

@ -304,8 +304,8 @@ static int try_config(struct hint_list *list,
err = -EINVAL; err = -EINVAL;
goto __cleanup; goto __cleanup;
} }
list->device_input = -1; list->device_input = dev;
list->device_output = -1; list->device_output = dev;
} }
if (snd_config_search(cfg, "device_input", &n) >= 0) { if (snd_config_search(cfg, "device_input", &n) >= 0) {
if (snd_config_get_integer(n, &list->device_input) < 0) { if (snd_config_get_integer(n, &list->device_input) < 0) {