Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1376492ybf; Thu, 27 Feb 2020 09:47:06 -0800 (PST) X-Google-Smtp-Source: APXvYqzMHk3NquoJCq00jsfjth+IDlV5hoSrwANH/KrX4b8Yv3AiWAGCxWjIw5XvslCtE632fyKU X-Received: by 2002:aca:af97:: with SMTP id y145mr182479oie.24.1582825626509; Thu, 27 Feb 2020 09:47:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582825626; cv=none; d=google.com; s=arc-20160816; b=GdSUlgwmARmMCJ2DryhjsfiUBfui/wnnXK/oW43GydCOV3bvejX1T3ffg27A40L7St X/JK9yZUOLGRkWFnEV3uPeNvQbXFNRhwUCs+re/FJd2YDycoNKOooh41CZ576+P897Fx Eid7MNfqzZYTeDNWzFjUFEE9OMrcel4VBXAkNyFSRYcTUeg/e5OB25dYpHzezvOEr7gm 09uFdXR8MKVupbcK/4LW3U4+/4M6Xg1+gEtX4iLJK4he8VactAXcxfBVcCeRKbaE7Zus ZPFtXZ3isTuiZ7ytNOsMS4APMYOlAByRzEiuhHnBs1xrh6wj98LdUVStt8kRs5LiBcAZ r3sw== 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=aavjJ+Z/Os0zHnsfY4LhrQa/kjKKVPycfJnfRrQ9Zao=; b=bQMAAq8Hc92VeAGdB1naiEgiI1O/rq//4okJOmw9ts82TUYY0qV6SC5qeDGRKAp0uQ faE7iavAIDNSf8NTroLqboeXeu7amB0O8KAeUqfpVmL8hcOnBVxNe+jI6BbPwQmJunmZ 0H/Uk/MmMclflTmjIXlOsKUxUKQ/1mYmoMdk1cDe4Z9zlxWaHuD7vor2LjAedjDxLP1k sWle0XhtVZdyp+rel1a+tgwlGdYO5WDv3/2piIkavZc+0f8w28dIOdML9Pnpk+3RTHPU JYWvlrFdQpHP+WlhxZYJFP1669kB9/RLdCsg3ZSVY17o2hYSvzMLOg6B3zcwY+NByYKa OhRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WrLlidHp; 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 m5si2037516ote.187.2020.02.27.09.46.54; Thu, 27 Feb 2020 09:47:06 -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=WrLlidHp; 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 S1730489AbgB0Rpp (ORCPT + 99 others); Thu, 27 Feb 2020 12:45:45 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:36393 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729710AbgB0Rpo (ORCPT ); Thu, 27 Feb 2020 12:45:44 -0500 Received: by mail-pg1-f196.google.com with SMTP id d9so70479pgu.3; Thu, 27 Feb 2020 09:45:44 -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=aavjJ+Z/Os0zHnsfY4LhrQa/kjKKVPycfJnfRrQ9Zao=; b=WrLlidHpJQHENIo9YAPAEQekykxM5HD2YXi3IVdH2pDlg6yOsqQeAnBHuInus8IGYC T+Llicheka6t83Av1G7fnGQK8N8t/+ARqHcr7lEyinMjtYM47yBrjkl2uEcRsEZ4vjUz pAjZPbsFEKwx29NM8eVxoOKBbOhAa5Ss0rhJpdsluzAbqfyGiQnGG/Zp0NAiBrgbAbt0 jfF0riqJcV8+RHgdQPpeLHStGSeazOIOy4Dlp0oY3js8i23wr6q2uHDBiIWHOaJsg9t8 1ZOC6VPeEyYaQraK7qW+s5OLWdodWJnu6yrWH8xyJEc1DQGF4Yy9unxmzfeJW8N2YDjq /lIQ== 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=aavjJ+Z/Os0zHnsfY4LhrQa/kjKKVPycfJnfRrQ9Zao=; b=d5KvKt7BrH7gcLYsDCg9of86TNN4g2JAf/HnyiTMXCB8uswLlUqBLq1E4wSDptQKQ1 sspnlkxy3KdzSpsm4dVwhLDlLo16atWdXP74R9SCzzkXW4591SVk890vcaAUC5bQjOJo I2fHE/3ogFDDZ2jiSqu4K95yV8wDfZ32QYkH2y3oo3ig4fVxEBbTZ1TyF3HspInmEDCJ ew+heDh1tSNyCBMjljV9X57gTIlNLIr8NzgiXO67TmTSzsa0HA96FTNVok/j/HoQl3nD mnEeBBLNBEN6y8ELhXBBHozaf6ze/6GwZSaNRWjiyP1o4C///YHBtv6M8fWqFSstPiC+ aNLg== X-Gm-Message-State: APjAAAUH55cWVuSj9QbIGieqDRLpl/y9T7BDiyM+1XsyEigmKv7ewC7M ERw76zBLAwH5IfwZ+luslN0= X-Received: by 2002:a62:7c96:: with SMTP id x144mr114879pfc.7.1582825543344; Thu, 27 Feb 2020 09:45:43 -0800 (PST) Received: from Asurada-Nvidia.nvidia.com (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id m16sm7712623pfh.60.2020.02.27.09.45.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Feb 2020 09:45:43 -0800 (PST) Date: Thu, 27 Feb 2020 09:45:41 -0800 From: Nicolin Chen To: Shengjiu Wang 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 Subject: Re: [PATCH v3 1/4] ASoC: fsl_asrc: Change asrc_width to asrc_format Message-ID: <20200227174540.GA17040@Asurada-Nvidia.nvidia.com> References: <20200227034121.GA20540@Asurada-Nvidia.nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, 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?