Re: [PATCH 4/7] ALSA: pcm: use dma_can_mmap() to check if a device supports dma_mmap_*

2019-08-06 Thread Takashi Iwai
On Tue, 06 Aug 2019 07:29:49 +0200, Christoph Hellwig wrote: > > On Mon, Aug 05, 2019 at 11:22:03AM +0200, Takashi Iwai wrote: > > This won't work as expected, unfortunately. It's a bit tricky check, > > since the driver may have its own mmap implementation via > > substream->ops->mmap, and the

Re: [PATCH 4/7] ALSA: pcm: use dma_can_mmap() to check if a device supports dma_mmap_*

2019-08-05 Thread Christoph Hellwig
On Mon, Aug 05, 2019 at 11:22:03AM +0200, Takashi Iwai wrote: > This won't work as expected, unfortunately. It's a bit tricky check, > since the driver may have its own mmap implementation via > substream->ops->mmap, and the dma_buffer.dev.dev might point to > another object depending on the

Re: [PATCH 4/7] ALSA: pcm: use dma_can_mmap() to check if a device supports dma_mmap_*

2019-08-05 Thread Takashi Iwai
On Mon, 05 Aug 2019 11:11:56 +0200, Christoph Hellwig wrote: > > Replace the local hack with the dma_can_mmap helper to check if > a given device supports mapping DMA allocations to userspace. > > Signed-off-by: Christoph Hellwig > --- > sound/core/pcm_native.c | 5 ++--- > 1 file changed, 2

[PATCH 4/7] ALSA: pcm: use dma_can_mmap() to check if a device supports dma_mmap_*

2019-08-05 Thread Christoph Hellwig
Replace the local hack with the dma_can_mmap helper to check if a given device supports mapping DMA allocations to userspace. Signed-off-by: Christoph Hellwig --- sound/core/pcm_native.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/core/pcm_native.c