Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp1798704ybj; Sun, 22 Sep 2019 12:10:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqyk/cOmtB1Tg2Zo5NtIeu1tu5qQBI4ENPrrCcnEZ6cR3IVhsY5pXvhdKfKb030G7PadDBpF X-Received: by 2002:a50:886d:: with SMTP id c42mr33121565edc.24.1569179416689; Sun, 22 Sep 2019 12:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569179416; cv=none; d=google.com; s=arc-20160816; b=urgJmxXbyzfli/0Q8Lq708im8485794fnDUmvnbiKuuUxxnMGFXWvSZjhxDRMOr9vW W9UjcOTDiX2Y28sIaLk783ol7iG+baIsV/gkunFtRff0jwJ/thteaA01CvJZE5nzJQUw 1ec9xovoXE5BGgdeVyY7Zb4vSwLk6m+DYx20tcDLXQa5KvXvqkBH8BxfCE10LzqztNE2 kOVdqjVJvWlQBjqGvrCxs5D/a4zO0UZk5hRhGuthO08iz6E1y/pxR+HB510GnODs9y7f YvS7KIQis0Gvfc63ILt7XuS+k9FRt+YG9tjkG4UoAZnSra95npUqqo64ppfkN0HMv2SK mh1Q== 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=0P3XLXQhDOk6yT8L9UZqipY6hQ6gvzDoPp4owKec9vk=; b=Qoc0LirdorO9KBunUBhKb1IH3XZbXcffWL3cFlh6CyYu4Ke2RSw74f2xfJTgYwG345 JAb2g14iUZZm5of8GPijVGn0/qAW/C6LWu50rHwwZCo0IJAyhWUfGv6Arxjbipn8tLnA UKzLK6dw3aKfPPyKunaAAB3wRfm7ra7DYKHnCyho664FnGy++6Ne/NuM0JF++0CQnCqX L/M0KBYs56t7+HQDt94fMcBfIMfN6/JcMNsf5HunEh9BchIQbzEyUO75GnztCRX2ZZL/ BwqsIF5c9dLQiDOlR8JwUhVWlyCkCcvJytZDO/PEeL4mlDJOmGvMUDfQkFAunMTN7yIQ 1vbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XxpsH7YC; 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 by16si4976316edb.30.2019.09.22.12.09.53; Sun, 22 Sep 2019 12:10:16 -0700 (PDT) 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=XxpsH7YC; 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 S2406703AbfITWvt (ORCPT + 99 others); Fri, 20 Sep 2019 18:51:49 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:37177 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406570AbfITWvs (ORCPT ); Fri, 20 Sep 2019 18:51:48 -0400 Received: by mail-pl1-f195.google.com with SMTP id b10so3860265plr.4; Fri, 20 Sep 2019 15:51:48 -0700 (PDT) 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=0P3XLXQhDOk6yT8L9UZqipY6hQ6gvzDoPp4owKec9vk=; b=XxpsH7YCa/PUyweMsFxZ83TPOyD0WUZjPit3c8pITmQgtwko6irwDaxc9pADFQztvC 4U90FTq1tsr90gbU3BH0dXMjgwrxN9irMCPTc5p97PU3oec9/cqWzdg6C2yhY/HsfNln aScdV6JxcUYSWR5y5Hv9upvbjhCmXfYVsD9tu4NY5ITzk7+s1hqedARflggKmV1Dur7v fiOu8/6RUGHJEhmjdorBPStTRSD4Ln8RO9iV39xPXYgVi3HpcU5c3nwZPcYP/tfnsq7x oh49U2WdVkdA819mAvnTSbQQg3Gu+tax53st1QAbHmpdvq4sxTse2UtHV/IylCvTkm9n Q3vw== 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=0P3XLXQhDOk6yT8L9UZqipY6hQ6gvzDoPp4owKec9vk=; b=mNivWr3hPxn9ZEYMye0BafcMw2KmUWGF1X96XFjbhNe0BuTh5TXOpwtq2VYivcGSb8 LbneMsikX5qjRU5QdJMl+boupADVgKqG6zezefGs9VDUDSQh74obVVoQU3YX/tf26qOu DxNhnBN7XcSt2RC4a2/PqjqOJKYgYywSDbDfJCcDWdE3yBPXDcRi9ZZBwJe5Jcc3xHZf ccFogUhmUYTkKQwWkdJCQtPuL8J/cGfnQqMbSZ0W57TO7Rb8VYxpc5I8B4AUX9v0b7wJ xsFhJ/UqimlNal1dUMH4s8GjpjmXRERYtXKNotVoA1cJW46DeHoUq3HT19fl1GkvivyP Dcrw== X-Gm-Message-State: APjAAAW4yH/iOttwx3D/bzpxTvuCPmuIMghK/4fyBxc6lYj5beCbO2ZX zvW3bgzBvrNK2Qn4Jv9cTHc= X-Received: by 2002:a17:902:fe91:: with SMTP id x17mr19665279plm.106.1569019907795; Fri, 20 Sep 2019 15:51:47 -0700 (PDT) Received: from Asurada-Nvidia.nvidia.com (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id g24sm2039646pfi.81.2019.09.20.15.51.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Sep 2019 15:51:47 -0700 (PDT) Date: Fri, 20 Sep 2019 15:50:58 -0700 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, lars@metafoo.de Subject: Re: [PATCH V3 3/4] ASoC: pcm_dmaengine: Extract snd_dmaengine_pcm_refine_runtime_hwparams Message-ID: <20190920225055.GB21389@Asurada-Nvidia.nvidia.com> References: <57e3bda7b94fecf94d17f2eacf1c6beebcac74ff.1568861098.git.shengjiu.wang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57e3bda7b94fecf94d17f2eacf1c6beebcac74ff.1568861098.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 Thu, Sep 19, 2019 at 08:11:41PM +0800, Shengjiu Wang wrote: > When set the runtime hardware parameters, we may need to query > the capability of DMA to complete the parameters. > > This patch is to Extract this operation from > dmaengine_pcm_set_runtime_hwparams function to a separate function > snd_dmaengine_pcm_refine_runtime_hwparams, that other components > which need this feature can call this function. > > Signed-off-by: Shengjiu Wang > @@ -145,58 +140,15 @@ static int dmaengine_pcm_set_runtime_hwparams(struct snd_pcm_substream *substrea > + ret = snd_dmaengine_pcm_refine_runtime_hwparams(substream, > + dma_data, > + &hw, > + chan); > + if (ret) > + return ret; > > return snd_soc_set_runtime_hwparams(substream, &hw); > + > } Just a nit, why add a line here? :) The rest looks good to me, not sure whether the name "refine" would be the best one though, would like to wait for opinions from others. Thanks