<div dir="ltr"><div><br></div>Hi Harish,<br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 6, 2013 at 5:57 PM, harish jenny <span dir="ltr"><<a href="mailto:harishjennykn@yahoo.com" target="_blank">harishjennykn@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div><span>Hi Vignesh,</span></div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif"><br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">
I saw your debug logs and found that the error message in the log is err == -ENODEV when glitch is coming and <br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">
err = -EPIPE when glitch is not coming.<br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">The issue is
 similar to the ones mentioned in <br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif"><a href="https://bugzilla.gnome.org/show_bug.cgi?id=690197" target="_blank">https://bugzilla.gnome.org/show_bug.cgi?id=690197</a>.</div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">The fix added in gstreamer will make it  not loop forever if an USB/IPOD audio device gets disconnected
while in use. It will post an error message instead.</div></div></div></blockquote><div><br></div><div>Thanks for analyzing the logs.<br></div><div><br>As Tim mentioned only posting error message did not solve the issue. The glitch was still seen when only that patch (alsa: post error message when audio device disappears) was applied. <br>
<br>I applied all patches mentioned in bug690197 and tested the issue, the issue was resolved. So making the ring buffer bail out also is required to solve this issue.<br><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><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif"><br><span></span></div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">You should not be facing this issue in latest gstreamer 1.0.<br></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">
<span>If you cannot use 1.0 , you can take the changes manually and test.</span></div></div></div></blockquote><div><br></div><div>I manually merged the changes and tested.<br><br></div><div>Thanks.<br> <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><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif"><span><br></span></div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif"><br><span></span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">
<span>Thanks & Regards,</span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif"><span>Harish Jenny K N<br></span></div><div style="font-family:times new roman,new york,times,serif;font-size:12pt">
<div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div><br>Message: 5<br>Date: Thu, 5 Sep 2013 22:25:34 +0530<br>From: Vignesh Raman <<a href="mailto:rvignesh.raman@gmail.com" target="_blank">rvignesh.raman@gmail.com</a>><br>
To: <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>Subject: Re: Glitch in audio when ipod is disconnected<br>Message-ID:<br>    <<a href="mailto:CAL8k1Z5Wxa9f9mq2oUwjosSdEWgR7T6Lsx0iPuUCHYqmCp3Kjg@mail.gmail.com" target="_blank">CAL8k1Z5Wxa9f9mq2oUwjosSdEWgR7T6Lsx0iPuUCHYqmCp3Kjg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br><br>Hi Tim,<br><br>On Thu, 2013-09-05 at 08:21 +0530, Vignesh Raman wrote:<br>><br>> > This seems to be a race condition between threads, but I'm not sure.<br>
><br>> Out of curiosity, what makes you suspect it's a race and not e.g. a<br>> scheduling issue? (e.g. the capture thread or render thread don't get<br>> scheduled for a while, causing the glitch)<br>
><br><br>Since its a multi threaded application, my guess was it could be a race<br>condition
 between threads.<br><br><br>><br>> Have you tried playing with the buffer sizes in sink/src?<br>><br><br>The buffer-time (Size of audio buffer in microseconds) of alsa source is<br>default set to 200ms. The buffer-time and actual-buffer-time of alsa source<br>
was changed to 23ms in the application code. The application was also not<br>bound to single processor by removing 'taskset' during launching it. With<br>this the audio glitch was not seen when ipod is disconnected during<br>
playback.<br><br>But could this be solved in GStreamer, if its really a problem in GStreamer<br>?<br><br>There were some patches which address some issues when usb is disconnected,<br><a href="https://bugzilla.gnome.org/show_bug.cgi?id=690197" target="_blank">https://bugzilla.gnome.org/show_bug.cgi?id=690197</a><br>
<br>Is the issue mentioned in the bug related to the glitch issue.<br><br>I'm also not getting how 'taskset' is actually solving the issue. Does
 the<br>scheduling happen without any delay when taskset is used.<br><br>Regards,<br>Vignesh.<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <<a href="http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130905/832a1a75/attachment-0001.html" target="_blank">http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130905/832a1a75/attachment-0001.html</a>><br>
<br>------------------------------<br><br>_______________________________________________<br>gstreamer-devel mailing list<br><a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br><br><br>End of gstreamer-devel Digest, Vol 32, Issue
 12<br>***********************************************<br><br><br></div> </div> </div>  </div></div><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Vignesh.
</div></div>