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:
Takashi Iwai 2007-11-26 12:29:37 +01:00
parent a2d98ebd42
commit 72ede8a12d
4 changed files with 21 additions and 9 deletions

View file

@ -749,9 +749,18 @@ int snd_pcm_slave_conf(snd_config_t *root, snd_config_t *conf,
#define SND_PCM_APPEND (1<<8)
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);
static inline 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)
{
return snd_pcm_open_named_slave(pcmp, NULL, root, conf, stream,
mode, parent_conf);
}
int snd_pcm_conf_generic_id(const char *id);
int snd_pcm_hw_open_fd(snd_pcm_t **pcmp, const char *name, int fd, int mmap_emulation, int sync_ptr_ioctl);