[pulseaudio-discuss] pulseaudio continue send data to sink after the play status is stopped.

Tanu Kaskinen tanuk at iki.fi
Mon Oct 30 11:57:11 UTC 2017


On Thu, 2017-10-26 at 18:46 +0200, dst wrote:
> Hello,
> I use pulseaudio 6.0 and bluez5.19 on my device, my device act as an
> a2dp source.
> My device connect to a head unit and play audio, I found in the
> hcidump log that after the play back status changed to stopped, the
> a2dp streaming will continue for at least 5s. 
> I guess the pulseaudio continue to send some data to the a2dp sink.
> Has anybody meet this, and why?

PulseAudio will continue to play silence for 5 seconds after the last
stream has stopped playing. This is not specific to bluetooth, the same
logic is applied to all devices. The reason is to avoid unnecessary
closing and opening of the device if another stream starts quickly
after the previous one.

If this is a problem for you, you can set a different timeout than 5
seconds. Change this line in default.pa (or system.pa, if you're
running pulseaudio in the system mode)

    load-module module-suspend-on-idle

to

    load-module module-suspend-on-idle timeout=1

The timeout value is in seconds. If one second is still too long, 0 may
also work (I'm not 100% sure).

-- 
Tanu

https://www.patreon.com/tanuk


More information about the pulseaudio-discuss mailing list