[alsa-devel] [PATCH v5 2/4] ALSA: compress: Add function to indicate the stream has gone bad

Charles Keepax ckeepax at opensource.wolfsonmicro.com
Wed Apr 20 16:54:46 CEST 2016


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 at 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?

Thanks,
Charles


More information about the Alsa-devel mailing list