Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp186076ybf; Thu, 27 Feb 2020 18:54:49 -0800 (PST) X-Google-Smtp-Source: APXvYqwE/t0AKfW4XAUcO0A1uPXJzQXG03rKY+h89vvA5zXTpQKrtK4F7HukZvcfEHT7TP2UryaS X-Received: by 2002:a9d:784b:: with SMTP id c11mr1536510otm.246.1582858489348; Thu, 27 Feb 2020 18:54:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582858489; cv=none; d=google.com; s=arc-20160816; b=LAdmQAwDe0BvKgyCOdswiHHqUKGAnTNAqPqFQZ5fmYha/aG6C/epyv9OoHLdDXIr+Z Z5W6mx2x2mdnLD0Mr8NkzcBxzcr2dQ2YUNXfNW59XFec1KqTsjEqafGVz6hDLAfc60ln +7a3LBaA71aNjGGxzTL4AxovSR/0doVXlxhOzmftYWKS1NGevD8HFCTKyfByuA/yErxu ISFBPFYWYrsaWWR822e/eYsI+a/J5tRU66eYwq9ZS0TggA2w+mbxZwRA8AEPmCw0gQd1 Zu578jFFiz050tnkM3rXcfahy+RVheFSWb9Q7y/gV5K2UfTBnXdr9Fi0qDHzQdzW4ujq FAyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=22hz3EXYq0SzN1Wu2fonmhGKwST6HFX0P3UPEDmpwXo=; b=qTMvCWYTPyT4yXC4wbJmMUnhGYtOcBHZVhiLr0lspxmGUUH9PdBqeor15h5hUo4Jx2 Yhl3KmLs9dTSDAPfVg6OfrZaV8piWMVVWTkdtxxae/FQD/kOHDlhQxNQYZZ/tNwA7l9i EHHAES7V/dyv3rKl5I4JWHsJLxvyorqD5OTyALymeLt21thhWY1hdvX+Vp06ilHwMQkN EBNBbDPw3F0HJAUm0JaFQZI9FuuEhaUvG20oib+6GtivqpBsI2+DvweyxzpTyaF1mVa2 3pvMcH1MLSWEqf2Btq7xM5RVSs1CCKV+spf9elPVLTFw3AVaqR9ZAK9SrI3W8zshsxGg 8wCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TBD1vGhu; 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 h7si703352otm.165.2020.02.27.18.54.37; Thu, 27 Feb 2020 18:54:49 -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=TBD1vGhu; 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 S1730603AbgB1CyP (ORCPT + 99 others); Thu, 27 Feb 2020 21:54:15 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:41666 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726943AbgB1CyO (ORCPT ); Thu, 27 Feb 2020 21:54:14 -0500 Received: by mail-qt1-f195.google.com with SMTP id l21so1013145qtr.8; Thu, 27 Feb 2020 18:54:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=22hz3EXYq0SzN1Wu2fonmhGKwST6HFX0P3UPEDmpwXo=; b=TBD1vGhuloKu8RtFPWQxFgHHziYiJYOdde1353qzy2LmcoeF0TiDjDX1vZWq4i+I1G PxOGEuwdm3jskEG8pUt/6K0JSYZJ0j+CUnc9p9tBIyyk6ljb/P7YZkENFlOKudEIAHIz lYZu3V4cVEiJhkcItpRev2T8F2Xv+xbwvQMzSApqjce7q0xJzmAlfnCRx7iznMqtFpMw D9hPjaUJnzrxXvBACyVYK5QgZxg449iJK2ULaQ3hg4IfAgfp2YuQsaC0pP09+/AMME+N e7XkK8nJFvXHADovHj3sQyLpUp4qgFKouUF/Xr15HR9gMjka5EcBntqIZbCRQm7aoS9P Mm+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=22hz3EXYq0SzN1Wu2fonmhGKwST6HFX0P3UPEDmpwXo=; b=DgQl2P/yX/tamwH2Mjm/3dxMArx2aAV/QCXI1dgjXEMfg/vp+CrM2nWYcp2t0Vhdzp K+6eF9VAchaF9Leub1ImGrGMNwdo6SjqF6TAxesYoYgT8IMWZr2SnlJzqKn84a/2tRE5 4xS5RJKKkWCyB9gXSy8BXNK1HFvAp7jXdSPad76j2KxxwBIaUH0geu0YKyhEvT8H5InD TY7U5ZSC1itwWw5F2pOMi/j4BqWbMYBq0awODF9hJxEZ5jDLfi86CSKaz9TNuElN2LIK deEiPun7oKDPW75FcV6WM0i8CF407VmKBjVf2q4BprXYSoa4j3XfteeBUr1zdCJJyHR8 iS/A== X-Gm-Message-State: APjAAAWom6DIhIXuD3zbAP02xCHmJBVRgCW0NwSvRRiqJzfRKgD1TGs9 fC1fLHleS4/MfPuRGgExEKWC4/8S92cAvBbKv2HXjR3B X-Received: by 2002:ac8:7b45:: with SMTP id m5mr2482318qtu.360.1582858453803; Thu, 27 Feb 2020 18:54:13 -0800 (PST) MIME-Version: 1.0 References: <20200227034121.GA20540@Asurada-Nvidia.nvidia.com> <20200227174540.GA17040@Asurada-Nvidia.nvidia.com> In-Reply-To: <20200227174540.GA17040@Asurada-Nvidia.nvidia.com> From: Shengjiu Wang Date: Fri, 28 Feb 2020 10:54:02 +0800 Message-ID: Subject: Re: [PATCH v3 1/4] ASoC: fsl_asrc: Change asrc_width to asrc_format To: Nicolin Chen Cc: Shengjiu Wang , Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux-ALSA , Timur Tabi , Xiubo Li , linuxppc-dev@lists.ozlabs.org, Takashi Iwai , Liam Girdwood , Rob Herring , Mark Brown , Fabio Estevam , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi On Fri, Feb 28, 2020 at 1:45 AM Nicolin Chen wrote: > > On Thu, Feb 27, 2020 at 01:10:19PM +0800, Shengjiu Wang wrote: > > On Thu, Feb 27, 2020 at 11:43 AM Nicolin Chen wrote: > > > > > > On Thu, Feb 27, 2020 at 10:41:55AM +0800, Shengjiu Wang wrote: > > > > asrc_format is more inteligent variable, which is align > > > > with the alsa definition snd_pcm_format_t. > > > > > > > > Signed-off-by: Shengjiu Wang > > > > --- > > > > sound/soc/fsl/fsl_asrc.c | 23 +++++++++++------------ > > > > sound/soc/fsl/fsl_asrc.h | 4 ++-- > > > > sound/soc/fsl/fsl_asrc_dma.c | 2 +- > > > > 3 files changed, 14 insertions(+), 15 deletions(-) > > > > > > > > diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c > > > > index 0dcebc24c312..2b6a1643573c 100644 > > > > --- a/sound/soc/fsl/fsl_asrc.c > > > > +++ b/sound/soc/fsl/fsl_asrc.c > > > > > > > @@ -600,11 +599,6 @@ static int fsl_asrc_dai_hw_params(struct snd_pcm_substream *substream, > > > > > > > > pair->config = &config; > > > > > > > > - if (asrc_priv->asrc_width == 16) > > > > - format = SNDRV_PCM_FORMAT_S16_LE; > > > > - else > > > > - format = SNDRV_PCM_FORMAT_S24_LE; > > > > > > It feels better to me that we have format settings in hw_params(). > > > > > > Why not let fsl_easrc align with this? Any reason that I'm missing? > > > > because the asrc_width is not formal, in the future we can direct > > Hmm..that's our DT binding. And I don't feel it is a problem > to be ASoC irrelative. > > > input the format from the dts. format involve the info about width. > > Is there such any formal ASoC binding? I don't see those PCM > formats under include/dt-bindings/ folder. How are we going > to involve those formats in DT? There is no formal binding of this case. I think it is not good to convert width to format, because, for example width = 24, there is two option, we can select format S24_LE, or format S24_3LE, width is ambiguous for selecting. In EASRC, it support other two 24bit format U24_LE, U24_3LE . if we use the format in DT, then it is clear for usage in driver. best regards wang shengjiu