[alsa-devel] [PATCH - JACK plugin] jack: Do not Xrun the ALSA buffer

Takashi Iwai tiwai at suse.de
Tue Mar 13 22:20:17 CET 2018


On Tue, 13 Mar 2018 09:34:41 +0100,
<twischer at de.adit-jv.com> wrote:
> 
> 
> Hello Takashi,
> 
> Now I have compiled and tested the patchies successfully.
> Some minor adaption where required.
> I have incorporated all your findings.
> 
> 
> > Please try to format the text a bit nicer.  These line breaks appear
> > like you're writing a poem :)i
> 
> Done.
> 
> 
> > You don't need to put inline unless it's really mandatory.
> 
> Done.
> 
> 
> > Hm, this whole stuff would fit better in ioplug code itself instead of
> > open-coding in each plugin.  Maybe providing a new helper function?
> 
> I am providing a new helper function called snd_pcm_ioplug_hw_avail()
> and I am reusing internally already existing functions.
> 
> 
> > Ditto.  Basically the whole procedure here is some common pattern, so
> > it wouldn't be too bad to have it in ioplug side.
> 
> I have provided a new area copy function which takes care about the buffer wrap around.
> This function is called snd_pcm_areas_copy_wrap().
> This reduces the complexity of the JACK IO plug a lot.
> I have also compared the new implementation with other ALSA IO plugins.
> I could not found more simuilarities because not all plugins are creating a snd_pcm_channel_area_t for the DMA/HW buffer.
> Therefore functions like snd_pcm_areas_silence() and snd_pcm_areas_copy() cannot be used.
> For example the pulse IO plug is also not using snd_pcm_channel_area_t for the pulse buffer.
> 
> I hope you are fine with these changes, now.
> If not it would be great if you could give me a feedback in time.

Thanks, now applied both patches to alsa-lib and the patch to jack
plugin.  For alsa-plugins, we'll need the update of configure.ac to
check the latest alsa-lib version, but let's do it later at bumping
actually the version.


Takashi


More information about the Alsa-devel mailing list