mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
Removed snd_config_string_replace function.
Added back modified snd_config_refer_load function.
Added snd_func_private_pcm_subdevice function.
Removed the callback from the snd_sctl_build function (no more required).
Modified alsa.conf to use refer {} blocks again.
Modified card specific conf files to use new snd_func_private_pcm_subdevice function.
This commit is contained in:
parent
2ced309ee8
commit
3a993b4a3e
10 changed files with 304 additions and 314 deletions
|
|
@ -1001,12 +1001,25 @@ static int snd_pcm_open_noupdate(snd_pcm_t **pcmp, snd_config_t *root,
|
|||
const char *name, snd_pcm_stream_t stream, int mode)
|
||||
{
|
||||
int err;
|
||||
snd_config_t *pcm_conf;
|
||||
snd_config_t *pcm_conf, *n;
|
||||
err = snd_config_search_definition(root, "pcm", name, &pcm_conf);
|
||||
if (err < 0) {
|
||||
SNDERR("Unknown PCM %s", name);
|
||||
return err;
|
||||
}
|
||||
if (snd_config_search(pcm_conf, "refer", &n) >= 0) {
|
||||
snd_config_t *refer;
|
||||
char *new_name;
|
||||
err = snd_config_refer_load(&refer, &new_name, root, n);
|
||||
if (err < 0) {
|
||||
SNDERR("Unable to load refered block in PCM %s: %s", name, snd_strerror(err));
|
||||
return err;
|
||||
}
|
||||
err = snd_pcm_open_noupdate(pcmp, refer, new_name, stream, mode);
|
||||
if (refer != root)
|
||||
snd_config_delete(refer);
|
||||
return err;
|
||||
}
|
||||
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