Hi,<div><br></div><div>I'm seeing some issue with underruns/rewinds occurring on the beginning of every sink input playback.<br clear="all">I see rewind requests on alsa sink of 9600 bytes. The alsa driver is configured with the following buffer sizes </div>
<div><br></div><div><div>I: sink.c: device.buffering.buffer_size = "9600"</div><div>I: sink.c: device.buffering.fragment_size = "4800"</div></div><div><br></div><div>So it seems like one buffer size is always being rewinded on the beginning of playback.</div>
<div>Is there a way to prevent these rewinds/underruns when starting playback? after the stream has started, there is no issue with audio dropouts or underruns, just on the beginning.</div><div><br></div><div>If i log the data that gets sent to alsa, from pulseaudio or in the alsa driver, i do see the beginning being dropped as well.</div>
<div><br></div><div>please see attached logs using both tshed=0 and tsched=1.</div><div><br></div><div>any help with this?</div><div>thanks!</div><div><br></div><div><div>I: client.c: Created 0 "Native client (UNIX socket client)"</div>
<div>D: protocol-native.c: Protocol version: remote 19, local 19</div><div>I: protocol-native.c: Got credentials: uid=0 gid=0 success=1</div><div>D: protocol-native.c: SHM possible: yes</div><div>D: protocol-native.c: Negotiated SHM: no</div>
<div>D: memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=4, prebuf=0, minreq=1 maxrewind=0</div><div>D: memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=4, prebuf=0, minreq=4 maxrewind=0</div>
<div>I: sink-input.c: Created input 0 "/usr/palm/sounds/notification.wav" on pcm_output with sample spec s16le 2ch 44100Hz and channel map front-left,front-right</div><div>I: sink-input.c: media.format = "WAV (Microsoft)"</div>
<div>I: sink-input.c: <a href="http://media.name">media.name</a> = "/usr/palm/sounds/notification.wav"</div><div>I: sink-input.c: <a href="http://application.name">application.name</a> = "pacat"</div>
<div>I: sink-input.c: native-protocol.peer = "UNIX socket client"</div><div>I: sink-input.c: native-protocol.version = "19"</div><div>I: sink-input.c: <a href="http://application.process.id">application.process.id</a> = "4474"</div>
<div>I: sink-input.c: application.process.user = "root"</div><div>I: sink-input.c: application.process.host = "PalmDevice"</div><div>I: sink-input.c: application.process.binary = "pacat"</div>
<div>I: sink-input.c: application.language = "C"</div><div>I: sink-input.c: application.process.machine_id = "PalmDevice"</div><div>I: protocol-native.c: Requested tlength=2000.00 ms, minreq=20.00 ms</div>
<div>D: protocol-native.c: Traditional mode enabled, modifying sink usec only for compat with minreq.</div><div>D: memblockq.c: memblockq requested: maxlength=4194304, tlength=352800, base=4, prebuf=349276, minreq=3528 maxrewind=0</div>
<div>D: memblockq.c: memblockq sanitized: maxlength=4194304, tlength=352800, base=4, prebuf=349276, minreq=3528 maxrewind=0</div><div>I: protocol-native.c: Final latency 2054.42 ms = 1960.00 ms + 2*20.00 ms + 54.42 ms</div>
<div>D: protocol-native.c: Requesting rewind due to end of underrun.</div><div>D: alsa-sink.c: Requested to rewind 9600 bytes.</div><div>D: alsa-sink.c: Limited to 9344 bytes.</div><div>D: alsa-sink.c: before: 2336</div><div>
D: alsa-sink.c: after: 2336</div><div>D: alsa-sink.c: Rewound 9344 bytes.</div><div>D: sink.c: Processing rewind...</div><div>D: sink-input.c: Have to rewind 9344 bytes on render memblockq.</div><div>D: source.c: Processing rewind...</div>
<div>D: protocol-native.c: Underrun on '/usr/palm/sounds/notification.wav', 0 bytes in queue.</div><div>D: alsa-sink.c: Requested to rewind 9600 bytes.</div><div>D: alsa-sink.c: Limited to 9344 bytes.</div><div>D: alsa-sink.c: before: 2336</div>
<div>D: alsa-sink.c: after: 2336</div><div>D: alsa-sink.c: Rewound 9344 bytes.</div><div>D: sink.c: Processing rewind...</div><div>D: source.c: Processing rewind...</div><div>D: core.c: Hmm, no streams around, trying to vacuum.</div>
<div>I: sink-input.c: Freeing input 0 "/usr/palm/sounds/notification.wav"</div><div>I: client.c: Freed 0 "pacat"</div><div>I: protocol-native.c: Connection died.</div><div><br></div>-- <br><div style="text-align: left;">
-baeksanchang</div>
</div>