Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2380028ybc; Wed, 13 Nov 2019 13:34:15 -0800 (PST) X-Google-Smtp-Source: APXvYqzAJJeq3Zi02qLc6QO4gvWsu8ufZr2eLxpIl8vzRVwmyvqqR/YIFDv05KxS4jeSqy9FOw6e X-Received: by 2002:a17:906:69d2:: with SMTP id g18mr4915914ejs.153.1573680855235; Wed, 13 Nov 2019 13:34:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573680855; cv=none; d=google.com; s=arc-20160816; b=lP4bsQj71S8n5O9j/GYgMMvUE/GclX1Zzmm72xdqTELj1Vj9bD08riLIi4XbL/WYcT dz0jhMd/HouViEXzSwjiQjQvbYNofhyWfGhmV6gee4moSVdB1orpgVqsT3L4RBzOcta+ 52yecwCHiWdPbWoVO3SaPRYIO4105CHCnCOmDuj8HhanMGtSq741fv+dHRh4Utp2h5WR PP+P3JeEc+MEuznjo6zve5hpmr9o0xp13blAXi0CXHnhKBs8G82FcNa4d5CVlzBPG4pi Tg39c+FlaeUJVQ02Ql+RFQM6uZyxpL1ZFgkdo5KyNJAKfOMxHiAKyqhykAap0/djt+pg ODyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=AVqWPleKaz31XmHuM5Ar+WLW3xPppIUP+VoAlnFtLBw=; b=tmFi/4UIVyQQlwdUqFvJuUW/Jn7OcDmHIs9+gWHfQMcQeCN7D8p93QgkN4QFQxVhIR Ygtoa/FmZKOb85lYJ4TjmMu8PTq7wIR4f1ylbckt2zhqlLQQc+9TggwghTh2T2LhGzlN Ic7CJOc6oMjwWVZdCKb24t2Vz6jtvqmXWgDBTVm+GUA1eKka2kUUZz/0QxzdTKpVD7e6 rpVhLYNzw1Xu+FhF1ru8AlI23gf5ZyDgFBB/ALRBdEaHfNIXDlTfkT/hwTWtQlaAljci msZPE4p18ZbGQOXSxg9HcdfHyub2lp7cxKWl2nORMHpszCiBC3meoj3v7qpkhtVPUZ9z OnrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uY58BuYH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z15si2378484edd.8.2019.11.13.13.33.50; Wed, 13 Nov 2019 13:34:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uY58BuYH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726988AbfKMV3t (ORCPT + 99 others); Wed, 13 Nov 2019 16:29:49 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:45686 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726162AbfKMV3t (ORCPT ); Wed, 13 Nov 2019 16:29:49 -0500 Received: by mail-pg1-f193.google.com with SMTP id k1so857780pgg.12; Wed, 13 Nov 2019 13:29:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=AVqWPleKaz31XmHuM5Ar+WLW3xPppIUP+VoAlnFtLBw=; b=uY58BuYHB8vwpNFQzLSanEitfWdr1sIaJEBa/ZXgEaCMCR0/3DKmOvMRfQsyzmihsX zZz40DxW/ddhUtb/HBbeBAJYAo76JfnZFs9RYhC70nS8EPxvsJ5hDWRyin8MiNeb4zpm CojDvqLC5OAcBUFlepvACs7RRLbJopc+6cp6LW93+YyquBehtxfcVF4F9CCJjEIBbaV0 pmgu6m/9du0C+uIHqW4LUs8TYM/tvVenFp//abs9ORws8Cu+D81AlGQ7glmA2iUMzoZW +UgL/36jDRb3kGLRMg54m5p+8ghrBjeDW7eBENqfxBZ+foBUi3PLtH0BGdp/SUf7Of+Z UxGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=AVqWPleKaz31XmHuM5Ar+WLW3xPppIUP+VoAlnFtLBw=; b=fxeHx37EzeRgRD4bEuiVGey8X+/2O2XNFwmXEiHK6M8ZsFyq1trycL5u+WbYxKqvxm 8DyD7DEbR5+Ze2xEezUnKfgYNmnUuThkc8Xu0TrOGH3stflIoxM4piFqz8BihqRIVwb8 RiCfreNh54Q61svQMvoukMVEPnEf1TiwVn0cQhcBuCDku/zCg034mFJKKrGU/lotUJm+ FVesnfk8A9/eFsykOPVi/VQrfBACvIlLmw/d6G2kapiwZVv2S5llNQtdyT/qnbkl3zxW g0G4/gimDFBajgoyQ57SjmPE5yWcvmo7iZ3t71561R0F7imbm134ePrLcm6ZzmLMbEnF u0XQ== X-Gm-Message-State: APjAAAXIazJXpZ5yJFoIbDX11Wjzv8P56a+kpWGarrcJEqh6fXmnYYsD wmN2lpfE3ofmYav/0O4vtWU= X-Received: by 2002:a63:535c:: with SMTP id t28mr6226419pgl.173.1573680588338; Wed, 13 Nov 2019 13:29:48 -0800 (PST) Received: from Asurada-Nvidia.nvidia.com (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id t12sm3519512pgv.45.2019.11.13.13.29.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Nov 2019 13:29:46 -0800 (PST) Date: Wed, 13 Nov 2019 13:27:44 -0800 From: Nicolin Chen To: Shengjiu Wang Cc: timur@kernel.org, Xiubo.Lee@gmail.com, festevam@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org Subject: Re: [PATCH V3 2/2] ASoC: fsl_asrc: Add support for imx8qm Message-ID: <20191113212743.GA2844@Asurada-Nvidia.nvidia.com> References: <3c3e59ae7adde852f133a5d7c2cbb2730362fc53.1573462647.git.shengjiu.wang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3c3e59ae7adde852f133a5d7c2cbb2730362fc53.1573462647.git.shengjiu.wang@nxp.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 11, 2019 at 05:18:23PM +0800, Shengjiu Wang wrote: > There are two asrc module in imx8qm, each module has different > clock configuration, and the DMA type is EDMA. > > So in this patch, we define the new clocks, refine the clock map, > and include struct fsl_asrc_soc_data for different soc usage. > > The EDMA channel is fixed with each dma request, one dma request > corresponding to one dma channel. So we need to request dma > channel with dma request of asrc module. > > Signed-off-by: Shengjiu Wang Two small comments inline. Once they are addressed, Acked-by: Nicolin Chen > --- > changes in v2 > - use !use_edma to wrap code in fsl_asrc_dma > - add Acked-by: Nicolin Chen > > changes in v3 > - remove the acked-by for commit is updated > - read "fsl,asrc-clk-map" property, and update table > clk_map_imx8qm. > > sound/soc/fsl/fsl_asrc.c | 112 ++++++++++++++++++++++++++++------- > sound/soc/fsl/fsl_asrc.h | 64 +++++++++++++++++++- > sound/soc/fsl/fsl_asrc_dma.c | 42 +++++++++---- > 3 files changed, 183 insertions(+), 35 deletions(-) > > diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c > index a3cfceea7d2f..03de33de8633 100644 > --- a/sound/soc/fsl/fsl_asrc.c > +++ b/sound/soc/fsl/fsl_asrc.c > @@ -964,14 +1001,33 @@ static int fsl_asrc_probe(struct platform_device *pdev) > + } else if (of_device_is_compatible(np, "fsl,imx8qm-asrc")) { > + ret = of_property_read_u32(np, "fsl,asrc-clk-map", > + &map_idx); This seems to fit a single line? > diff --git a/sound/soc/fsl/fsl_asrc_dma.c b/sound/soc/fsl/fsl_asrc_dma.c > index d6146de9acd2..f871fdb9d1c6 100644 > --- a/sound/soc/fsl/fsl_asrc_dma.c > +++ b/sound/soc/fsl/fsl_asrc_dma.c > @@ -197,21 +197,37 @@ static int fsl_asrc_dma_hw_params(struct snd_soc_component *component, > + /* > + * For EDMA DEV_TO_DEV channel, we don't need to configure > + * dma_request and dma_request2, we can get dma channel through > + * dma_request_slave_channel directly. > + * Compare with SDMA channel, EDMA channel is bound with dma > + * request event of each peripheral, and it is fixed. Not like SDMA, > + * the channel is allocated dynamically. So when DMA is EDMA, we > + * can only get EDMA channel through dma-names of Front-End device. > + */ Just trying to make it concise :) + /* + * An EDMA DEV_TO_DEV channel is fixed and bound with DMA event of each + * peripheral, unlike SDMA channel that is allocated dynamically. So no + * need to configure dma_request and dma_request2, but get dma_chan via + * dma_request_slave_channel directly with dma name of Front-End device + */