* Missing snd_pcm_link() for the rate plugin
@ 2015-09-11 7:42 Christian Gruber
2015-09-25 8:02 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Christian Gruber @ 2015-09-11 7:42 UTC (permalink / raw)
To: alsa-devel
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?
Thanks in advance for answering this question,
Christian
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Missing snd_pcm_link() for the rate plugin
2015-09-11 7:42 Missing snd_pcm_link() for the rate plugin Christian Gruber
@ 2015-09-25 8:02 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2015-09-25 8:02 UTC (permalink / raw)
To: Christian Gruber; +Cc: alsa-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-25 8:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-11 7:42 Missing snd_pcm_link() for the rate plugin Christian Gruber
2015-09-25 8:02 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).