Added context handling for snd_config_expand.

PCM slave configuration is now dynamic.
This commit is contained in:
Jaroslav Kysela 2001-06-16 22:03:23 +00:00
parent 43455a9268
commit 1e0c53a11c
26 changed files with 259 additions and 218 deletions

View file

@ -578,10 +578,12 @@ int _snd_pcm_adpcm_open(snd_pcm_t **pcmp, const char *name,
return err;
if (snd_pcm_format_linear(sformat) != 1 &&
sformat != SND_PCM_FORMAT_IMA_ADPCM) {
snd_config_delete(sconf);
SNDERR("invalid slave format");
return -EINVAL;
}
err = snd_pcm_open_slave(&spcm, root, sconf, stream, mode);
snd_config_delete(sconf);
if (err < 0)
return err;
err = snd_pcm_adpcm_open(pcmp, name, sformat, spcm, 1);