Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Larisch <mail@matthias-larisch.de>
To: alsa-devel@alsa-project.org
Cc: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] src/pcm/pcm_ladspa.c: Delay LADSPA plugin activate call
Date: Thu, 27 Mar 2014 19:05:10 +0100	[thread overview]
Message-ID: <20140327190510.5cf481d0@purefruit> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1342 bytes --]

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>
---
 src/pcm/pcm_ladspa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/pcm/pcm_ladspa.c b/src/pcm/pcm_ladspa.c
index 9ce5242..7d1e3df 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)
-- 
1.9.1

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



             reply	other threads:[~2014-03-27 18:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27 18:05 Matthias Larisch [this message]
2014-04-03 10:02 ` [PATCH] src/pcm/pcm_ladspa.c: Delay LADSPA plugin activate call Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140327190510.5cf481d0@purefruit \
    --to=mail@matthias-larisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox