alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Ben Gardiner <bengardiner@nanometrics.ca>
To: Liam Girdwood <lrg@ti.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Sekhar Nori <nsekhar@ti.com>,
	alsa-devel@alsa-project.org,
	davinci-linux-open-source@linux.davincidsp.com
Subject: [RFC 0/3] ASoC: davinci- pcm and McASP error detection
Date: Fri, 30 Sep 2011 17:23:00 -0400	[thread overview]
Message-ID: <cover.1317417232.git.bengardiner@nanometrics.ca> (raw)

Both the EDMA3 and McASP have the ability to report error conditions. In both
cases these errors are silently dropped on the floor. 

I would like very much to get HW errors up the stack to the aplay process using
the harware. This is an RFC series demonstrating a first attempt. 

1/3 isn't nearly as half-baked as the others. It proposes to return
SNDRV_PCM_POS_XRUN from davinci-pcm's pointer() function like is currently done
in fsl_dma. The problem I have observed in test is that the stream does not abort; 
several underruns are reported before aplay finally dies. I would prefer immeadiate
death with a reason.

2/3 and 3/3 are a first-strike at registering 'health' callbacks provided by the 
CPU DAI so that error conditions can be reported back. The health callback is polled
on calls to pointer(). This may be too often. Also the current method of registering
these callbacks seems wrong -- please help me out here.

If there is an established method of bubbling HW errors up to userspace that I
completely missed: I am sorry for the noise and would be glad to hear about how to 
use it with davinci-pcm.

Best Regards,

Ben Gardiner

Ben Gardiner (3):
  [RFC] ASoC: davinci-pcm: latch EDMA errors
  [RFC] ASoC: davinci-pcm: add cpu-dai health callbacks
  [RFC] ASoC: davinci-mcasp: add cpu dai health callback

 sound/soc/davinci/davinci-mcasp.c |   26 ++++++++++++++++++++++++++
 sound/soc/davinci/davinci-pcm.c   |   19 +++++++++++++++++--
 sound/soc/davinci/davinci-pcm.h   |    3 +++
 3 files changed, 46 insertions(+), 2 deletions(-)

-- 
1.7.4.1

             reply	other threads:[~2011-09-30 21:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-30 21:23 Ben Gardiner [this message]
2011-09-30 21:23 ` [PATCH 1/3] ASoC: davinci-pcm: latch EDMA errors Ben Gardiner
2011-10-02 18:48   ` Mark Brown
2011-10-04  2:04     ` Ben Gardiner
2011-09-30 21:23 ` [RFC 2/3] ASoC: davinci-pcm: add cpu-dai health callbacks Ben Gardiner
2011-10-02 18:54   ` Mark Brown
2011-10-04  2:05     ` Ben Gardiner
2011-10-04 11:06       ` Mark Brown
2011-09-30 21:23 ` [RFC 3/3] ASoC: davinci-mcasp: add cpu dai health callback Ben Gardiner

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=cover.1317417232.git.bengardiner@nanometrics.ca \
    --to=bengardiner@nanometrics.ca \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=lrg@ti.com \
    --cc=nsekhar@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 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).