[pulseaudio-discuss] blocking call in pulse core mainloop context results in sink not getting data

Arun Raghavan arun at arunraghavan.net
Mon Jul 19 22:57:55 UTC 2021


On Mon, 19 Jul 2021, at 3:23 PM, Ravikiran belur wrote:
> Hello,
> 
> A module in pulseaudio is using a blocking function in pa_hook_connect callback.
> So the blocking function runs in PA core mainloop context for 40ms to 90ms.
> 
> This causes audio break/silence at the sink side, resulting in small 
> noise on the speaker during playback.
> 
> Can someone suggest a fix for this issue in module/pulseaudio?

This is not unexpected. Data from PulseAudio clients arrives in the main thread, so blocking for that long is not good.

The module should be performing the task that is taking so long asynchronously, or dispatching it to a separate thread.

-- Arun


More information about the pulseaudio-discuss mailing list