[pulseaudio-discuss] Pulseaudio latency

Georg Chini georg at chini.tk
Tue Jul 31 06:07:35 UTC 2018


On 31.07.2018 07:10, Harish Gaddameedi wrote:
> Hi Georg,
>
> As i told module-loopback is giving overall latency around 300ms from 
> the time when i started the sequence, and*latency of module-loopback 
> doesn't grow at any point of time*. On saturday and sunday, we have 
> kept a continuous streaming for 2 days, expecting that the delay will 
> be further increased, but the delay is constant with 4-5 secs, and 
> *there are no errors in the logs*. Are there any chances like 
> alsa-sink is filling somewhere and blocking the source to send the 
> audio chunks into the memblockq?
>
> /*module-loopback output is like this:*/
> /Tue Jul 31 10:15:37 2018 user.debug pulseaudio[4370]: (47917.422|  
>  0.020) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: Wakeup from ALSA!/
> /Tue Jul 31 10:15:37 2018 user.debug pulseaudio[4370]: (47917.443|  
>  0.020) [pulseaudio] module-loopback.c: Loopback overall latency is 
> 0.02 ms + 244.43 ms + 54.55 ms = 298.89 ms/
> /Tue Jul 31 10:15:37 2018 user.debug pulseaudio[4370]: (47917.443|  
>  0.000) [pulseaudio] module-loopback.c: Loopback latency at base rate 
> is 298.42 ms/
> /Tue Jul 31 10:15:37 2018 user.debug pulseaudio[4370]: (47917.443|  
>  0.000) [pulseaudio] module-loopback.c: [alsa_output.0] Updated 
> sampling rate to 44053 Hz./
> /
> /
> /*pactl list sources:*/
> /Source #1/
> /State: RUNNING/
> /Name: bluez_source/
> /Description: AP 🙏/
> /Driver: module-bluez5-device.c/
> /Sample Specification: s16le 2ch 44100Hz/
> /Channel Map: front-left,front-right/
> /Owner Module: 17/
> /Mute: no/
> /Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 
> 100% / 0.00 dB/
> /balance 0.00/
> /Base Volume: 65536 / 100% / 0.00 dB/
> /Monitor of Sink: n/a/
> /Latency: 45876 usec, configured 39512 usec/
> /Flags: HARDWARE DECIBEL_VOLUME LATENCY /
> /Properties:/
> /bluetooth.protocol = "a2dp_source"/
> /device.description = "AP 🙏"/
> /device.string = "AC:C1:EE:69:A6:02"/
> /device.api = "bluez"/
> /device.class = "sound"/
> /device.bus = "bluetooth"/
> /device.form_factor = "phone"/
> /bluez.path = "/org/bluez/hci0/dev_AC_C1_EE_69_A6_02"/
> /bluez.class = "0x5a020c"/
> /bluez.alias = "AP 🙏"/
> /device.icon_name = "audio-card-bluetooth"/
> /Ports:/
> /phone-input: Phone (priority: 0, available)/
> /Active Port: phone-input/
> /Formats:/
> /pcm/
>
> /pactl list sinks:/
> /Sink #0/
> /State: RUNNING/
> /Name: alsa_output.0/
> /Description: ipq4019_snd_card/
> /Driver: module-alsa-sink.c/
> /Sample Specification: s16le 2ch 48000Hz/
> /Channel Map: front-left,front-right/
> /Owner Module: 5/
> /Mute: no/
> /Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 
> 100% / 0.00 dB/
> /  balance 0.00/
> /Base Volume: 65536 / 100% / 0.00 dB/
> /Monitor Source: alsa_output.0.monitor/
> /Latency: 0 usec, configured 26000 usec/
> /Flags: HARDWARE DECIBEL_VOLUME LATENCY /
> /Properties:/
> /alsa.resolution_bits = "16"/
> /device.api = "alsa"/
> /device.class = "sound"/
> /alsa.class = "generic"/
> /alsa.subclass = "generic-mix"/
> /alsa.name <http://alsa.name> = ""/
> /alsa.id <http://alsa.id> = "I2S cx2072x-dsp-0"/
> /alsa.subdevice = "0"/
> /alsa.subdevice_name = "subdevice #0"/
> /alsa.device = "0"/
> /alsa.card = "0"/
> /alsa.card_name = "snd_card"/
> /alsa.long_card_name = "snd_card"/
> /alsa.driver_name = "/snd_card/"/
> /device.string = "dmixer"/
> /device.buffering.buffer_size = "383040"/
> /device.buffering.fragment_size = "4032"/
> /device.access_mode = "mmap+timer"/
> /device.description = "snd_card"/
> /device.icon_name = "audio-card"/
> /Formats:/
> /pcm/
>
>
>
Please do not top-post.

To me it looks like that is an issue in the ALSA driver and not related 
to pulseaudio.
The driver must be reporting the wrong latency. Did you set the loopback 
latency to
300 ms? Default is 200 ms.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20180731/fca33585/attachment-0001.html>


More information about the pulseaudio-discuss mailing list