All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Lennart Poettering <mznyfn@0pointer.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: Timer instability
Date: Mon, 23 Feb 2009 08:47:51 +0100	[thread overview]
Message-ID: <s5heixp4ms8.wl%tiwai@suse.de> (raw)
In-Reply-To: <20090222031453.GA24365@tango.0pointer.de>

At Sun, 22 Feb 2009 04:14:53 +0100,
Lennart Poettering wrote:
> 
> On Sat, 21.02.09 17:36, Takashi Iwai (tiwai@suse.de) wrote:
> 
> > 
> > At Fri, 20 Feb 2009 21:34:17 +0100,
> > Lennart Poettering wrote:
> > > 
> > > On Fri, 20.02.09 08:26, Takashi Iwai (tiwai@suse.de) wrote:
> > > 
> > > > > Yes, I am. But ignore that part for now. I have now commented the use
> > > > > of that call. Now I certainly get more POLLOUTs as expected, but the
> > > > > real problem stays: after a few minutes _avail() will suddenly jump
> > > > > from next to zero to more then the hwbuf size in less than 1ms without
> > > > > any further inteference and with a buffer size of 350ms! There is
> > > > > something really wrong with the behaviour of _avail().
> > > > > 
> > > > > I can reproduce this only on ens1371 for now.
> > > > 
> > > > The ens1371 driver itself is damn simple.  The pointer callback just
> > > > returns the read value.  So, it implies that it's basically a hardware
> > > > issue.
> > > > 
> > > > Does the patch below have any influence?
> > > 
> > > No. It doesn't appear to have any effect whatsoever. Still, from time
> > > to time the value returned by _avail() is off by once the buffer size,
> > > sometimes upwards, sometimes downwards.
> > > 
> > > Moreover I can now reproduce the same issue on snd-intel8x0, albeit it
> > > takes more than a couple of minutes to make snd_pcm_avail() return
> > > bogus data.
> > > 
> > > Somehow I get the feeling the problem is not so much the inaccuracy of
> > > the pointer the kernel reports but in what alsa-libs does ith it.
> > 
> > Hrm... both cases the pointer calculation is relatively simple,
> > and for "hw" PCM, the avail calculation is also very straightforward.
> > So, my first suspect is about the pointer calculation.  But, of course
> > we should check all possibilities.
> > 
> > Can you give a small testcase?
> 
> Ok, here's a little test case:
> 
> http://git.0pointer.de/?p=pulseaudio.git;a=blob_plain;f=src/tests/alsa-time-test.c

Thanks.  Will check it later.


Takashi

  parent reply	other threads:[~2009-02-23  7:47 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-19  2:46 Timer instability Lennart Poettering
2009-02-19  6:52 ` Takashi Iwai
2009-02-20  1:22   ` Lennart Poettering
2009-02-20  1:26     ` Lennart Poettering
2009-02-20  1:50     ` Lennart Poettering
2009-02-20  7:26     ` Takashi Iwai
2009-02-20 20:34       ` Lennart Poettering
2009-02-21 16:36         ` Takashi Iwai
2009-02-22  3:14           ` Lennart Poettering
2009-02-23  2:42             ` Lennart Poettering
2009-02-23  2:56               ` Lennart Poettering
2009-02-23 19:20                 ` Lennart Poettering
2009-02-23 19:24                   ` Colin Guthrie
2009-02-24  3:21                   ` Lennart Poettering
2009-02-23  7:47             ` Takashi Iwai [this message]
2009-02-24 16:27             ` Takashi Iwai
2009-02-24 18:46               ` Lennart Poettering
2009-02-24 18:59                 ` Takashi Iwai
2009-02-24 19:04                   ` Jaroslav Kysela
2009-02-24 19:26                   ` Lennart Poettering
2009-02-24 20:37                     ` Takashi Iwai
2009-02-25 10:08                       ` Takashi Iwai
2009-02-25 10:22                         ` Takashi Iwai
2009-02-25 12:34                           ` Clive Messer
2009-02-25 13:36                             ` Takashi Iwai
2009-02-25 15:11                               ` Clive Messer
2009-02-25 15:51                                 ` Takashi Iwai
2009-02-25 16:24                                   ` Clive Messer
2009-02-25 16:39                                     ` Takashi Iwai
     [not found]                                       ` <200902251656.47813.clive@vacuumtube.org.uk>
2009-02-25 16:59                                         ` Takashi Iwai
2009-02-25 17:36                                           ` Clive Messer
2009-02-25 18:13                                             ` Takashi Iwai
2009-02-25 18:16                                               ` Clive Messer
2009-02-25 18:34                                               ` Clive Messer
2009-03-03 16:05                                                 ` Takashi Iwai
2009-03-03 17:41                                                   ` Takashi Iwai
2009-03-09 11:13                                                     ` Clive Messer
2009-03-09 11:20                                                       ` Takashi Iwai
2009-03-09 13:09                                                         ` Takashi Iwai
2009-02-25 15:04                             ` Takashi Iwai
2009-02-25 10:44                         ` Lennart Poettering
2009-02-24 21:16                     ` Lennart Poettering
2009-02-25 10:48                       ` Takashi Iwai
2009-02-25 10:57                         ` Jaroslav Kysela
2009-02-25 11:04                           ` Takashi Iwai
2009-02-25 11:10                             ` Jaroslav Kysela
2009-02-25 11:17                               ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5heixp4ms8.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=mznyfn@0pointer.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.