mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
Set PCM name properly in empty and asym plugins
The PCM name isn't set properly on empty and asym plugins due to its call of snd_pcm_open_slave(). Now a new function snd_pcm_open_named_slave() is created and make snd_pcm_open_slave() an inline function calling the new one with name=NULL.
This commit is contained in:
parent
a2d98ebd42
commit
72ede8a12d
4 changed files with 21 additions and 9 deletions
|
|
@ -2226,9 +2226,10 @@ int snd_pcm_free(snd_pcm_t *pcm)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int snd_pcm_open_slave(snd_pcm_t **pcmp, snd_config_t *root,
|
||||
snd_config_t *conf, snd_pcm_stream_t stream,
|
||||
int mode, snd_config_t *parent_conf)
|
||||
int snd_pcm_open_named_slave(snd_pcm_t **pcmp, const char *name,
|
||||
snd_config_t *root,
|
||||
snd_config_t *conf, snd_pcm_stream_t stream,
|
||||
int mode, snd_config_t *parent_conf)
|
||||
{
|
||||
const char *str;
|
||||
int hop;
|
||||
|
|
@ -2238,7 +2239,7 @@ int snd_pcm_open_slave(snd_pcm_t **pcmp, snd_config_t *root,
|
|||
if (snd_config_get_string(conf, &str) >= 0)
|
||||
return snd_pcm_open_noupdate(pcmp, root, str, stream, mode,
|
||||
hop + 1);
|
||||
return snd_pcm_open_conf(pcmp, NULL, root, conf, stream, mode);
|
||||
return snd_pcm_open_conf(pcmp, name, root, conf, stream, mode);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue