From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Keepax Subject: Re: [PATCH v3 2/4] ALSA: compress: Add function to indicate the stream has gone bad Date: Mon, 11 Apr 2016 16:13:41 +0100 Message-ID: <20160411151341.GP31814@localhost.localdomain> References: <1460384855-10567-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> <1460384855-10567-3-git-send-email-ckeepax@opensource.wolfsonmicro.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx0a-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by alsa0.perex.cz (Postfix) with ESMTP id 0FBE826580E for ; Mon, 11 Apr 2016 17:14:22 +0200 (CEST) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Takashi Iwai Cc: alsa-devel@alsa-project.org, vinod.koul@intel.com, patches@opensource.wolfsonmicro.com, lgirdwood@gmail.com, broonie@kernel.org List-Id: alsa-devel@alsa-project.org 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