foobarecho
Posts: 18
Joined: Tue Aug 06, 2013 4:56 am

Audio problems. stuttering, hangs

Fri Mar 17, 2017 11:06 am

Raspberry pi 3b

I have a custom osmc setup and lxde. and installed pulseaudio 10. while testing some applications to output audio. I noticed the problem with audio

but I also tested on another partition on the sd I have of raspbian that I haven't used. unfortunately I didn't test playing audio right away as sources were outdated and decided to upgrade to latest. same issue. in this case pulseaudio 5.03

The issue is sometimes audio stutter, or not play at all, or just hangs. I tried with mpg123 and sox play. but also javaclient for avs alexa same issue.

Could this be from latest kernels as both osmc and raspbian latest version has this. could it be hardware failure?

The issue might have been there but haven't noticed until I started testing more. but likely after update to latest version.

audio is using integrated chip and through 3.5mm.

p.s. anyone knows how to downgrade osmc kernels to earlier version like from 2015. apt-cache search osmc only shows latest versions.

here is log from pulseaudio on osmc setup:
D: [alsa-sink-bcm2835 ALSA] protocol-native.c: Drain acknowledged of 'ALSA Playback'
D: [alsa-sink-bcm2835 ALSA] sink-input.c: Requesting rewind due to corking
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Requested to rewind 0 bytes.
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Mhmm, actually there is nothing to rewind.
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Latency set to 40.00ms
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: hwbuf_unused=62008
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: setting avail_min=31446
I: [pulseaudio] source-output.c: Freeing output 5 "Peak detect"
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Latency set to 40.00ms
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: hwbuf_unused=62008
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: setting avail_min=31446
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Requested to rewind 65536 bytes.
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Limited to 3272 bytes.
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: before: 1636
I: [pulseaudio] sink-input.c: Freeing input 7 "ALSA Playback"
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: after: 1636
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Rewound 3272 bytes.
D: [alsa-sink-bcm2835 ALSA] sink.c: Processing rewind...
D: [alsa-sink-bcm2835 ALSA] source.c: Processing rewind...
I: [pulseaudio] client.c: Freed 19 "ALSA plug-in [mpg123.bin]"
I: [pulseaudio] protocol-native.c: Connection died.
I: [pulseaudio] client.c: Created 20 "Native client (UNIX socket client)"
I: [pulseaudio] client.c: Freed 20 "Native client (UNIX socket client)"
I: [pulseaudio] protocol-native.c: Connection died.
I: [pulseaudio] client.c: Created 21 "Native client (UNIX socket client)"
D: [pulseaudio] protocol-native.c: Protocol version: remote 29, local 32
I: [pulseaudio] protocol-native.c: Got credentials: uid=1000 gid=1000 success=1
D: [pulseaudio] protocol-native.c: SHM possible: yes
D: [pulseaudio] protocol-native.c: Negotiated SHM: no
D: [pulseaudio] protocol-native.c: Disabling srbchannel, reason: Protocol too old
D: [pulseaudio] module-augment-properties.c: Looking for .desktop file for mpg123.bin
I: [pulseaudio] client.c: Freed 21 "ALSA plug-in [mpg123.bin]"
I: [pulseaudio] protocol-native.c: Connection died.
I: [pulseaudio] client.c: Created 22 "Native client (UNIX socket client)"
D: [pulseaudio] protocol-native.c: Protocol version: remote 29, local 32
I: [pulseaudio] protocol-native.c: Got credentials: uid=1000 gid=1000 success=1
D: [pulseaudio] protocol-native.c: SHM possible: yes
D: [pulseaudio] protocol-native.c: Negotiated SHM: no
D: [pulseaudio] protocol-native.c: Disabling srbchannel, reason: Protocol too old
D: [pulseaudio] module-augment-properties.c: Looking for .desktop file for mpg123.bin
I: [pulseaudio] client.c: Freed 22 "ALSA plug-in [mpg123.bin]"
I: [pulseaudio] protocol-native.c: Connection died.
I: [pulseaudio] client.c: Created 23 "Native client (UNIX socket client)"
D: [pulseaudio] protocol-native.c: Protocol version: remote 29, local 32
I: [pulseaudio] protocol-native.c: Got credentials: uid=1000 gid=1000 success=1
D: [pulseaudio] protocol-native.c: SHM possible: yes
D: [pulseaudio] protocol-native.c: Negotiated SHM: no
D: [pulseaudio] protocol-native.c: Disabling srbchannel, reason: Protocol too old
D: [pulseaudio] module-augment-properties.c: Looking for .desktop file for mpg123.bin
D: [pulseaudio] module-intended-roles.c: Not setting device for stream ALSA Playback, because it lacks role.
D: [pulseaudio] sink-input.c: Negotiated format: pcm, format.sample_format = "\"s16le\"" format.rate = "48000" format.channels = "1" format.channel_map = "\"mono\""
I: [pulseaudio] sink-input.c: Trying to change sample rate
I: [pulseaudio] sink.c: Cannot update rate, monitor source is RUNNING
I: [pulseaudio] resampler.c: Speex appears to be compiled with --enable-fixed-point. Switching to a fixed-point resampler because it should be faster.
D: [pulseaudio] resampler.c: Resampler:
D: [pulseaudio] resampler.c: rate 48000 -> 44100 (method speex-fixed-1)
D: [pulseaudio] resampler.c: format s16le -> s16le (intermediate s16le)
D: [pulseaudio] resampler.c: channels 1 -> 1 (resampling 1)
I: [pulseaudio] speex.c: Choosing speex quality setting 1.
D: [pulseaudio] memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=2, prebuf=0, minreq=1 maxrewind=0
D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=2, prebuf=0, minreq=2 maxrewind=0
I: [pulseaudio] sink-input.c: Created input 8 "ALSA Playback" on alsa_output.0.analog-mono with sample spec s16le 1ch 48000Hz and channel map mono
I: [pulseaudio] sink-input.c: media.name = "ALSA Playback"
I: [pulseaudio] sink-input.c: application.name = "ALSA plug-in [mpg123.bin]"
I: [pulseaudio] sink-input.c: native-protocol.peer = "UNIX socket client"
I: [pulseaudio] sink-input.c: native-protocol.version = "29"
I: [pulseaudio] sink-input.c: application.process.id = "2694"
I: [pulseaudio] sink-input.c: application.process.user = "osmc"
I: [pulseaudio] sink-input.c: application.process.host = "osmc-Atticus"
I: [pulseaudio] sink-input.c: application.process.binary = "mpg123.bin"
I: [pulseaudio] sink-input.c: application.language = "C"
I: [pulseaudio] sink-input.c: application.process.machine_id = "e4e32b7ace394016b9ff7a05e81b87f4"
I: [pulseaudio] sink-input.c: application.process.session_id = "c2"
I: [pulseaudio] sink-input.c: module-stream-restore.id = "sink-input-by-application-name:ALSA plug-in [mpg123.bin]"
I: [pulseaudio] protocol-native.c: Requested tlength=500.00 ms, minreq=125.00 ms
D: [pulseaudio] protocol-native.c: Early requests mode enabled, configuring sink latency to minreq.
D: [pulseaudio] protocol-native.c: Requested latency=125.00 ms, Received latency=125.00 ms
D: [pulseaudio] memblockq.c: memblockq requested: maxlength=4194304, tlength=48000, base=2, prebuf=12000, minreq=12000 maxrewind=0
D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=4194304, tlength=48000, base=2, prebuf=12000, minreq=12000 maxrewind=0
I: [pulseaudio] protocol-native.c: Final latency 625.00 ms = 250.00 ms + 2*125.00 ms + 125.00 ms
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Latency set to 40.00ms
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: hwbuf_unused=62008
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: setting avail_min=31446
D: [alsa-sink-bcm2835 ALSA] protocol-native.c: Requesting rewind due to end of underrun.
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Requested to rewind 65536 bytes.
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Limited to 3272 bytes.
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: before: 1636
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: after: 1636
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Rewound 3272 bytes.
D: [alsa-sink-bcm2835 ALSA] sink.c: Processing rewind...
D: [alsa-sink-bcm2835 ALSA] sink-input.c: Have to rewind 3272 bytes on render memblockq.
D: [alsa-sink-bcm2835 ALSA] source.c: Processing rewind...
D: [alsa-sink-bcm2835 ALSA] protocol-native.c: Implicit underrun of 'ALSA Playback'
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3184 bytes ago (344 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3184 bytes ago (344 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3184 bytes ago (344 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3184 bytes ago (344 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3184 bytes ago (344 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3184 bytes ago (344 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3184 bytes ago (344 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3184 bytes ago (344 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3184 bytes ago (344 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3184 bytes ago (344 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3184 bytes ago (344 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3184 bytes ago (344 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3184 bytes ago (344 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3184 bytes ago (344 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] protocol-native.c: Requesting rewind due to end of underrun.
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Requested to rewind 3186 bytes.
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Limited to 3186 bytes.
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: before: 1593
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: after: 1593
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Rewound 3186 bytes.
D: [alsa-sink-bcm2835 ALSA] sink.c: Processing rewind...
D: [alsa-sink-bcm2835 ALSA] sink-input.c: Have to rewind 3186 bytes on render memblockq.
D: [alsa-sink-bcm2835 ALSA] source.c: Processing rewind...
D: [pulseaudio] module-intended-roles.c: Not setting device for stream Peak detect, because already set.
D: [pulseaudio] source-output.c: Negotiated format: pcm, format.sample_format = "\"float32le\"" format.rate = "25" format.channels = "1" format.channel_map = "\"mono\""
I: [pulseaudio] source-output.c: Trying to change sample rate
I: [pulseaudio] source.c: Cannot update rate, SOURCE_IS_RUNNING, will keep using 44100 Hz
D: [pulseaudio] resampler.c: Resampler:
D: [pulseaudio] resampler.c: rate 44100 -> 25 (method peaks)
D: [pulseaudio] resampler.c: format s16le -> float32le (intermediate s16le)
D: [pulseaudio] resampler.c: channels 1 -> 1 (resampling 1)
D: [pulseaudio] memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=2, prebuf=0, minreq=1 maxrewind=0
D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=2, prebuf=0, minreq=2 maxrewind=0
I: [pulseaudio] source-output.c: Created output 6 "Peak detect" on alsa_output.0.analog-mono.monitor with sample spec float32le 1ch 25Hz and channel map mono
I: [pulseaudio] source-output.c: media.name = "Peak detect"
I: [pulseaudio] source-output.c: application.name = "PulseAudio Volume Control"
I: [pulseaudio] source-output.c: native-protocol.peer = "UNIX socket client"
I: [pulseaudio] source-output.c: native-protocol.version = "29"
I: [pulseaudio] source-output.c: application.id = "org.PulseAudio.pavucontrol"
I: [pulseaudio] source-output.c: application.icon_name = "audio-card"
I: [pulseaudio] source-output.c: application.version = "2.0"
I: [pulseaudio] source-output.c: application.process.id = "2448"
I: [pulseaudio] source-output.c: application.process.user = "osmc"
I: [pulseaudio] source-output.c: application.process.host = "osmc-Atticus"
I: [pulseaudio] source-output.c: application.process.binary = "pavucontrol"
I: [pulseaudio] source-output.c: application.language = "en_US.UTF-8"
I: [pulseaudio] source-output.c: window.x11.display = ":1.0"
I: [pulseaudio] source-output.c: application.process.machine_id = "e4e32b7ace394016b9ff7a05e81b87f4"
I: [pulseaudio] source-output.c: application.process.session_id = "c1"
I: [pulseaudio] source-output.c: module-stream-restore.id = "source-output-by-application-id:org.PulseAudio.pavucontrol"
D: [pulseaudio] memblockq.c: memblockq requested: maxlength=4194304, tlength=0, base=4, prebuf=1, minreq=0 maxrewind=0
D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=4194304, tlength=4194304, base=4, prebuf=4, minreq=4 maxrewind=0
I: [pulseaudio] protocol-native.c: Final latency 80.00 ms = 40.00 ms + 40.00 ms
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Latency set to 40.00ms
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: hwbuf_unused=62008
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: setting avail_min=31446
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Latency set to 40.00ms
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: hwbuf_unused=62008
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: setting avail_min=31446
D: [alsa-sink-bcm2835 ALSA] sink-input.c: Requesting rewind due to corking
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Requested to rewind 3188 bytes.
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Limited to 3188 bytes.
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: before: 1594
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: after: 1594
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Rewound 3188 bytes.
D: [alsa-sink-bcm2835 ALSA] sink.c: Processing rewind...
D: [alsa-sink-bcm2835 ALSA] sink-input.c: Have to rewind 3188 bytes on render memblockq.
D: [alsa-sink-bcm2835 ALSA] sink-input.c: Have to rewind 3470 bytes on implementor.
D: [alsa-sink-bcm2835 ALSA] source.c: Processing rewind...
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (340 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (340 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (340 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (340 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (340 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (340 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (340 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (340 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (340 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (340 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (340 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (340 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (340 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (340 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (340 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (340 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (274 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (274 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (274 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (274 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (274 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (274 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (274 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (274 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (274 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (274 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (274 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Latency set to 40.00ms
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: hwbuf_unused=62008
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: setting avail_min=31446
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (274 bytes ahead in playback buffer)
I: [pulseaudio] source-output.c: Freeing output 6 "Peak detect"
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.0.analog-mono: Found underrun 3188 bytes ago (274 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Latency set to 40.00ms
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: hwbuf_unused=62008
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: setting avail_min=31446
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Requested to rewind 65536 bytes.
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Limited to 3206 bytes.
I: [pulseaudio] sink-input.c: Freeing input 8 "ALSA Playback"
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: before: 1603
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: after: 1603
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Rewound 3206 bytes.
D: [alsa-sink-bcm2835 ALSA] sink.c: Processing rewind...
D: [alsa-sink-bcm2835 ALSA] source.c: Processing rewind...
I: [pulseaudio] client.c: Freed 23 "ALSA plug-in [mpg123.bin]"
I: [pulseaudio] protocol-native.c: Connection died.

Return to “Advanced users”