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=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 8F6A1C48BCF for ; Sun, 13 Jun 2021 07:29:26 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 F0DCF611C0 for ; Sun, 13 Jun 2021 07:29:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F0DCF611C0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 82B201783; Sun, 13 Jun 2021 09:28:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 82B201783 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1623569363; bh=0PicZYSauKDurewGm0CjDBzpWBDQVZVO7XyQRcKTlIA=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FFpR6jZlRo0TvVCMDT0zU1hhOVxMP9NR89XTEnG6ATGtFapznJu8ZxVrotXk67MqI k0VLtBbLNaNUdWYTWR6W6NpF5ON0V0AsFQKoIPbNjWIC4wKc+0HEfDWfJ+hRAA+dZu M9IkzQDHHdv5Pce2YDCHH/qzlZ8HnIPhvpYyPVK0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2CF2FF800FB; Sun, 13 Jun 2021 09:28:33 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 23B06F80165; Sun, 13 Jun 2021 09:28:30 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7A6F8F800F8 for ; Sun, 13 Jun 2021 09:28:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7A6F8F800F8 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="AksiFy2f"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="3CLNriiW" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id B130821973; Sun, 13 Jun 2021 07:28:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1623569302; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NGMnOs6G0rE4IypkpoNtUX6r8Fe3PKJItzxICBHGmXc=; b=AksiFy2fwzHUQPXgl72HPpWj6G+nZq0PJ8VscLWq4WZwLKD+SNqq/oTD5UZBzRyflQvE9z 1DGc3YhF1kNmSN/5v8b/H2gTG06EEIAks7TpuXl6SJhS5TiVTbM98KnyOnkyTuz4Qy2y5z fXgoIl7F0wXiUxsmK5GjpS+jcOskGvg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1623569302; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NGMnOs6G0rE4IypkpoNtUX6r8Fe3PKJItzxICBHGmXc=; b=3CLNriiW7qURbvfj74LW7JFvyHE5q9TDih7TMQyq3x47AXvIlpLGCR2NhivHcxZC3/ayuF H7dnqVkb1VeXN3CA== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id A9A5FA3B89; Sun, 13 Jun 2021 07:28:22 +0000 (UTC) Date: Sun, 13 Jun 2021 09:28:22 +0200 Message-ID: From: Takashi Iwai To: Pierre-Louis Bossart Subject: Re: [PATCH 6/8] ALSA: pcm: conditionally avoid mmap of control data In-Reply-To: <20210610205326.1176400-7-pierre-louis.bossart@linux.intel.com> References: <20210610205326.1176400-1-pierre-louis.bossart@linux.intel.com> <20210610205326.1176400-7-pierre-louis.bossart@linux.intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: alsa-devel@alsa-project.org, broonie@kernel.org, Ranjani Sridharan , Kai Vehmanen X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Thu, 10 Jun 2021 22:53:24 +0200, Pierre-Louis Bossart wrote: > > In case of mmap, by default alsa-lib mmaps both control and status data. > > If driver subscribes for application pointer update, driver needs to get > notification whenever appl ptr changes. With the above case driver won't > get appl ptr notifications. > > This patch check on a hw info flag and returns error when user land asks > for mmaping control & status data, thus forcing user to issue > IOCTL_SYNC_PTR. > > This patch was originally submitted in 2017, c.f. > https://lore.kernel.org/alsa-devel/1494896518-23399-4-git-send-email-subhransu.s.prusty@intel.com/ > > Suggested-by: Takashi Iwai > Signed-off-by: Pierre-Louis Bossart > Reviewed-by: Kai Vehmanen > Reviewed-by: Ranjani Sridharan This kind of flag itself was what I also introduced for another purpose, too. There is a WIP patch that allows the use of non-coherent non-contiguous buffer pages, and this flag would fit for that. FWIW, the patch is found at https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/log/?h=topic/memalloc Takashi