<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 1, 2018 at 12:27 AM Georg Chini <<a href="mailto:georg@chini.tk">georg@chini.tk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<div class="gmail-m_-4266224276235743797moz-cite-prefix">On 31.07.2018 10:22, Harish Gaddameedi
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr"><br>
<div class="gmail_quote">
<div dir="ltr">On Tue, Jul 31, 2018 at 12:42 PM Harish
Gaddameedi <<a href="mailto:harish.gaddameedi@smartron.com" target="_blank">harish.gaddameedi@smartron.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">On Tue, Jul 31, 2018 at 12:11 PM Harish
Gaddameedi <<a href="mailto:harish.gaddameedi@smartron.com" target="_blank">harish.gaddameedi@smartron.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><font color="#741b47"><i>Please do not top-post.<br>
To me it looks like that is an issue in the
ALSA driver and not related to pulseaudio.<br>
The driver must be reporting the wrong
latency. Did you set the loopback latency to</i></font>
<div class="gmail-m_-4266224276235743797m_-1577037038960146023m_-3451819389912464530gmail_signature">
<div>
<div>
<div>
<div>
<div>
<div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><font color="#741b47"><i>300 ms?
Default is 200 ms.</i></font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<font color="#741b47"><i><br>
</i></font>
<div><font color="#000000">Sorry, I use default
settings, gmail is doing top posting. </font></div>
<div>No, i didn't set any loopback latency. I'll
check with the alsa driver and get back to you.</div>
<div><br>
</div>
<div>--</div>
<div>Thanks,</div>
<div>Harish Gaddameedi</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
<div><br>
</div>
<div>Hi Georg,</div>
<div><br>
</div>
<div>There is one more important point i wanted to discuss, this
is which we have capture from your reply of clock
synchronisation. Can you conform whether the system clock and
audio clock both are same or different?</div>
<div><br>
</div>
</div>
</blockquote>
<br>
System clock and audio clock need not be equal. Each sound card has
its own<br>
clock which might not be synchronized with system clock or wall
clock.<br>
Basically, if your sound card claims to run on 44100 Hz, it may be
slightly<br>
more or less if measured in "real" (wall clock) time.<br>
module-loopback is normally capable of detecting the clock
difference and<br>
adjusts the sink-input sample rate so that the latency remains
constant. This<br>
is why you see in the log, that the module is not using 44100 Hz but
in fact<br>
some other (in your case lower) sample rate. PA then does
re-sampling<br>
from that rate to your sound card rate.<br>
<br>
For the A2DP sink (bluetooth headset or speaker) the system clock is
used<br>
for timing, so for this special case the audio clock matches system
clock.<br>
</div>
</blockquote></div><br clear="all"><div>Hi Georg,</div><div><br></div><div>I have found some cause for the pulseaudio Latency, can you please look into the below log. During this process of "<b>alsa-sink.c: Tried rewind, but was apparently not possible</b>", the latency is coming.</div><div><br></div><div><div>Fri Aug 10 11:21:28 2018 <a href="http://user.info">user.info</a> pulseaudio[4396]: (50087.559| 0.000) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: Tried rewind, but was apparently not possible.</div><div>Fri Aug 10 11:21:28 2018 user.debug pulseaudio[4396]: (50087.575| 0.015) [alsa-sink-I2S cx2072x-dsp-0] protocol-native.c: Requesting rewind due to end of underrun.</div><div>Fri Aug 10 11:21:28 2018 user.debug pulseaudio[4396]: (50087.575| 0.000) [alsa-sink-I2S cx2072x-dsp-0] protocol-native.c: Requesting rewind due to end of underrun.</div><div>Fri Aug 10 11:21:28 2018 user.debug pulseaudio[4396]: (50087.577| 0.001) [alsa-sink-I2S cx2072x-dsp-0] protocol-native.c: Requesting rewind due to end of underrun.</div><div>Fri Aug 10 11:21:28 2018 user.debug pulseaudio[4396]: (50087.579| 0.002) [alsa-sink-I2S cx2072x-dsp-0] protocol-native.c: Requesting rewind due to end of underrun.</div><div>Fri Aug 10 11:21:28 2018 user.debug pulseaudio[4396]: (50087.580| 0.000) [alsa-sink-I2S cx2072x-dsp-0] sink-input.c: Requesting rewind due to uncorking</div><div>Fri Aug 10 11:21:28 2018 user.debug pulseaudio[4396]: (50087.580| 0.000) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: Requested to rewind 76608 bytes.</div><div>Fri Aug 10 11:21:28 2018 user.debug pulseaudio[4396]: (50087.580| 0.000) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: Limited to 68288 bytes.</div><div>Fri Aug 10 11:21:28 2018 user.debug pulseaudio[4396]: (50087.581| 0.000) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: before: 17072</div><div>Fri Aug 10 11:21:28 2018 user.debug pulseaudio[4396]: (50087.581| 0.000) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: after: 0</div><div>Fri Aug 10 11:21:28 2018 <a href="http://user.info">user.info</a> pulseaudio[4396]: (50087.581| 0.000) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: Tried rewind, but was apparently not possible.</div><div>Fri Aug 10 11:21:31 2018 user.debug pulseaudio[4396]: (50090.231| 2.650) [alsa-sink-I2S cx2072x-dsp-0] sink-input.c: Requesting rewind due to corking</div><div>Fri Aug 10 11:21:31 2018 user.debug pulseaudio[4396]: (50090.231| 0.000) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: Requested to rewind 76608 bytes.</div><div>Fri Aug 10 11:21:31 2018 user.debug pulseaudio[4396]: (50090.232| 0.000) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: Limited to 12992 bytes.</div><div>Fri Aug 10 11:21:31 2018 user.debug pulseaudio[4396]: (50090.232| 0.000) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: before: 3248</div><div>Fri Aug 10 11:21:31 2018 user.debug pulseaudio[4396]: (50090.232| 0.000) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: after: 0</div><div>Fri Aug 10 11:21:31 2018 <a href="http://user.info">user.info</a> pulseaudio[4396]: (50090.232| 0.000) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: Tried rewind, but was apparently not possible.</div><div>Fri Aug 10 11:21:31 2018 user.debug pulseaudio[4396]: (50090.241| 0.009) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: hwbuf_unused=0</div><div>Fri Aug 10 11:21:31 2018 user.debug pulseaudio[4396]: (50090.241| 0.000) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: setting avail_min=18193</div><div>Fri Aug 10 11:21:31 2018 user.debug pulseaudio[4396]: (50090.242| 0.000) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: Requested to rewind 76608 bytes.</div><div>Fri Aug 10 11:21:31 2018 user.debug pulseaudio[4396]: (50090.242| 0.000) [pulseaudio] core.c: Hmm, no streams around, trying to vacuum.</div><div>Fri Aug 10 11:21:31 2018 user.debug pulseaudio[4396]: (50090.242| 0.000) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: Limited to 12992 bytes.</div><div>Fri Aug 10 11:21:31 2018 user.debug pulseaudio[4396]: (50090.242| 0.000) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: before: 3248</div><div>Fri Aug 10 11:21:31 2018 user.debug pulseaudio[4396]: (50090.242| 0.000) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: after: 0</div><div>Fri Aug 10 11:21:31 2018 <a href="http://user.info">user.info</a> pulseaudio[4396]: (50090.242| 0.000) [alsa-sink-I2S cx2072x-dsp-0] alsa-sink.c: Tried rewind, but was apparently not possible.</div><div><br></div><div><b>When the below log came, the music played successfully.</b></div><div><b><br></b></div><div>Fri Aug 10 11:21:31 2018 <a href="http://user.info">user.info</a> pulseaudio[4396]: (50090.243| 0.000) [pulseaudio] sink-input.c: Freeing input 445 "Playback Stream"</div><div>Fri Aug 10 11:21:31 2018 <a href="http://user.info">user.info</a> pulseaudio[4396]: (50090.247| 0.004) [pulseaudio] client.c: Freed 246 "gstreamer_play"</div><div>Fri Aug 10 11:21:31 2018 <a href="http://user.info">user.info</a> pulseaudio[4396]: (50090.247| 0.000) [pulseaudio] protocol-native.c: Connection died.</div></div><div><br></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Regards,</div><div>Harish Gaddameedi</div><div>Software Engineer<br></div><div>Mobile: +91- 9246040475<br></div><div><img src="https://docs.google.com/uc?export=download&id=1179THzPaIyEiFgbLrcPWmCyheA5rAXcv&revid=0B1BS28AhWdviTDdRRGY3bzFIZ1FTaXd0d0o1cHJRYms4ejIwPQ" height="54" width="96"><br></div></div></div></div></div></div></div></div>