[alsa-devel] [PATCH v3 2/4] ALSA: compress: Add function to indicate the stream has gone bad
Charles Keepax
ckeepax at opensource.wolfsonmicro.com
Mon Apr 11 17:13:41 CEST 2016
On Mon, Apr 11, 2016 at 04:41:23PM +0200, Takashi Iwai wrote:
> On Mon, 11 Apr 2016 16:27:33 +0200,
> Charles Keepax wrote:
> > + switch (stream->runtime->state) {
> > + case SNDRV_PCM_STATE_OPEN:
> > + case SNDRV_PCM_STATE_XRUN:
> > + return -EBADFD;
>
> One question is whether we want a dedicated error code for XRUN or
> such a DSP error. On PCM, for example, we return -EPIPE traditionally
> for XRUN state. This is a clear indicator for user what to do at
> next.
>
> Other than that, the patch series looks good to me.
I think it probably makes sense to copy what the PCM framework
does here, I will respin and use EPIPE.
Thanks,
Charles
More information about the Alsa-devel
mailing list