diff options
author | Matthias Larisch <mail@matthias-larisch.de> | 2014-03-27 19:05:10 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-04-03 12:02:03 +0200 |
commit | 8dcce52ee09b12d977ea23ccd281a17bdcc5414e (patch) | |
tree | b2375c81c8957eda8d492a64434f89e7529780e0 | |
parent | 015c34bf1540a97f8920bf9e3bdff0e80293a053 (diff) | |
download | alsa-lib-8dcce52ee09b12d977ea23ccd281a17bdcc5414e.tar.gz |
pcm: ladspa: Delay LADSPA plugin activate call
Some LADSPA Plugins rely on connected control ports on activate call.
While this is not okay by spec, the spec also encourages the activate
call happening as late as possible.
Signed-off-by: Matthias Larisch <mail@matthias-larisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | src/pcm/pcm_ladspa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pcm/pcm_ladspa.c b/src/pcm/pcm_ladspa.c index 9ce5242e..7d1e3df8 100644 --- a/src/pcm/pcm_ladspa.c +++ b/src/pcm/pcm_ladspa.c @@ -645,8 +645,6 @@ static int snd_pcm_ladspa_allocate_instances(snd_pcm_t *pcm, snd_pcm_ladspa_t *l return -EINVAL; } list_add_tail(&instance->list, &plugin->instances); - if (plugin->desc->activate) - plugin->desc->activate(instance->handle); if (plugin->policy == SND_PCM_LADSPA_POLICY_DUPLICATE) { err = snd_pcm_ladspa_connect_plugin_duplicate(plugin, &plugin->input, &plugin->output, instance, idx); if (err < 0) { @@ -664,6 +662,8 @@ static int snd_pcm_ladspa_allocate_instances(snd_pcm_t *pcm, snd_pcm_ladspa_t *l assert(err >= 0); err = snd_pcm_ladspa_connect_controls(plugin, &plugin->output, instance); assert(err >= 0); + if (plugin->desc->activate) + plugin->desc->activate(instance->handle); } err = snd_pcm_ladspa_check_connect(plugin, &plugin->input, &instance->input, depth); if (err < 0) |