https://bugs.freedesktop.org/show_bug.cgi?id=84585
--- Comment #74 from Alessandro Ferri <[email protected]> --- Hi Raymond, Following your comment I have tried to run the following test. On /etc/pulse/system.pa I added the following line: load-module module-alsa-card device_id=0 tsched=true tsched_buffer_size=256072 tsched_buffer_watermark=120268 With this new setup, the CPU usage from pulseaudio is reduced by (without new line): pi@raspberrypi ~ $ top top - 14:54:41 up 2 min, 2 users, load average: 1.55, 0.62, 0.23 Tasks: 92 total, 1 running, 91 sleeping, 0 stopped, 0 zombie %Cpu(s): 52.1 us, 26.1 sy, 0.0 ni, 18.9 id, 0.0 wa, 0.0 hi, 2.9 si, 0.0 st KiB Mem: 447856 total, 137808 used, 310048 free, 14860 buffers KiB Swap: 102396 total, 0 used, 102396 free, 67372 cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2337 pulse 9 -11 87984 4832 3532 S 58.7 1.1 0:21.36 pulseaudio 2416 pi 20 0 117m 5176 2424 S 16.7 1.2 0:05.73 shairport 2527 root 20 0 22004 10m 4664 S 1.6 2.5 0:02.85 Xorg 2742 pi 20 0 4668 1384 1040 R 1.3 0.3 0:00.80 top to with the new line: pi@raspberrypi ~ $ top top - 14:42:30 up 2 min, 2 users, load average: 1.27, 0.56, 0.22 Tasks: 93 total, 2 running, 91 sleeping, 0 stopped, 0 zombie %Cpu(s): 40.4 us, 24.6 sy, 0.0 ni, 32.0 id, 0.0 wa, 0.0 hi, 3.0 si, 0.0 st KiB Mem: 447856 total, 136800 used, 311056 free, 14868 buffers KiB Swap: 102396 total, 0 used, 102396 free, 67812 cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2369 pi 20 0 150m 4760 3632 R 42.7 1.1 0:15.26 pulseaudio 2365 pi 20 0 115m 3940 2544 S 19.0 0.9 0:06.01 shairport 2666 root 20 0 22004 10m 4664 S 1.6 2.5 0:02.85 Xorg 2757 pi 20 0 4672 1384 1040 R 1.6 0.3 0:00.90 top That is substantially decreased from 58% to 42% of CPU. This could be a good clue? I have tried to change the parameters in this way: tsched_buffer_size=1024288 tsched_buffer_watermark=481072 tsched_buffer_size=512144 tsched_buffer_watermark=240536 but there are not differences. I attach again the report of pulseaudio Log verbose. What configuration should I use and which modules to establish 30 ms wakeup watermark and the minimal latency? Best regards. (In reply to Raymond from comment #71) > > latency seem fixed at 105ms 3.12.25 with 30ms wakeup > > > > 126| 0.000) I: [pulseaudio] sink-input.c: media.name = "Shairport > Stream" > ( 9.126| 0.000) I: [pulseaudio] sink-input.c: application.name = > "AirAni-b35336" > ( 9.126| 0.000) I: [pulseaudio] sink-input.c: native-protocol.peer = > "UNIX socket client" > ( 9.126| 0.000) I: [pulseaudio] sink-input.c: > native-protocol.version = "26" > ( 9.126| 0.000) I: [pulseaudio] sink-input.c: application.process.id > = "4160" > ( 9.126| 0.000) I: [pulseaudio] sink-input.c: > application.process.user = "pi" > ( 9.126| 0.000) I: [pulseaudio] sink-input.c: > application.process.host = "raspberrypi" > ( 9.126| 0.000) I: [pulseaudio] sink-input.c: > application.process.binary = "shairport" > ( 9.126| 0.000) I: [pulseaudio] sink-input.c: application.language = > "C" > ( 9.126| 0.000) I: [pulseaudio] sink-input.c: window.x11.display = > ":0.0" > ( 9.126| 0.000) I: [pulseaudio] sink-input.c: > application.process.machine_id = "d3670ff77a0bb988a953e7f053a3f4e7" > ( 9.126| 0.000) I: [pulseaudio] sink-input.c: > module-stream-restore.id = "sink-input-by-application-name:AirAni-b35336" > ( 9.139| 0.012) I: [pulseaudio] protocol-native.c: Requested > tlength=250.00 ms, minreq=20.00 ms > ( 9.139| 0.000) D: [pulseaudio] protocol-native.c: Adjust latency mode > enabled, configuring sink latency to half of overall latency. > ( 9.140| 0.000) D: [alsa-sink] alsa-sink.c: Cutting sleep time for the > initial iterations by half. > ( 9.140| 0.000) D: [alsa-sink] alsa-sink.c: Cutting sleep time for the > initial iterations by half. > ( 9.149| 0.008) D: [pulseaudio] protocol-native.c: Requested > latency=105.00 ms, Received latency=105.00 ms > ( 9.149| 0.000) D: [pulseaudio] memblockq.c: memblockq requested: > maxlength=4194304, tlength=25580, base=4, prebuf=22056, minreq=3528 > maxrewind=0 > ( 9.149| 0.000) D: [pulseaudio] memblockq.c: memblockq sanitized: > maxlength=4194304, tlength=25580, base=4, prebuf=22056, minreq=3528 > maxrewind=0 > ( 9.150| 0.000) I: [pulseaudio] protocol-native.c: Final latency 250.01 > ms = 105.01 ms + 2*20.00 ms + 105.00 ms > ( 9.150| 0.000) D: [alsa-sink] alsa-sink.c: Cutting sleep time for the > initial iterations by half. > ( 9.151| 0.000) D: [alsa-sink] alsa-sink.c: Latency set to 105.00ms > ( 9.151| 0.000) D: [alsa-sink] alsa-sink.c: hwbuf_unused=334280 > ( 9.151| 0.000) D: [alsa-sink] alsa-sink.c: setting avail_min=87319 > ( 9.152| 0.000) D: [alsa-sink] alsa-sink.c: Requesting rewind due to > latency change. > ( 9.152| 0.000) D: [alsa-sink] alsa-sink.c: Requested to rewind 352800 > bytes. > ( 9.152| 0.000) D: [alsa-sink] alsa-sink.c: Limited to 347040 bytes. > ( 9.153| 0.000) D: [alsa-sink] alsa-sink.c: before: 86760 > ( 9.153| 0.000) D: [alsa-sink] alsa-sink.c: after: 86760 > ( 9.153| 0.000) D: [alsa-sink] alsa-sink.c: Rewound 347040 bytes. > ( 9.153| 0.000) D: [alsa-sink] sink.c: Processing rewind... > ( 9.154| 0.000) D: [alsa-sink] sink-input.c: Have to rewind 347040 bytes > on render memblockq. > ( 9.154| 0.000) D: [alsa-sink] source.c: Processing rewind... > ( 9.155| 0.001) D: [pulseaudio] core-subscribe.c: Dropped redundant > event due to change event. > ( 9.156| 0.000) D: [pulseaudio] reserve-wrap.c: Device lock status of > reserve-monitor-wrapper@Audio0 changed: not busy > ( 9.159| 0.002) D: [pulseaudio] protocol-dbus.c: Interface > org.PulseAudio.Core1.Stream added for object > /org/pulseaudio/core1/playback_stream0 > ( 11.862| 2.703) I: [alsa-sink] alsa-sink.c: Underrun! > ( 11.863| 0.000) I: [alsa-sink] alsa-sink.c: Increasing wakeup watermark > to 30.00 ms -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug.
_______________________________________________ pulseaudio-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pulseaudio-bugs
