From: Takashi Iwai Subject: Re: [PATCH IO plug API 1/1] ioplug: Use boundary for wrap around Date: Fri, 23 Feb 2018 14:52:09 +0100 Message-ID: References: <1519378131-18139-1-git-send-email-twischer@de.adit-jv.com> 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 mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 8201F2678D7 for ; Fri, 23 Feb 2018 14:52:10 +0100 (CET) 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: twischer@de.adit-jv.com Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org On Fri, 23 Feb 2018 11:40:01 +0100, Takashi Iwai wrote: > > On Fri, 23 Feb 2018 10:28:51 +0100, > wrote: > > > > From: Timo Wischer > > > > if requested by the IO plugin > > > > Without this changes an IO plugin is not able to report > > that buffer_size frames were read from the buffer. > > When the buffer was full this is a valid action and > > has not to be handled as an under run. > > > > For example when the hw_ptr will be updated with > > hw_ptr += buffer_size > > and it is using the buffer_size as wrap around > > hw_ptr %= buffer_size > > would result in the same value as before the add operation. > > > > Signed-off-by: Timo Wischer > > --- > > Hello Takashi, > > > > > If you need to improve such a situation, you'd have to fix in the > > > ioplug implementation itself, not the jack plugin. > > > > A have attached a patch which improves the IO plug API. > > If you are happy with this solution I would also adapt the pending > > JACK plugin patch and set the SND_PCM_IOPLUG_FLAG_BOUNDARY_WA flag. > > Yep, this looks better now. > > A slightly complex procedure when extending an API is that you need > to check the existence of SND_PCM_IOPLUG_FLAG_BOUNDARY_WA in jack > plugin side at the compilation time. Or make AM_PATH_ALSA() in > alsa-utils/configure.ac aligned with this change, but it won't work > until the release of alsa-lib itself. That said, I'd happily merge the patch once when seeing the corresponding change in jack plugin side. thanks, Takashi