From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [ALSA patch] [PATCH - alsa-lib 4/4] pcm_file: add infile read support for mmap mode Date: Tue, 21 May 2019 10:23:50 +0200 Message-ID: References: <1558370831-15960-1-git-send-email-adam.miartus@gmail.com> <1558370831-15960-4-git-send-email-adam.miartus@gmail.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 mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 87520F8079B for ; Tue, 21 May 2019 10:23:51 +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" To: "Miartus, Adam (Arion Recruitment; ADITG/ESM)" Cc: "alsa-devel@alsa-project.org" List-Id: alsa-devel@alsa-project.org On Mon, 20 May 2019 18:51:06 +0200, Miartus, Adam (Arion Recruitment; ADITG/ESM) wrote: > > From: Adam Miartus > > mmap_begin callback is used to copy data from input file to mmaped buffer > > guard for corner use of api (multiple mmap_begin calls by user) is introduced to check if next continuous buffer was already overwritten > > buffer is overwritten with input file data only in case of stream capture > > Signed-off-by: Adam Miartus > Reviewed-by: Timo Wischer Can't we copy the data in snd_pcm_file_mmap_commit() just like the playback case? thanks, Takashi