Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3765368pxt; Tue, 10 Aug 2021 10:48:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7Xq5MzYVZ8ITjzt/1v82IQQuEieVHfueFxBI4kmCKKuSc+WNY0P8Aguud/BfwoZHMTPsM X-Received: by 2002:a05:6e02:1aaf:: with SMTP id l15mr44394ilv.128.1628617683275; Tue, 10 Aug 2021 10:48:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617683; cv=none; d=google.com; s=arc-20160816; b=CYAqwwlBeRy6MztYofoFOSFZ3jJT6iBAUbG4udP7cayjgfeSvNFO0pJK75qSiF2IQV vYuUTBWQL7dFgQctIjCRgZGWOpckah92F+gc2y2nwylpl0/o/jvsO7lN7hItRzz/W5gK YmI3d2k1QB54TDQCDjXJP4FjLG6KxnzJuFtZRacpkZY2iEi9Rk/v9N+llhYEbziXM7uj /r8Q7xjOJGunJA0s5i7rq3jqlpW6VakaxwTu1zj0K4DiqOosJPLvuOBNxH8/3APmughA Bejxm26WX0XzBvrpwiJmOUJq5xGn/Nr0nPpdWPRHoeamnhIGJiFHiaLyys5pNP3Bz6xT eeQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SlHRq3h9O17VDC3UCqOflJHeYmjeW0xSx65XYGQwvls=; b=qh/Jat0X4jx7N3ZhP46UjaXGs0JMYv6f/4JGAVJrpaiZWrCAj+J5jxCF1SABcu5wjY vcsZ3xvUK3Cob43WVRxTF7nTDAJq4iu3gUq7VOTF5DzBCwCt5Qi5iHoxpUwpbsd3onIz pByC2e9j1HrfVl4yixAUdcHil1OFLX34VvpfZMajw2t6u2npSnorPfHKoZ4zprTWXOWg 8St6ad1HCONlrB68nlY68Q9wBXv8CQFUaPZHsP8ZeV4f59Oq8K5iG43Jp2DIw8RAnbW+ Sv4fwkGXXLgDuN7m4fYHdtIlfUNjLxywm4VweLLk0gTIa8qvBt54XJn9WcZH8GVqBPbF WGDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uODXgmDQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c6si20884426ioh.27.2021.08.10.10.47.52; Tue, 10 Aug 2021 10:48:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uODXgmDQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235012AbhHJRrd (ORCPT + 99 others); Tue, 10 Aug 2021 13:47:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:38108 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234634AbhHJRm6 (ORCPT ); Tue, 10 Aug 2021 13:42:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8528F61215; Tue, 10 Aug 2021 17:38:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617133; bh=hDWi11sJfcOlWySAbTNanelCHGUfGD085xvsx3AB2H4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uODXgmDQYwSCXyA7xzTlTshgdIBq9QZ/Xq+ME8DE5lKDHS8qZ13wrpAbvUpcu0i8A jxL/HaVurJRq21AlzcyN+VvUm5cYHQkS3y22YmnGhztIFih5hM/gKxT0DNjcJXKKhW l2Z9QyoLPEOSC6DMF42QcliUw0JFFbKSz1DrSNtU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jaroslav Kysela , Takashi Iwai Subject: [PATCH 5.10 059/135] ALSA: pcm - fix mmap capability check for the snd-dummy driver Date: Tue, 10 Aug 2021 19:29:53 +0200 Message-Id: <20210810172957.689350133@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172955.660225700@linuxfoundation.org> References: <20210810172955.660225700@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jaroslav Kysela commit 852a8a97776a153be2e6c803218eced45f37a19c upstream. The snd-dummy driver (fake_buffer configuration) uses the ops->page callback for the mmap operations. Allow mmap for this case, too. Cc: Fixes: c4824ae7db41 ("ALSA: pcm: Fix mmap capability check") Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210730090254.612478-1-perex@perex.cz Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/core/pcm_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -246,7 +246,7 @@ static bool hw_support_mmap(struct snd_p if (!(substream->runtime->hw.info & SNDRV_PCM_INFO_MMAP)) return false; - if (substream->ops->mmap) + if (substream->ops->mmap || substream->ops->page) return true; switch (substream->dma_buffer.dev.type) {