[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOzgRdYTa-nAa7QV6c2aZs910BACg91vAjcjw4V-Oy8KCZVmmQ@mail.gmail.com>
Date: Mon, 4 Nov 2019 16:27:20 +0800
From: youling 257 <youling257@...il.com>
To: Takashi Iwai <tiwai@...e.de>
Cc: linux-xtensa@...ux-xtensa.org, Michal Simek <monstr@...str.eu>,
Vladimir Murzin <vladimir.murzin@....com>,
linux-parisc@...r.kernel.org, linux-sh@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, Helge Deller <deller@....de>,
x86@...nel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-m68k@...ts.linux-m68k.org,
Robin Murphy <robin.murphy@....com>,
linux-arm-kernel@...ts.infradead.org, hch@....de, gregkh@...gle.com
Subject: Re: ALSA: pcm: use dma_can_mmap() to check if a device supports dma_mmap_*
This driver https://android.googlesource.com/kernel/common/+/refs/heads/android-mainline/drivers/usb/gadget/function/f_audio_source.c
2019-11-04 16:02 GMT+08:00, Takashi Iwai <tiwai@...e.de>:
> Exactly which driver is hit? The code path is via hw_support_mmap()
> and it's currently:
>
> static bool hw_support_mmap(struct snd_pcm_substream *substream)
> {
> if (!(substream->runtime->hw.info & SNDRV_PCM_INFO_MMAP))
> return false;
>
> if (substream->ops->mmap ||
> substream->dma_buffer.dev.type != SNDRV_DMA_TYPE_DEV)
> return true;
>
> return dma_can_mmap(substream->dma_buffer.dev.dev);
> }
>
> so at least the driver has already set the SNDRV_DMA_TYPE_DEV
> explicitly (it's non-zero) and some device object, but the device
> object was invalid for dma_can_mmap() call.
>
> This smells more like a driver-side issue, not in the core side.
>
>
> thanks,
>
> Takashi
>
Powered by blists - more mailing lists