mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-06 13:29:59 -05:00
namehint: Fix the listing without device number
The current code of snd_device_name_hint() has a bug when listing up devices without the device index (e.g. ctl). Because it assigns the default device index 0 unconditionally and it has a check at the later point to filter entries with dev >= 0, it ended up with empty outputs. The fix is simply to remove the bogus assignment of dev = 0. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
bf98b4e316
commit
c8667e3db4
1 changed files with 0 additions and 1 deletions
|
|
@ -272,7 +272,6 @@ static int try_config(snd_config_t *config,
|
|||
if (snd_config_search(cfg1, "type", &cfg) >= 0 &&
|
||||
snd_config_get_string(cfg, &str) >= 0 &&
|
||||
strcmp(str, "hw") == 0) {
|
||||
dev = 0;
|
||||
list->device_input = -1;
|
||||
list->device_output = -1;
|
||||
if (snd_config_search(cfg1, "device", &cfg) >= 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue