From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Valentin Longchamp <valentin.longchamp@epfl.ch>
Subject: Re: mx31 snd and mc13783 codec status
Date: Fri, 2 Apr 2010 11:42:42 +0100 [thread overview]
Message-ID: <20100402104241.GC27613@sirena.org.uk> (raw)
In-Reply-To: <20100402095358.GZ2241@pengutronix.de>
On Fri, Apr 02, 2010 at 11:53:58AM +0200, Sascha Hauer wrote:
> On Thu, Apr 01, 2010 at 06:01:38PM +0200, Valentin Longchamp wrote:
> > The thing is that I get a less than a second sound loop (I use aplay to
> > test, so userspace app should be ok), as if the buffer that the fiq asm
> > interrupt (from ssi_fiq.S) copies to the SSI hardware never was updated.
> > If I have understood the fiq behaviour correctly, you have a asm fiq
> > interrupt that does copy a larger tx buffer into the SSI hardware.
> > Besides it, you have the imx_ssi_timer_callback that checks when the tx
> > buffer was completely copied. If it is the case, then a new buffer tx
> > buffer is "issued" with the snd_pcm_period_elapsed call (and then
> > snd_pcm_update_hw_ptr0). Is this behaviour correct ?
> Yes.
What sample rate are you trying to play and what buffer size? In my
testing the FIQ was really struggling with most applications at sample
rates over ~16kHz since you need each audio period to be long enough to
at least fill the interval between timer polls but applications wanted
to select buffer sizes that were consumed faster than the timer tick.
Using an application like speaker-test which has minimal overhead and no
I/O to worry about helps too.
> > If then it looks like on my system, I have a problem with the
> > snd_pcm_update_hw_ptr0 call.
> You could try reverting b4e82b5b785670b68136765059d1afc65c0ae023. Though
> I have tested it on my boards it may have some implications.
I was seeing similar behaviour before and after that patch too, the main
effect there was to improve the error handling when the FIQ and the
timer get out of sync with each other.
WARNING: multiple messages have this Message-ID (diff)
From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: mx31 snd and mc13783 codec status
Date: Fri, 2 Apr 2010 11:42:42 +0100 [thread overview]
Message-ID: <20100402104241.GC27613@sirena.org.uk> (raw)
In-Reply-To: <20100402095358.GZ2241@pengutronix.de>
On Fri, Apr 02, 2010 at 11:53:58AM +0200, Sascha Hauer wrote:
> On Thu, Apr 01, 2010 at 06:01:38PM +0200, Valentin Longchamp wrote:
> > The thing is that I get a less than a second sound loop (I use aplay to
> > test, so userspace app should be ok), as if the buffer that the fiq asm
> > interrupt (from ssi_fiq.S) copies to the SSI hardware never was updated.
> > If I have understood the fiq behaviour correctly, you have a asm fiq
> > interrupt that does copy a larger tx buffer into the SSI hardware.
> > Besides it, you have the imx_ssi_timer_callback that checks when the tx
> > buffer was completely copied. If it is the case, then a new buffer tx
> > buffer is "issued" with the snd_pcm_period_elapsed call (and then
> > snd_pcm_update_hw_ptr0). Is this behaviour correct ?
> Yes.
What sample rate are you trying to play and what buffer size? In my
testing the FIQ was really struggling with most applications at sample
rates over ~16kHz since you need each audio period to be long enough to
at least fill the interval between timer polls but applications wanted
to select buffer sizes that were consumed faster than the timer tick.
Using an application like speaker-test which has minimal overhead and no
I/O to worry about helps too.
> > If then it looks like on my system, I have a problem with the
> > snd_pcm_update_hw_ptr0 call.
> You could try reverting b4e82b5b785670b68136765059d1afc65c0ae023. Though
> I have tested it on my boards it may have some implications.
I was seeing similar behaviour before and after that patch too, the main
effect there was to improve the error handling when the FIQ and the
timer get out of sync with each other.
next prev parent reply other threads:[~2010-04-02 10:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-30 16:23 mx31 snd and mc13783 codec status Valentin Longchamp
2010-03-30 16:23 ` Valentin Longchamp
2010-03-30 20:40 ` Mark Brown
2010-03-30 20:40 ` Mark Brown
2010-03-31 8:38 ` Sascha Hauer
2010-03-31 8:38 ` Sascha Hauer
2010-03-31 8:34 ` Sascha Hauer
2010-03-31 8:34 ` Sascha Hauer
2010-04-01 16:01 ` Valentin Longchamp
2010-04-01 16:01 ` Valentin Longchamp
2010-04-02 9:53 ` Sascha Hauer
2010-04-02 9:53 ` Sascha Hauer
2010-04-02 10:42 ` Mark Brown [this message]
2010-04-02 10:42 ` Mark Brown
2010-04-06 16:00 ` Valentin Longchamp
2010-04-06 16:00 ` Valentin Longchamp
2010-04-07 11:03 ` Sascha Hauer
2010-04-07 11:03 ` Sascha Hauer
2010-04-07 12:12 ` Mark Brown
2010-04-07 12:12 ` 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=20100402104241.GC27613@sirena.org.uk \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
--cc=valentin.longchamp@epfl.ch \
/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.