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: Wed, 09 Feb 2005 16:19:57 +0100	[thread overview]
Message-ID: <s5hoeetsqua.wl@alsa2.suse.de> (raw)
In-Reply-To: <1107959869.13863.62.camel@pegasus>

At Wed, 09 Feb 2005 15:37:49 +0100,
Marcel Holtmann wrote:
> 
> Hi Takashi,
> 
> > > > I now commited a patch to add the external PCM plugin SDK to
> > > > alsa-lib.  This allows you to create ALSA PCM plugin outside the
> > > > alsa-lib tree.  It's still a draft version, and currently only the I/O
> > > > plugin (e.g. for implementation of user-space driver) is provided.
> > > > The filter-type plugin SDK (e.g. for effects) and the control plugin
> > > > SDK will follow later.
> > > > 
> > > > No documentation yet.  Look at the code :)
> > > > 
> > > > Example I/O plugins are found in alsa-plugins tree.  So far, two
> > > > plugins, OSS and JACK plugins.  The former one is the plugin to
> > > > emulate ALSA API with the OSS driver.  The latter is almost identical
> > > > with the one in alsa-lib/src/pcm/ext.
> > > > 
> > > > I think this SDK can be used for better implementaion of BT-SCO and
> > > > FireWire.
> > > 
> > > I wrote a quick and dirty prototype using SBC over RFCOMM for now.
> > 
> > Wow.
> 
> it is putting the PCM data into the SBC encoder and then sending it to
> the RFCOMM socket. This is not the standard for high quality audio over
> Bluetooth, but my Aiptek headphone supports this stuff. For now this is
> easier than dealing with A2DP and AVDTP.
> 
> The SCO support for the headsets is another story.

... and we'll need control plugin for mixers, too.

> > >  It is
> > > working with aplay and the alsaplayer, but not with xmms or beep. Are
> > > there any known problem with these ALSA plugins?
> > 
> > Which xmms/bmp are you using?
> > I fixed ALSA plugins of xmms and bmp recently, so it might have been
> > fixed.  For testing, you can try the one in SUSE's rpms from STABLE.
> 
> The XMMS is version 1.2.10 and BMP is version 0.9.7. In what versions
> are the ALSA plugins fixed. I will build it from source.

The patch isn't in the released version.  IIRC, they were applied to
CVS, though.

> > Do you have buffer or period size constraints?
> 
> Oh yes, that is the point where I am not sure what I am doing. The SBC
> is a codec like MP3 and actually I have no idea what are the best values
> here. These are software soundcards.

You don't have to set them if the hardware has no restriction.
Usually, the period size defines the interrupt period.  In the case of
user-space driver, it corresponds to the expected poll period, etc.

> > > We also talked about making these IO plugins visible when ALSA is
> > > listing its hardware devices. Is this possible now?
> > 
> > No, it's still in planning.
> > We'll need to define a usable API first...
> 
> What about a flags variable in snd_pcm_ioplug for activating it. This is
> generic and for me this is enough, because both Bluetooth IO plugins are
> virtual soundcards and they should always be listed. Or maybe list IO
> plugins in general.

This sounds good.  I'll add like the following:

Index: alsa-lib/include/pcm_ioplug.h
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-lib/include/pcm_ioplug.h,v
retrieving revision 1.3
diff -u -r1.3 pcm_ioplug.h
--- alsa-lib/include/pcm_ioplug.h	8 Feb 2005 20:48:56 -0000	1.3
+++ alsa-lib/include/pcm_ioplug.h	9 Feb 2005 15:14:06 -0000
@@ -37,10 +37,13 @@
 typedef struct snd_pcm_ioplug snd_pcm_ioplug_t;
 typedef struct snd_pcm_ioplug_callback snd_pcm_ioplug_callback_t;
 
+#define SND_PCM_IOPLUG_FLAG_LISTED	(1<<0)
+
 /* exported pcm data */
 struct snd_pcm_ioplug {
 	/* must be filled before calling snd_pcm_ioplug_create() */
 	const char *name;
+	unsigned int flags;	/* SND_PCM_IOPLUG_FLAG_XXX */
 	int poll_fd;
 	unsigned int poll_events;
 	unsigned int mmap_rw;		/* pseudo mmap */



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-09 15:19 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 [this message]
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
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=s5hoeetsqua.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.