From: Takashi Iwai Subject: Re: [PATCH] ALSA: pcm: Use dma_bytes as size parameter in dma_mmap_coherent() Date: Mon, 26 Mar 2018 16:34:58 +0200 Message-ID: References: <20180326141021.12265-1-sr@denx.de> 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 676F8266E07 for ; Mon, 26 Mar 2018 16:35:00 +0200 (CEST) In-Reply-To: <20180326141021.12265-1-sr@denx.de> 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: Stefan Roese Cc: alsa-devel@alsa-project.org, Takashi Sakamoto List-Id: alsa-devel@alsa-project.org On Mon, 26 Mar 2018 16:10:21 +0200, Stefan Roese wrote: > > When trying to use the driver (e.g. aplay *.wav), the 4MiB DMA buffer > will get mmapp'ed in 16KiB chunks. But this fails with the 2nd 16KiB > area, as the page offset is outside of the VMA range (size), which is > currently used as size parameter in snd_pcm_lib_default_mmap(). By > using the DMA buffer size (dma_bytes) instead, the complete DMA buffer > can be mmapp'ed and the issue is fixed. > > This issue was detected on an ARM platform (TI AM57xx) using the RME > HDSP MADI PCIe soundcard. > > Signed-off-by: Stefan Roese > Cc: Jaroslav Kysela > Cc: Takashi Iwai > Cc: Takashi Sakamoto Applied now. Thanks for catching this. It was an itchy bug that has been standing for long time. Takashi