[alsa-devel] Missing snd_pcm_link() for the rate plugin

Takashi Iwai tiwai at suse.de
Fri Sep 25 10:02:39 CEST 2015


On Fri, 11 Sep 2015 09:42:24 +0200,
Christian Gruber wrote:
> 
> Dear ALSA community,
> 
> does anybody know, why the rate plugin does not support the snd_pcm_link() function?
> 
> As I can see from the ALSA-Lib source code, snd_pcm_link() calls the fast_op "link", which 
> is a function pointer, whose destination depends on the type of pcm device/plugin to be 
> linked.
> 
> If the device is a HW-device for instance, the function snd_pcm_hw_link() is called. 
> Several other plugins (e.g. mmap_emul, linear, lfloat, mulaw, alaw, route) use the generic 
> function snd_pcm_generic_link(), which forwards the function call to their slave 
> devices/plugins.
> 
> The rate plugin instead does not support snd_pcm_link(), since the function pointer "link" 
> is not assigned in the definition of snd_pcm_rate_fast_ops.
> 
> Is their any reason to not use the generic function snd_pcm_generic_link() within the rate 
> plugin?

I don't remember exactly any longer, but my guess is that the rate
plugin has a tricky code to delay the actual start when the playback
stream is started with less data than slave period size.  But it might
be a simpler reason: we forgot it.  You can play with using
snd_pcm_generic_link() & co.  If it seems reliably working, we can add
the hooks.


Takashi


More information about the Alsa-devel mailing list