From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: External PCM plugin SDK Date: Fri, 11 Feb 2005 14:28:34 +0100 Message-ID: References: <1107958458.13863.43.camel@pegasus> <1107959869.13863.62.camel@pegasus> <1107970036.13863.77.camel@pegasus> <1107971323.13863.90.camel@pegasus> <1108038565.15974.20.camel@pegasus> <1108057507.15974.97.camel@pegasus> <1108058761.15974.107.camel@pegasus> <1108062270.15974.117.camel@pegasus> <1108124119.18099.23.camel@pegasus> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <1108124119.18099.23.camel@pegasus> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Marcel Holtmann Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Fri, 11 Feb 2005 13:15:19 +0100, Marcel Holtmann wrote: > > Hi Takashi, > > > > > ... and doesn't work as it is, unfortunately :-< > > > > > > > > dlcose() is called after snd_pcm_close(). > > > > We may need to build object caches in alsa-lib. > > > > This will improve the perfomance eventually, too. > > > > > > questions is what will break if you change it. The only official plugin > > > is the Jack plugin, right? So be bad and change this stuff and then fix > > > the plugins. > > > > The compatibility will be kept, I think. Only the plugins with a > > keep-alive flag are excluded from dlclose, and the objects are reused > > at the next open. > > but I think we still should implement something like init() and exit() > of the objects. Otherwise it would not be possible to handle this in a > correct way and we will get memory leaks and unclosed descriptors. We can add the clean up of cached plugin objects (i.e. calling dlclose) in the existing snd_config_update_free_global(). This function is supposed to be used for clean up of config tree cache. Each plugin with the keep-alive flag can have functions with __attribute__((constructor)) and __attribute__((destructor)) for the purpose above. Takashi ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click