alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Dharageswari R <dharageswari.r@intel.com>
To: Clemens Ladisch <clemens@ladisch.de>, tiwai@suse.de
Cc: alsa-devel@alsa-project.org, dharageswari.r@intel.com,
	vinod.koul@intel.com, hardik.t.shah@intel.com,
	rakesh.a.ughreja@intel.com
Subject: Re: Underrun with 2 periods on skylake HDA driver
Date: Fri, 11 Aug 2006 10:12:04 +0530	[thread overview]
Message-ID: <20060811044152.GA3557@dhara-desktop> (raw)

On Tue, Aug 09, 2016 at 11:54:22PM -0700, Clemens Ladisch wrote:
> Dharageswari R wrote:
> > While doing the validation of Skylake HDA driver using aplay and
> > following parameters, we noticed underrun issues.
> >
> > buffer_size  : 9600
> > period_size  : 4800
> >
> > After doing further debugging, what I found is
> >
> > 1.DMA complete interrupt occurs for the first period.
> > 2.Driver reads DMA position in buffer pointer and gets value of 4784.
>
> The interrupt says that the buffer descriptor list entry has been
> completed, but the position in buffer pointer says that the entry has
> not yet been completed.
>
yes
> > I checked with HDA architects and they are saying that when the DMA
> > completion interrupt occurs there can be slight delay before the DMA
> > Position In Buffer Pointer gets updated.
>
> The driver's interrupt handler takes care to read the interrupt status
> register first, so that any pending memory writes from the device are
> flushed.
>
> Of course, this does not work if the device posts writes _after_ the
> interrupt has been raised.  This is a bug in the hardware.
>
> > So driver is expected to refill data based on whatever content is
> > reflected in the DMA Position In Buffer.
>
> No, that's not how it works.  The driver waits until all 4800 frames
> are available, and the only way to wake it up is with an interrupt.
>
There is no other interrupt apart from the buffer completion interrupt
to know the post write completion. The only option here would be to
poll till the position is equal or more than the period boundary with
timeout before the period elapsed reporting. I thought of avoiding this
if possible but doesnt seem to be true. Thanks for your reply.
I will make sure that the driver reports period ellapsed
at or above the period boundary.
>
> It appears the driver must work around this bug by scheduling another
> interrupt after the delay.  Is there an upper limit (time or frames) for
> this delay?
The upper limit is not deterministic in this case.
>
>
> Regards,
> Clemens

-- 

             reply	other threads:[~2016-08-11  4:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-11  4:42 Dharageswari R [this message]
2016-08-11  5:37 ` Underrun with 2 periods on skylake HDA driver Takashi Iwai
2006-08-12 11:20   ` Dharageswari R
  -- strict thread matches above, loose matches on Subject: below --
2006-08-10  5:04 Dharageswari R
2016-08-10  6:54 ` Clemens Ladisch

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=20060811044152.GA3557@dhara-desktop \
    --to=dharageswari.r@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=hardik.t.shah@intel.com \
    --cc=rakesh.a.ughreja@intel.com \
    --cc=tiwai@suse.de \
    --cc=vinod.koul@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).