Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp358210ybf; Thu, 27 Feb 2020 22:58:31 -0800 (PST) X-Google-Smtp-Source: APXvYqxggryEiWz6VWNd0Ol5GyfQKCIH2RYzRgibCSd2gBTQ/c8WP+7JhNkeNgV3E7zat/SWaAMD X-Received: by 2002:aca:4587:: with SMTP id s129mr2074996oia.124.1582873111134; Thu, 27 Feb 2020 22:58:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582873111; cv=none; d=google.com; s=arc-20160816; b=PXJdGAIQXVWYuIJ35UJ7ZOl0wdd6zdW0aqsGzdUJs+qaPJenSrvqDOLXfrk3C/EaHH vKpwjryeXItLzKCOlUeAqvPGFHuCSEH3Akl2kllt6iqsZh16tY9rI9Hk8CduZ575rrLT o4GDwSRandI3lL6qpiYz06RbPR/2+TaElXpUI6x8ghiOHuTO/5qOxou5Av3NL+WSQEoK 4+/iBQ395LRZBsmveeVGUW32qvYqmTbCwiKJmsnJYlg88TXcIhkgKyrimKmO2PvJjIZ8 jENOvhtJs82XnDSfizWGM0wU+HNnEQteo8QewY472Dv89ZAfCS0U7KgzANVjfyWyaSlV ZmTg== 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=y01M/2zdHCZcq/LUwDdnQfmblvhfbJOn2D+Py6njg7g=; b=bAN5zoIlIHedl5MB+R+aMmLHaFM5QUMxx5AYR6GKvq8Legti2MOg9Woa9pd4Z9L6c1 Eq/ogBu3weRmdsezIgNYyB4dtC9XOhKnjNtEZlK8V7khrgb62KJ/l6WVIWf+h3nlsi3C rLUOMp8H9O1xOLmIRiE8txTKzBPgx5erNvBxTeZN6G3/7Cwq/jbUzcu7EbHcLG14blC4 j4Jq3l3TdHPB6nmSmqmBZ6AQOaf+UdwWbjCVh5IQ754/hshYn+Qx7hl4xCPF1W5z6M7t hvY7tOnULkj06iVck56/8xy+hI68DnvT5XvTH/w/CJAUBidKy0gOrdWmgLTIHOCJB2Ue Oh0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZKbwFGtP; 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 c14si1104891otn.118.2020.02.27.22.58.19; Thu, 27 Feb 2020 22:58:31 -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=ZKbwFGtP; 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 S1726621AbgB1G47 (ORCPT + 99 others); Fri, 28 Feb 2020 01:56:59 -0500 Received: from mail-qv1-f65.google.com ([209.85.219.65]:36551 "EHLO mail-qv1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725870AbgB1G47 (ORCPT ); Fri, 28 Feb 2020 01:56:59 -0500 Received: by mail-qv1-f65.google.com with SMTP id ff2so894319qvb.3; Thu, 27 Feb 2020 22:56:59 -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=y01M/2zdHCZcq/LUwDdnQfmblvhfbJOn2D+Py6njg7g=; b=ZKbwFGtPtc2xfkSIQh1fpVq2oIEcHMYmuGCZgeHsYFzw6OrDBybr7dn68Ya6Haf12t 4vU4ZDPCwz/A8AuWJON2bqbmPVLFJP7BgcWM/moPEl4FAinQuPpI2DYx5geA/nHXcA/K GCDXCScmwy7+mQHcGNMyA+STiUkaz0BwlCl9ctxf18xxXTukTMCg1p3eTCbkojg8fo5k 0u0DUmmXRhcOvC2VPcUHs5w//ck4/LHiObI0OVIM6hCI1rX3b0oZ2yD65ima+PxeIIro tAlElbsYlY52UiaPrnpoIHCLHKFUAo6+jaGrKFymTy8slT8vP8vyeNYbNA2YVZRtN6c0 W2kw== 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=y01M/2zdHCZcq/LUwDdnQfmblvhfbJOn2D+Py6njg7g=; b=GWqdwJKc2S62x96WBWgD0O+Oimz6n4CBRqrjGSEpM0vZB6WCDtJ53jHpa1noXKTYto 0dKqaci7G5MyDwGQf4lPWtV+3tU7GSHSVSGDkI5qff4cBBznJFb+yrO515SUiDjhvrrG TLjAS/U01HikxZGo5ZGRMOu9Ju563NZASQh6ADiTifccHnJsEWz4ufGpHtjiPVaAu7B4 U4KpWCKSpPrX8r7gYngR2l2O4BRVFLGOLgULzTCom1MmLZRIedvuF9BWto6J7sk5vYzF oLZhrkF8H4EjuR2FI+D7vphfEpYr6FrsEK3/yFdEHd8Cmnk7gYE/KdAHWPGjQVwX87Fk YPYg== X-Gm-Message-State: APjAAAWgmuvpRcM3zV0/KDfzNOVae7WwLyAsWWUvpWDRC2O2lvSIzTON l1tExIChztX6cqgMmzSHfffeBTP7yKo/MMISlek= X-Received: by 2002:a05:6214:a46:: with SMTP id ee6mr2639365qvb.32.1582873018570; Thu, 27 Feb 2020 22:56:58 -0800 (PST) MIME-Version: 1.0 References: <20200227034121.GA20540@Asurada-Nvidia.nvidia.com> <20200227174540.GA17040@Asurada-Nvidia.nvidia.com> <20200228063958.GA473@NICOLINC-LT.nvidia.com> In-Reply-To: <20200228063958.GA473@NICOLINC-LT.nvidia.com> From: Shengjiu Wang Date: Fri, 28 Feb 2020 14:56:47 +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 On Fri, Feb 28, 2020 at 2:40 PM Nicolin Chen wrote: > > On Fri, Feb 28, 2020 at 10:54:02AM +0800, Shengjiu Wang wrote: > > 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 > > The thing is that fsl_easrc does the conversion too... It just > does in the probe instead of hw_params(), and then copies them > in the hw_params(). So I don't see obvious benefit by doing so. > > > 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 . > > I understood the reason here, but am not seeing the necessity, > at this point. > > > if we use the format in DT, then it is clear for usage in driver. > > I think this is the thing that we should address first. If we > have such a binding being added with the new fsl_easrc driver, > I'd love to see the old driver aligning with the new one. > > Otherwise, we can keep the old way, and change it when the new > binding is ready. ok, I will change the binding this time in next version. best regards wang shengjiu