All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: External PCM plugin SDK
Date: Mon, 14 Feb 2005 16:33:25 +0100	[thread overview]
Message-ID: <s5hpsz3cg1m.wl@alsa2.suse.de> (raw)
In-Reply-To: <1108174707.8001.7.camel@pegasus>

At Sat, 12 Feb 2005 03:18:27 +0100,
Marcel Holtmann wrote:
> 
> Hi Takashi,
> 
> > > > 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.
> > 
> > The below is a test patch to add the dlobj cache.
> > 
> > It adds a new mode flag to pcm open mode, SND_PCM_KEEP_ALIVE.
> > In xmms, change the call of snd_pcm_open() like:
> > 
> > 	snd_pcm_open(...., SND_PCM_NONBLOCK | SND_PCM_KEEP_ALIVE);
> > 
> > and the dl object will remain alive until
> > snd_config_update_free_global() is called explicitly.
> > 
> > If the plugin needs always keep-alive, a bit more change is needed.
> 
> I personal think that the object caching should be transparent for the
> applications, but I don't have the insides into the ALSA library. If it
> is too hard then this might be a good solution.

I introduced the additional flag just for compatibility.
But, maybe I was too nervous about that.  Basically there is no big
problem to use dl-object cache for all cases.

OK, now the CVS version keeps the dl-objects.


> However I won't have enough time to test this in detail for the next two
> weeks, but the pcm_a2dp plugin is committed to the BlueZ CVS and maybe
> some others want to give it a try.

Has anyone tried?  Any feedback is welcome.


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

  reply	other threads:[~2005-02-14 15:33 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-08 21:30 External PCM plugin SDK Takashi Iwai
2005-02-09 14:14 ` Marcel Holtmann
2005-02-09 14:20   ` Takashi Iwai
2005-02-09 14:37     ` Marcel Holtmann
2005-02-09 15:19       ` Takashi Iwai
2005-02-09 17:27         ` Marcel Holtmann
2005-02-09 17:32           ` Takashi Iwai
2005-02-09 17:48             ` Marcel Holtmann
2005-02-10 11:51               ` Takashi Iwai
2005-02-10 12:29                 ` Marcel Holtmann
2005-02-10 17:29                   ` Takashi Iwai
     [not found]                     ` <1108057507.15974.97.camel@pegasus>
2005-02-10 17:51                       ` Takashi Iwai
2005-02-10 18:06                         ` Marcel Holtmann
2005-02-10 18:21                           ` Takashi Iwai
2005-02-10 18:30                             ` Takashi Iwai
2005-02-10 19:04                               ` Marcel Holtmann
2005-02-11 10:50                                 ` Takashi Iwai
2005-02-11 12:15                                   ` Marcel Holtmann
2005-02-11 13:28                                     ` Takashi Iwai
2005-02-11 17:26                                       ` Takashi Iwai
2005-02-12  2:18                                         ` Marcel Holtmann
2005-02-14 15:33                                           ` Takashi Iwai [this message]
2005-02-09 17:38         ` Thierry Vignaud
2005-02-09 17:35           ` Takashi Iwai
2005-02-09 15:25     ` Jaroslav Kysela
2005-02-09 15:39       ` Takashi Iwai
2005-02-09 17:36   ` Thierry Vignaud
2005-02-09 17:38     ` Marcel Holtmann
2005-02-09 15:28 ` Alexander E. Patrakov
2005-02-09 15:29   ` Takashi Iwai
2005-02-09 17:40 ` Thierry Vignaud

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=s5hpsz3cg1m.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=marcel@holtmann.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.