mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Fix snd_pcm_open_noupdate() to refer alias
Fixed snd_pcm_open_noupdate() to refer alias. This fixes the call like % aplay -Dplug:bah where bah is an alias of a certain definition.
This commit is contained in:
parent
285d859974
commit
1827d9ccff
1 changed files with 9 additions and 2 deletions
|
|
@ -2138,13 +2138,20 @@ static int snd_pcm_open_noupdate(snd_pcm_t **pcmp, snd_config_t *root,
|
|||
{
|
||||
int err;
|
||||
snd_config_t *pcm_conf;
|
||||
const char *str;
|
||||
|
||||
err = snd_config_search_definition(root, "pcm", name, &pcm_conf);
|
||||
if (err < 0) {
|
||||
SNDERR("Unknown PCM %s", name);
|
||||
return err;
|
||||
}
|
||||
snd_config_set_hop(pcm_conf, hop);
|
||||
err = snd_pcm_open_conf(pcmp, name, root, pcm_conf, stream, mode);
|
||||
if (snd_config_get_string(pcm_conf, &str) >= 0)
|
||||
err = snd_pcm_open_noupdate(pcmp, root, str, stream, mode,
|
||||
hop + 1);
|
||||
else {
|
||||
snd_config_set_hop(pcm_conf, hop);
|
||||
err = snd_pcm_open_conf(pcmp, name, root, pcm_conf, stream, mode);
|
||||
}
|
||||
snd_config_delete(pcm_conf);
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue