[pulseaudio-discuss] PulseSink Properties

Vallabha Hampiholi vallabha.pa at googlemail.com
Tue Jul 26 22:55:28 PDT 2011


We are now running PA with high resolution timers enabled in the kernel.

Yet I still can hear the audio glitches.

Attached are new traces.

On Sun, Jul 24, 2011 at 7:05 PM, Vallabha Hampiholi <vallabha.pa@
googlemail.com> wrote:

> Dear Experts,
>
> I would like to know a few more things:
>
> Please pardon me, as I started working PulseAudio recently and havent
> gone through the source code yet, before asking these questions due to
> lack of time.
>
> 1. How is audio data handled between PulseAudio daemon and PulseAudio
> clients? What is the minimum data that should be transfrered before
> PulseAudio starts sending the audio data to ALSA hardware?
>
> 2. Is the above determined by the values of fragment-size and number
> of fragments in the daemon.conf file?
>
> 3. I see that the default values of the above parameters are 25 msec
> and 4. So does this mean that, PulseAudio does not start processing
> data until 100msec of data is available?
>
> 4. Also from (3) what should be the ideal value for the latency-time
> for pulsesink? 100msec or 25msec?
>
> Thank you in advance.
>
> -Rgds
> Vallabha
>
> On 7/23/11, Vallabha Hampiholi <vallabha.pa at googlemail.com> wrote:
> > Thank you Pierre and Colin.
> >
> > @Pierre: Should both parameters be set to -1? Upon gst-inspecting the
> > pulsesink element, i get following information:
> > buffer-time         : Size of audio buffer in microseconds
> >                         flags: readable, writable
> >                         Integer64. Range: 1 - 9223372036854775807
> Default:
> > 200000 Current: 200000
> > latency-time      : Audio latency in microseconds
> >                         flags: readable, writable
> >                         Integer64. Range: 1 - 9223372036854775807
> Default:
> > 10000 Current: 10000
> > Seems like these parameters will not accept negative values.
> >
> > I am working on an embedded environment, and taking the default vaues of
> > latency and buffer time results in buffer underrun.
> >
> > -Rgds
> > Vallabha
> > On Fri, Jul 22, 2011 at 11:43 PM, pl bossart
> > <bossart.nospam at gmail.com>wrote:
> >
> >> > Can anyone let me know as what criterions should be considered while
> >> setting
> >> > the latency-time and buffer-time parameters for the GST element
> >> pulsesink?
> >>
> >> The parameter names are a bit misleading.
> >> latency-time only deals with the amount of data exchanged between
> >> pulsesink and pulseaudio. It doesn't really represent the latency.
> >> buffer-time should be the total buffering/latency you want for your
> >> audio chain. If you don't care about it, set it to -1 to reduce the
> >> number of wakes and decrease power consumption
> >> -Pierre
> >> _______________________________________________
> >> pulseaudio-discuss mailing list
> >> pulseaudio-discuss at lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
> >>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110727/59d1993b/attachment-0001.htm>
-------------- next part --------------
N: main.c: Running in system mode, forcibly disabling SHM mode!
N: main.c: Running in system mode, forcibly disabling exit idle time!
D: core-rtclock.c: Timer slack is set to 50 us.
D: core-util.c: setpriority() worked.
I: core-util.c: Successfully gained nice level -11.
I: main.c: Found user 'pulse' (UID 109) and group 'pulse' (GID 114).
W: main.c: Home directory of user 'pulse' is not '/var/run/pulse', ignoring.
I: main.c: Successfully dropped root privileges.
I: main.c: This is PulseAudio 0.9.22
D: main.c: Compilation host: arm-none-linux-gnueabi
D: main.c: Compilation CFLAGS: -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option
D: main.c: Running on host: Linux armv7l 2.6.37-rc3 #1 Wed Jul 27 09:55:12 IST 2011
D: main.c: Found 1 CPUs.
I: main.c: Page size is 4096 bytes
D: main.c: Compiled with Valgrind support: no
D: main.c: Running in valgrind mode: no
D: main.c: Running in VM: no
D: main.c: Optimized build: yes
D: main.c: All asserts enabled.
I: main.c: Machine ID is 89908ad0f00641e5ec7d87d200000002.
I: main.c: Using runtime directory /var/run/pulse.
I: main.c: Using state directory /var/lib/pulse.
I: main.c: Using modules directory /usr/lib/pulse-0.9.22/modules.
I: main.c: Running in system mode: yes
W: main.c: OK, so you are running PA in system mode. Please note that you most likely shouldn't be doing that.
W: main.c: If you do it nonetheless then it's your own fault if things don't work as expected.
W: main.c: Please read http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode for an explanation why system mode is usually a bad idea.
W: pid.c: Stale PID file, overwriting.
I: main.c: Fresh high-resolution timers available! Bon appetit!
I: cpu-arm.c: CPU flags: V6 V7 VFP EDSP NEON VFPV3 
I: svolume_arm.c: Initialising ARM optimized functions.
D: memblock.c: Using private memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65496
D: alsa-util.c: Trying hw:0 with SND_PCM_NO_AUTO_FORMAT ...
D: alsa-util.c: Managed to open hw:0
D: alsa-util.c: Maximum hw buffer size is 743 ms
D: alsa-util.c: Set buffer size first (to 88200 samples), period size second (to 88200 samples).
I: alsa-sink.c: Successfully opened device hw:0.
I: alsa-sink.c: Successfully enabled mmap() mode.
I: alsa-sink.c: Successfully enabled timer-based scheduling mode.
I: sink.c: Created sink 0 "alsa_output.hw_0" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: sink.c:     alsa.resolution_bits = "16"
I: sink.c:     device.api = "alsa"
I: sink.c:     device.class = "sound"
I: sink.c:     alsa.class = "generic"
I: sink.c:     alsa.subclass = "generic-mix"
I: sink.c:     alsa.name = ""
I: sink.c:     alsa.id = "AIC3X tlv320aic3x-hifi-0"
I: sink.c:     alsa.subdevice = "0"
I: sink.c:     alsa.subdevice_name = "subdevice #0"
I: sink.c:     alsa.device = "0"
I: sink.c:     alsa.card = "0"
I: sink.c:     alsa.card_name = "TI81XX EVM"
I: sink.c:     alsa.long_card_name = "TI81XX EVM"
I: sink.c:     device.bus_path = "platform-soc-audio.0"
I: sink.c:     sysfs.path = "/devices/platform/soc-audio.0/sound/card0"
I: sink.c:     device.string = "hw:0"
I: sink.c:     device.buffering.buffer_size = "131072"
I: sink.c:     device.buffering.fragment_size = "8192"
I: sink.c:     device.access_mode = "mmap+timer"
I: sink.c:     device.description = "TI81XX EVM"
I: sink.c:     device.icon_name = "audio-card"
I: source.c: Created source 0 "alsa_output.hw_0.monitor" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: source.c:     device.description = "Monitor of TI81XX EVM"
I: source.c:     device.class = "monitor"
I: source.c:     device.icon_name = "audio-input-microphone"
I: alsa-sink.c: Using 16.0 fragments of size 8192 bytes (46.44ms), buffer size is 131072 bytes (743.04ms)
I: alsa-sink.c: Time scheduling watermark is 20.00ms
D: alsa-sink.c: hwbuf_unused=0
D: alsa-sink.c: setting avail_min=31886
D: alsa-util.c: snd_pcm_dump():
D: alsa-util.c: Hardware PCM card 0 'TI81XX EVM' device 0 subdevice 0
D: alsa-util.c: Its setup is:
D: alsa-util.c:   stream       : PLAYBACK
D: alsa-util.c:   access       : MMAP_INTERLEAVED
D: alsa-util.c:   format       : S16_LE
D: alsa-util.c:   subformat    : STD
D: alsa-util.c:   channels     : 2
D: alsa-util.c:   rate         : 44100
D: alsa-util.c:   exact rate   : 44100 (44100/1)
D: alsa-util.c:   msbits       : 16
D: alsa-util.c:   buffer_size  : 32768
D: alsa-util.c:   period_size  : 2048
D: alsa-util.c:   period_time  : 46439
D: alsa-util.c:   tstamp_mode  : ENABLE
D: alsa-util.c:   period_step  : 1
D: alsa-util.c:   avail_min    : 31886
D: alsa-util.c:   period_event : 0
D: alsa-util.c:   start_threshold  : -1
D: alsa-util.c:   stop_threshold   : 1073741824
D: alsa-util.c:   silence_threshold: 0
D: alsa-util.c:   silence_size : 0
D: alsa-util.c:   boundary     : 1073741824
D: alsa-util.c:   appl_ptr     : 0
D: alsa-util.c:   hw_ptr       : 0
D: alsa-sink.c: Thread starting up
D: core-util.c: SCHED_RR|SCHED_RESET_ON_FORK worked.
I: core-util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 5.
I: alsa-sink.c: Starting playback.
D: alsa-sink.c: Cutting sleep time for the initial iterations by half.
D: alsa-sink.c: Cutting sleep time for the initial iterations by half.
D: alsa-sink.c: Cutting sleep time for the initial iterations by half.
I: module.c: Loaded "module-alsa-sink" (index: #0; argument: "device=hw:0").
I: module.c: Loaded "module-native-protocol-unix" (index: #1; argument: "auth-anonymous=1").
I: module.c: Loaded "module-always-sink" (index: #2; argument: "").
D: dbus-util.c: Successfully connected to D-Bus system bus ec9628d92c466a4721584eb100000004 as :1.3
W: main.c: Failed to acquire org.pulseaudio.Server: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.3" is not allowed to own the service "org.pulseaudio.Server" due to security policies in the configuration file
I: main.c: Daemon startup complete.
I: client.c: Created 0 "Native client (UNIX socket client)"
I: protocol-native.c: Client authenticated anonymously.
D: protocol-native.c: Protocol version: remote 16, local 16
D: protocol-native.c: SHM possible: no
D: protocol-native.c: Negotiated SHM: no
D: memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=4, prebuf=0, minreq=1 maxrewind=0
D: memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=4, prebuf=0, minreq=4 maxrewind=0
I: sink-input.c: Created input 0 "Playback Stream" on alsa_output.hw_0 with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: sink-input.c:     media.name = "Playback Stream"
I: sink-input.c:     application.name = "gst-launch-0.10"
I: sink-input.c:     native-protocol.peer = "UNIX socket client"
I: sink-input.c:     native-protocol.version = "16"
I: sink-input.c:     application.process.id = "677"
I: sink-input.c:     application.process.user = "root"
I: sink-input.c:     application.process.host = "omap3evm"
I: sink-input.c:     application.process.binary = "gst-launch-0.10"
I: sink-input.c:     application.language = "C"
I: sink-input.c:     application.process.machine_id = "89908ad0f00641e5ec7d87d200000002"
I: protocol-native.c: Requested tlength=2000.00 ms, minreq=250.00 ms
D: protocol-native.c: Traditional mode enabled, modifying sink usec only for compat with minreq.
D: memblockq.c: memblockq requested: maxlength=705600, tlength=352800, base=4, prebuf=308700, minreq=44100 maxrewind=0
D: memblockq.c: memblockq sanitized: maxlength=705600, tlength=352800, base=4, prebuf=308700, minreq=44100 maxrewind=0
I: protocol-native.c: Final latency 2743.04 ms = 1500.00 ms + 2*250.00 ms + 743.04 ms
D: alsa-sink.c: Latency set to 743.04ms
D: alsa-sink.c: hwbuf_unused=4
D: alsa-sink.c: setting avail_min=31887
D: alsa-sink.c: Requesting rewind due to latency change.
D: alsa-sink.c: Requested to rewind 131072 bytes.
D: alsa-sink.c: Limited to 130520 bytes.
D: alsa-sink.c: before: 32630
D: alsa-sink.c: after: 32630
D: alsa-sink.c: Rewound 130520 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 130520 bytes on render memblockq.
D: source.c: Processing rewind...
D: protocol-native.c: Requesting rewind due to end of underrun.
D: alsa-sink.c: Requested to rewind 131072 bytes.
D: alsa-sink.c: Limited to 108388 bytes.
D: alsa-sink.c: before: 27097
D: alsa-sink.c: after: 27097
D: alsa-sink.c: Rewound 108388 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 108388 bytes on render memblockq.
D: source.c: Processing rewind...


More information about the pulseaudio-discuss mailing list