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=-2.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 5E20EC28CBC for ; Wed, 6 May 2020 18:03:41 +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 DE09F20747 for ; Wed, 6 May 2020 18:03:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="sbOIMbDt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE09F20747 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com 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 3B4B61787; Wed, 6 May 2020 20:02:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3B4B61787 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1588788219; bh=pVpK8yYX3pH6yHHM6RwU150iHkc07wgVxC6sVr6+MMw=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=sbOIMbDtccv4tGSSCK9btswNu+RGGeB0T5qj6c0/vKu4xZvrujOmMhLGv+gFU+a2Z fRDIeq+Iyrr67FRpzb8quOvzVlNK/6mjPArh3+kKdY/rSu097YYjIU0llTVHEW5TtQ KNWxZAzxayzVL++31cI4HQ6B1rVUu0KpSSOiHHqw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C1184F80234; Wed, 6 May 2020 20:02:48 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4A0D7F80249; Wed, 6 May 2020 20:02:47 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 08E03F800DF for ; Wed, 6 May 2020 20:02:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 08E03F800DF IronPort-SDR: gPvD2iqB79OQI+u1PBNIdjN7IQKWJCC4ifrRx3/ZV9Ce35k10TszejeQzffi4Ztr9kayWm5OBI yLY3slHdbCwQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2020 11:02:39 -0700 IronPort-SDR: c7cY8iDB0BZai8MeFOQXAmakAM+4zvQ1VM4y+inxP9fK6WsKXfXgm8fu2sTX9qMljvok4SaALR gSIN03jQ2XEw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,360,1583222400"; d="scan'208";a="249835278" Received: from sbhat1-mobl.amr.corp.intel.com (HELO [10.251.3.11]) ([10.251.3.11]) by fmsmga007.fm.intel.com with ESMTP; 06 May 2020 11:02:38 -0700 Subject: Re: [PATCH 07/14] ASoC: amd: add acp3x pdm driver dma ops To: "Mukunda, Vijendar" , Alex Deucher , "alsa-devel@alsa-project.org" , "broonie@kernel.org" , "tiwai@suse.de" References: <20200505205327.642282-1-alexander.deucher@amd.com> <20200505205327.642282-8-alexander.deucher@amd.com> From: Pierre-Louis Bossart Message-ID: <13385ae5-eb6c-fa85-6177-3e7fbb39c35d@linux.intel.com> Date: Wed, 6 May 2020 13:02:37 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Cc: "Deucher, Alexander" 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" >>> +static const struct snd_pcm_hardware acp_pdm_hardware_capture = { >>> + .info = SNDRV_PCM_INFO_INTERLEAVED | >>> + SNDRV_PCM_INFO_BLOCK_TRANSFER | >>> + SNDRV_PCM_INFO_BATCH | SNDRV_PCM_INFO_MMAP | >>> + SNDRV_PCM_INFO_MMAP_VALID | >>> + SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME, >> >> Can you actually resume from the same position? this seems odd when >> combined with INFO_BATCH which means the position is only precise at >> period boundaries. >> > We used similar flag in Raven APU acp dma driver well. Takashi clarified during the early SOF days that if you cannot resume from the same position, then the ALSA core will attempt a prepare and restart. So if you don't support a restart from the same point, it's fine to remove this flag. > As per my understanding INFO_BATCH is more about providing period granularity when hw_ptr is queried. > But PDM driver DMA pointer callback returns precise hw_ptr when queried. > Correct me, if understanding is wrong. No, INFO_BATCH means the hw_ptr is only updated with a large granularity, possibly as large as a period. if you can support precise position you should not use this flag.