From: Takashi Iwai Subject: Re: [PATCH - JACK PCM plugin] jack: Use boundary as hw_ptr wrap around Date: Sat, 24 Feb 2018 11:43:36 +0100 Message-ID: References: <1519395488-6735-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 4B5492672B2 for ; Sat, 24 Feb 2018 11:43:37 +0100 (CET) In-Reply-To: <1519395488-6735-1-git-send-email-twischer@de.adit-jv.com> 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 15:18:08 +0100, wrote: > > From: Timo Wischer > > instead of using buffer_size as wrap around. > > This is required to detect Xruns. > > It is also required to allow the JACK thread > to processes the whole ALSA audio buffer at once > without calling snd_pcm_avail_update() in between. > > 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. > > Due to that the user application would not recognize > that the complete audio buffer was copied. > > Signed-off-by: Timo Wischer > > --- > > Here the updated version which only returns > hw_ptr >= buffer_size if supported > by the ALSA library on compile time Thanks, applied now together with your alsa-lib patch. Takashi