From: Takashi Iwai Subject: Re: snd_pcm_ioplug_avail_update() confusion Date: Tue, 24 Oct 2017 21:50:49 +0200 Message-ID: References: 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 D6797266DB1 for ; Tue, 24 Oct 2017 21:50:49 +0200 (CEST) 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: Rob Duncan Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org On Wed, 18 Oct 2017 08:03:57 +0200, Rob Duncan wrote: > > I'm working on an external IO plugin based on ioplug and I'm confused > about the behavior of snd_pcm_ioplug_avail_update(). Specifically this > call (src/pcm/pcm_ioplug.c:657): > > result = io->data->callback->transfer(io->data, areas, offset, size); > > Why isn't there a subsequent call to snd_pcm_mmap_appl_forward() like > there is in ioplug_priv_transfer_areas()? It seems that without such a > call the captured data will be lost, or have I missed something? This is the code to only fetch the data for the capture stream at avail update. What happens there is to just fills the gap made by updating the hw_ptr (right before this transfer call). And, the avail_udpate call itself doesn't change appl_ptr. That said, the current behavior is intentional. HTH, Takashi