All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@nokia.com>
To: "ext Lopez Cruz, Misael" <x0052729@ti.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: xrun on sdp340 with small buffers
Date: Fri, 27 Mar 2009 08:56:13 +0200	[thread overview]
Message-ID: <20090327085613.dc719780.jarkko.nikula@nokia.com> (raw)
In-Reply-To: <2C7D3DF36ADFFC479B44490D912B616705ED076A6E@dlee07.ent.ti.com>

On Fri, 27 Mar 2009 05:02:29 +0100
"ext Lopez Cruz, Misael" <x0052729@ti.com> wrote:

> I use the sdp3430 machine driver for my board, which connects twl4030
> codec and OMAP McBSP/DMA drivers. Everything works fine, I can play
> audio files (using aplay).
> 
> However, I tried to force 'aplay' to use a different buffer size and
> period count, and it misbehaves. My experiment was setting buffer time
> to 10ms and periods to 4, and play a 8kHz sample file; this only
> generates underrun messages. Under that configuration, for 8kHz, it
> means a buffer size of 320B (16-bits, stereo) divided into 4 periods
> of 80B each. omap-pcm driver will report interrupts each 80B, as it
> uses a single DMA transfer for the buffer and generates interrupts
> each frame.
> 
Am I right that SDP3430 is using McBSP2 for audio codec? We had similar
issues sometime ago and I obviously forgot to report it here... grr.

But shortly:

McBSP2 in OMAP3 has 1 ksample (1k x 32 bit) internal FIFO. During
initial playback startup, this FIFO is keeping the DMA request active
until the FIFO is full.

So now if ALSA buffer size is smaller, DMA is looping around it while
filling up the HW FIFO, generating burst of interrupts as well and SW
doesn't have any change to fill enough data.

Hmm. We better to have a patch setting constraint for minimum buffer
size in case McBSP2 in OMAP3.


-- 
Jarkko

  reply	other threads:[~2009-03-27  6:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-27  4:02 xrun on sdp340 with small buffers Lopez Cruz, Misael
2009-03-27  6:56 ` Jarkko Nikula [this message]
2009-03-27 13:32   ` (no subject) Jarkko Nikula
2009-03-27 13:32     ` [PATCH] ASoC: OMAP: Set minimum buffer size constraint for McBSP2 in OMAP3 Jarkko Nikula
2009-03-27 16:31     ` (no subject) Mark Brown

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=20090327085613.dc719780.jarkko.nikula@nokia.com \
    --to=jarkko.nikula@nokia.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=x0052729@ti.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 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.