From: Takashi Iwai Subject: Re: [PATCH] ALSA: pcm: Return 0 when size < start_threshold in capture Date: Wed, 22 Aug 2018 09:53:56 +0200 Message-ID: References: <20180821194643.GA10347@localhost.localdomain> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id B0B6026779C for ; Wed, 22 Aug 2018 09:53:57 +0200 (CEST) In-Reply-To: <20180821194643.GA10347@localhost.localdomain> 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: Ricardo Biehl Pasquali Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org On Tue, 21 Aug 2018 21:46:43 +0200, Ricardo Biehl Pasquali wrote: > > In __snd_pcm_lib_xfer(), when capture, if state is > PREPARED and size is less than start_threshold nothing > can be done. As there is no error, 0 is returned. > > Am I missing something? Not really :) It's just an undefined behavior, so far, and yes, the suggested behavior makes more sense. Could you resubmit a proper patch for merging? Please follow Documentation/process/submitting-patches.rst. thanks, Takashi