mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
ucm: do not cache all control devices in get_card_long_name()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
27f97ab585
commit
b9b2247943
1 changed files with 8 additions and 1 deletions
|
|
@ -1453,6 +1453,9 @@ static int get_card_long_name(snd_use_case_mgr_t *mgr, char *longname)
|
|||
while (card >= 0) {
|
||||
char name[32];
|
||||
|
||||
/* most probably, we do not need to cache all CTL devices here */
|
||||
uc_mgr_free_ctl_list(mgr);
|
||||
|
||||
sprintf(name, "hw:%d", card);
|
||||
err = get_card_info(mgr, name, &ctl, info);
|
||||
|
||||
|
|
@ -1472,6 +1475,8 @@ static int get_card_long_name(snd_use_case_mgr_t *mgr, char *longname)
|
|||
}
|
||||
}
|
||||
|
||||
uc_mgr_free_ctl_list(mgr);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -1577,8 +1582,10 @@ __longname:
|
|||
__parse:
|
||||
err = parse_master_file(uc_mgr, cfg);
|
||||
snd_config_delete(cfg);
|
||||
if (err < 0)
|
||||
if (err < 0) {
|
||||
uc_mgr_free_ctl_list(uc_mgr);
|
||||
uc_mgr_free_verb(uc_mgr);
|
||||
}
|
||||
|
||||
return err;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue