<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt">Hi,<br><br>I am trying to get my own ALSA plug-in to work with some real time controls.  ( Is this the right place to ask?)<br><br>I am successful with the PCM part of it.  What I mean is from:<br><br>http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_external_plugins.html<br>External Plugin: Filter-Type Plugin<br><br>static snd_pcm_sframes_t<br>myplg_transfer(snd_pcm_extplug_t *ext,<br>           const snd_pcm_channel_area_t *dst_areas,<br>           snd_pcm_uframes_t dst_offset,<br>           const snd_pcm_channel_area_t *src_areas,<br>           snd_pcm_uframes_t
 src_offset,<br>           snd_pcm_uframes_t size)<br>{<br>// my PCM processing works<br>// I want to add a control parameter that can be set in real time by an app<br>}<br><br>SND_PCM_PLUGIN_DEFINE_FUNC(myplg)<br>{<br>// This all works for PCM processing just like the examples<br>...<br>err = snd_pcm_extplug_create(&mix->ext, name, root, sconf, stream, mode);<br>    if (err < 0) {<br>        free(mix);<br>        return err;<br>    }<br>...<br>}<br><br>SND_PCM_PLUGIN_SYMBOL(myplg);<br><br><br>Now I want to add a simple real time adjustment, an integer value that can be sent by an application to adjust the sound (PCM samples) in real time.  I tried some ways of doing it it but without success, I am not understanding the basics.<br><br>I first looked at doing a ctl. I was able  get
 separately (without PCM processing) get a control to work but that looks like ts only for hardware control?  I can't connect it to my PCM processing.<br><br>http://www.alsa-project.org/alsa-doc/alsa-lib/ctl_external_plugins.html<br><br>I looked at LADSPA but I'm not sure where that is going to take me.<br><br>I am now looking at<br><br>http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_external_plugins.html<br>External Plugin: I/O Plugin<br><br>But, I am confused because I also see pcm type callbacks.<br><br>So, I do not have a specific coding question (yet) but I just need a general direction. ...<br>-Should I use ctl_external_plugins and figure out how to use it with my PCM?<br>-Should  I use a LADSPA example?<br>-Should I go wth External Plugin: I/O Plugin?<br>-Something else?<br><br>I hope I am clear enough about my question and thanks for any pointers you can provide.<br><br>Bob<br><br><br><br><h2 style="font-weight: normal;"><a
 class="anchor" name="pcm_ioplug"></a></h2><div><br></div><div><br></div><div><br></div><div><br></div><div></div></div></body></html>