All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
	lgirdwood@gmail.com, tiwai@suse.com, broonie@kernel.org
Subject: Re: [PATCH v5 2/4] ALSA: compress: Add function to indicate the stream has gone bad
Date: Thu, 21 Apr 2016 07:55:22 +0530	[thread overview]
Message-ID: <20160421022522.GC2274@localhost> (raw)
In-Reply-To: <20160420145446.GC1581@localhost.localdomain>

On Wed, Apr 20, 2016 at 03:54:46PM +0100, Charles Keepax wrote:
> On Wed, Apr 20, 2016 at 06:38:51PM +0530, Vinod Koul wrote:
> > On Wed, Apr 20, 2016 at 01:40:01PM +0100, Charles Keepax wrote:
> > > Currently, the avail IOCTL doesn't pass any error status, which
> > > means typically on error it simply shows no data available. This
> > > can lead to situations where user-space is waiting indefinitely
> > > for data that will never come as the DSP has suffered an
> > > unrecoverable error.
> > > 
> > > Add snd_compr_stop_error which end drivers can call to indicate
> > > the stream has suffered an unrecoverable error and stop it. The
> > > avail and poll IOCTLs are then updated to report if the stream is
> > > in an error state to user-space. Allowing the error to propagate
> > > out. Processing of the actual snd_compr_stop needs to be deferred
> > > to a worker thread as the end driver may detect the errors during
> > > an existing operation callback.
> > 
> > Acked-by: Vinod Koul <vinod.koul@intel.com>
> > 
> > Btw are you patching tinycompress as well to handle EPIPE?
> 
> I hadn't planned on it but I am happy to do so. The current
> behaviour was sufficient for our needs in that it reports the
> error and shuts the stream.
> 
> Are you thinking of just printing that a over/under run occurred
> or do you want to try and add some recovery code as well?

To start with yes adding prints would help. Adding code to handle EPIPE
would be good and propagating that to user.

>From lib, certainly we want to see this error progated so that upper layers
can do recovery

Recovery is tricky here as we are doing compressed data so essentially new
data has to be on frame boundary, so upper layers should decide.

Thanks
-- 
~Vinod

  reply	other threads:[~2016-04-21  2:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20 12:39 [PATCH v5 0/4] Propagate errors out from compressed streams Charles Keepax
2016-04-20 12:40 ` [PATCH v5 1/4] ALSA: compress: Replace complex if statement with switch Charles Keepax
2016-04-20 12:40 ` [PATCH v5 2/4] ALSA: compress: Add function to indicate the stream has gone bad Charles Keepax
2016-04-20 13:08   ` Vinod Koul
2016-04-20 14:54     ` Charles Keepax
2016-04-21  2:25       ` Vinod Koul [this message]
2016-04-20 16:10   ` Pierre-Louis Bossart
2016-04-21  8:26     ` Charles Keepax
2016-04-21 12:37       ` Pierre-Louis Bossart
2016-04-20 12:40 ` [PATCH v5 3/4] ASoC: wm_adsp: Use new snd_compr_stop_error to signal stream failure Charles Keepax
2016-04-20 13:09   ` Vinod Koul
2016-04-20 12:40 ` [PATCH v5 4/4] ASoC: compress: Pass error out of soc_compr_pointer Charles Keepax
2016-04-20 13:09 ` [PATCH v5 0/4] Propagate errors out from compressed streams 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=20160421022522.GC2274@localhost \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=lgirdwood@gmail.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=tiwai@suse.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.