mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									015c34bf15
								
							
						
					
					
						commit
						8dcce52ee0
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -645,8 +645,6 @@ static int snd_pcm_ladspa_allocate_instances(snd_pcm_t *pcm, snd_pcm_ladspa_t *l
 | 
				
			||||||
				return -EINVAL;
 | 
									return -EINVAL;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			list_add_tail(&instance->list, &plugin->instances);
 | 
								list_add_tail(&instance->list, &plugin->instances);
 | 
				
			||||||
			if (plugin->desc->activate)
 | 
					 | 
				
			||||||
				plugin->desc->activate(instance->handle);
 | 
					 | 
				
			||||||
			if (plugin->policy == SND_PCM_LADSPA_POLICY_DUPLICATE) {
 | 
								if (plugin->policy == SND_PCM_LADSPA_POLICY_DUPLICATE) {
 | 
				
			||||||
				err = snd_pcm_ladspa_connect_plugin_duplicate(plugin, &plugin->input, &plugin->output, instance, idx);
 | 
									err = snd_pcm_ladspa_connect_plugin_duplicate(plugin, &plugin->input, &plugin->output, instance, idx);
 | 
				
			||||||
				if (err < 0) {
 | 
									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);
 | 
								assert(err >= 0);
 | 
				
			||||||
			err = snd_pcm_ladspa_connect_controls(plugin, &plugin->output, instance);
 | 
								err = snd_pcm_ladspa_connect_controls(plugin, &plugin->output, instance);
 | 
				
			||||||
			assert(err >= 0);
 | 
								assert(err >= 0);
 | 
				
			||||||
 | 
								if (plugin->desc->activate)
 | 
				
			||||||
 | 
									plugin->desc->activate(instance->handle);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		err = snd_pcm_ladspa_check_connect(plugin, &plugin->input, &instance->input, depth);
 | 
							err = snd_pcm_ladspa_check_connect(plugin, &plugin->input, &instance->input, depth);
 | 
				
			||||||
		if (err < 0)
 | 
							if (err < 0)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue