From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0834CA9ED3 for ; Tue, 5 Nov 2019 00:59:03 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4ACF620717 for ; Tue, 5 Nov 2019 00:59:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="W9kqiDQ9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4ACF620717 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 476WWn0s39zF3S7 for ; Tue, 5 Nov 2019 11:59:01 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::143; helo=mail-il1-x143.google.com; envelope-from=youling257@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="W9kqiDQ9"; dkim-atps=neutral Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4765Wc3byrzF3ZG for ; Mon, 4 Nov 2019 19:27:24 +1100 (AEDT) Received: by mail-il1-x143.google.com with SMTP id y5so14010345ilb.5 for ; Mon, 04 Nov 2019 00:27:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HX4pBaoGeNQiQ+yt/czMAU0I4DAG8i9or/oZi9FPxrA=; b=W9kqiDQ9H6TBYA6EcpFgXwkd1ww7ZKsT2zyowkzPMfKN4YVvECqYHFNqcisKcs65Kk q5u5OPB/FgY9l1YV1ZSKIUBi3rPU9yIYTDQuCkSZbGymlKTuB2FEviFyZWugv98foIPI 3x9QkmCNURX4PfLY/HJ1CUUuYZvmQxH5YuPrJ9Aqe/SqFCYweQn84SL9R17UI5R8f5Lx 1w41qnyT3bMi/5NVlEwuLKRFhng03Ho7Hv1RrClIIepNa6dFYP5ePuUS3Fdc4rhOzmrE 6944AZzIB5M88aKEDACrSUhxtzbdFw6bf7eVXi0c13JkVKXTQJaWqDZde9NYVcjvsI4t 69Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HX4pBaoGeNQiQ+yt/czMAU0I4DAG8i9or/oZi9FPxrA=; b=N6Z2d/M7/Cll/zTz3QX+XRv11UzZzptRbWodSLxKal6wi6SsQvsV53kh+jrDi0JagD GVjw9OF7r0bCnBZ3V8B/aREc4pP7/KLsUtHj0F6SGRjWxOYuRnaZ+S2PLQFqbX6/2vbA YT6J4oofM2x6QrWb5HWhK8yOIbOs3/KzEQl/ednEB1BA/T8lSvaVDhY3AeM8kLv9PIBR d5fQkDQ5p8O0x5Ea0QlBvI1U2RTIEF1kIYqDCuB4HE7C97djPHiOXBigAVuGQoXkh69w 3H/c+LcWv02rTHwQswM6aOkbcX7HGkSi7z20mwyprEGVYyL0P27kTgxAUzC7vq8MBC8b GdUg== X-Gm-Message-State: APjAAAWUzZmxqDLkIGGJABFwH+BZIga3o36qZCWQJZRKijs1+k/MegLE ooVGXmdPu+BPKJ0zt9wTZtMe2Wv2nk+Oms0iEew= X-Google-Smtp-Source: APXvYqyuDJikbS+1zmxs0fj3VNP0HAfX0NYxrm42A9cOVaQnPX48CUpkmsJ+WiHDhDI/Wl8EF5mvTyRVDLJGe7oNJhI= X-Received: by 2002:a92:b00f:: with SMTP id x15mr26048913ilh.280.1572856041383; Mon, 04 Nov 2019 00:27:21 -0800 (PST) MIME-Version: 1.0 Received: by 2002:ad5:4348:0:0:0:0:0 with HTTP; Mon, 4 Nov 2019 00:27:20 -0800 (PST) In-Reply-To: References: From: youling 257 Date: Mon, 4 Nov 2019 16:27:20 +0800 Message-ID: Subject: Re: ALSA: pcm: use dma_can_mmap() to check if a device supports dma_mmap_* To: Takashi Iwai Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Tue, 05 Nov 2019 11:54:16 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-xtensa@linux-xtensa.org, Michal Simek , Vladimir Murzin , linux-parisc@vger.kernel.org, linux-sh@vger.kernel.org, Robin Murphy , Helge Deller , x86@kernel.org, Linux Kernel Mailing List , linux-m68k@lists.linux-m68k.org, gregkh@google.com, linuxppc-dev@lists.ozlabs.org, hch@lst.de, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 : > 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 >