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=-8.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 E9277C43141 for ; Wed, 13 Nov 2019 21:29:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE025206EF for ; Wed, 13 Nov 2019 21:29:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uY58BuYH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727044AbfKMV3t (ORCPT ); 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-Google-Smtp-Source: APXvYqy9XSFSBUmcN5u6GCN8pPVS5+DCHCUev3ISERx87mJ8d3APZRegPuspjAPxngMAq5PvUtPRHg== 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 + */ 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=-8.0 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 E1170C432C3 for ; Wed, 13 Nov 2019 21:30:51 +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 E8C80206ED for ; Wed, 13 Nov 2019 21:30:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="vA+kIT92"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uY58BuYH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E8C80206ED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 90EEC1612; Wed, 13 Nov 2019 22:29:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 90EEC1612 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1573680648; bh=b1rADQJjIqI0r/nUUzCkm0XmSeeeO9L8OTYtFbBje9k=; h=Date:From:To:References:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vA+kIT920WoPGdvy6zox1rzopCmXI4sZta0lUzmIZ4Bf428jqh5sDn+k7FT96Kk55 TMaWDks7c5NqYQ+czSMdGdPXkXdw7CuKZUj2y7BbD9Hc4wrNllnhNwN/n04fiV0eEX dwd9NPTbjAhlQsQCYXDOsPPwcnrJqleqJZ+abIlA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 063D8F80085; Wed, 13 Nov 2019 22:29:58 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 87D06F80086; Wed, 13 Nov 2019 22:29:55 +0100 (CET) Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) (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 37577F8007E for ; Wed, 13 Nov 2019 22:29:51 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 37577F8007E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uY58BuYH" Received: by mail-pf1-x441.google.com with SMTP id b19so2531556pfd.3 for ; Wed, 13 Nov 2019 13:29:51 -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=ZwW6s4xEzqTpc/1ZP7IMmUut95cQ4XAz0/TecGIE8kdSD8BA6m/dotnqy6oADXHRo7 iztq3kXuoDU2MpaJQt92GUdBsKBVaK2vDk5qhcCgIIdowqwyokgR6KmtiOzV6mLUVKlq 3GtURbdChy5W+gubwGQX0SkPyj+iFe9YjaEoJhJKzQGyNBvonOtHpUEvKjzghbowuaip /wf50p3lC39JcG0blaoWLdalCkXJMQPaaWS5mUahB40euSWVcuy/aVb755BtmvRlpAq9 THH1XhsYJQZwUYzAo+eD80w610e69IQp9ZLbhcRD3Ef3X2mnAdFjfh5JnFX5OzevrbrL GsGw== X-Gm-Message-State: APjAAAWR+h6M5oyFGtftxEPtylpREvQBBVK0ELgFhtqUfP4eM7FIgxS3 COWuuZvD4q/dVQ5aFAcqotw= X-Google-Smtp-Source: APXvYqy9XSFSBUmcN5u6GCN8pPVS5+DCHCUev3ISERx87mJ8d3APZRegPuspjAPxngMAq5PvUtPRHg== 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 Message-ID: <20191113212743.GA2844@Asurada-Nvidia.nvidia.com> References: <3c3e59ae7adde852f133a5d7c2cbb2730362fc53.1573462647.git.shengjiu.wang@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <3c3e59ae7adde852f133a5d7c2cbb2730362fc53.1573462647.git.shengjiu.wang@nxp.com> User-Agent: Mutt/1.9.4 (2018-02-28) Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, timur@kernel.org, Xiubo.Lee@gmail.com, linuxppc-dev@lists.ozlabs.org, tiwai@suse.com, lgirdwood@gmail.com, robh+dt@kernel.org, broonie@kernel.org, festevam@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [alsa-devel] [PATCH V3 2/2] ASoC: fsl_asrc: Add support for imx8qm 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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 + */ _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel 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=-7.8 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 7046BC432C3 for ; Wed, 13 Nov 2019 21:32:07 +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 30B4F206E3 for ; Wed, 13 Nov 2019 21:32:08 +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="uY58BuYH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30B4F206E3 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 lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47CyVr3zjQzF71X for ; Thu, 14 Nov 2019 08:32:04 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::443; helo=mail-pf1-x443.google.com; envelope-from=nicoleotsuka@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="uY58BuYH"; dkim-atps=neutral Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) (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 47CySJ3b7jzF6F1 for ; Thu, 14 Nov 2019 08:29:51 +1100 (AEDT) Received: by mail-pf1-x443.google.com with SMTP id x28so2521686pfo.6 for ; Wed, 13 Nov 2019 13:29:51 -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=kqDQYN1V7U9Mny2MpoXzV2pRm0kxELZCrlDsPxCPziPOun4jTCLFIuvlKgNTSWVZd6 y9HYhxe0IT74dBvMy9LVj72fbuXWVBW1cFJDHkGeb7WU5lsajhXEliP4mTwndRtJeoKb 1Suq6FX7QNkiVY7bOypCfnH6qrNem0qtA8WRz6ToK9g7u35dXdQdynZwdpsVziEGBZu9 GNJTZLyr7vzCLm+ATbOGNuiex0R37boz34iZxP3ugPXpGrwddpBpg3BVfc6Tfxby4vUJ sQ3QGCvLm5slEVbpHq5QreSPkFLdOJrIh/6KoAEhqmRiP+bhqjLvWoRiGUgTYJg6nvId Ignw== X-Gm-Message-State: APjAAAU5oSzLZ8u04ZeO78N1NewPb5Ndd/ThYmzesbVFrpqeSYeEQaBO QQLEfZPCZOrUAp+kqvp/y+E= X-Google-Smtp-Source: APXvYqy9XSFSBUmcN5u6GCN8pPVS5+DCHCUev3ISERx87mJ8d3APZRegPuspjAPxngMAq5PvUtPRHg== 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 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) 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: mark.rutland@arm.com, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, timur@kernel.org, Xiubo.Lee@gmail.com, linuxppc-dev@lists.ozlabs.org, tiwai@suse.com, lgirdwood@gmail.com, robh+dt@kernel.org, perex@perex.cz, broonie@kernel.org, festevam@gmail.com, linux-kernel@vger.kernel.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 + */