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=-6.7 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 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 55BEDC3F2D0 for ; Fri, 28 Feb 2020 06:41:16 +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 D411A2469C for ; Fri, 28 Feb 2020 06:41:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="uwAZZ87G"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cUNucea0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D411A2469C 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 11A8916CB; Fri, 28 Feb 2020 07:40:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 11A8916CB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1582872074; bh=VzMNSRKzSlHvgQ8hCkTSHfhD+LYPhXJG5KlM2pzLjsk=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=uwAZZ87GJAeUowvzenxjJ7kR/ieeORXvdRg/tS6XGQUNiuJ0em4uwIcHTQ5c+/Teb X7h6FZquzKUND5EtEi/1ukp7HChqcM7v3Bu9BP0XS1QJXaJKLdYCrH09UbN64jsdfu VXJT6mIBpqdLvoe2sT1uMQ2Gyt+B8TCaoI8g0L3E= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 92D5FF8014D; Fri, 28 Feb 2020 07:40:23 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5BF78F8014E; Fri, 28 Feb 2020 07:40:21 +0100 (CET) Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) (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 5F1E7F80113 for ; Fri, 28 Feb 2020 07:40:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5F1E7F80113 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cUNucea0" Received: by mail-pf1-x442.google.com with SMTP id i6so1222114pfc.1 for ; Thu, 27 Feb 2020 22:40:17 -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; bh=6jLyDf7HA1xjI2cZ4/f5NFCTmMji2H18M6eJIfWLIio=; b=cUNucea0ep9rRh4qhvCRUETrPpzkdl6LG35PtOFQM5BNV+zzYrhbJIb+v/2enqZjlb wcq94TO7o1VPlARsPE9s2/bj5AyOkFq1DXyYl7IR/IkmkflhSFKnPeTYsncfw0Fv7VwJ C6MG8BNhaqckcKv7WktCQiR6NWeyo6abFbX9o6YCefEdTHq+SSOEK8wAcrO61oTRzrko nXMFkTTxJLRSPLMJ5MNQT2FTQAtLvZ+b0W5/EFeLsyDiC+xHHZ7hly4FOCftRgp3Tcsn npJDw3lRZco6at1H4Hn8nKv+YCvg8ACIHJM4TlVgo43hbvaWB4/HrkQHxOp2PCL7AC0r ufug== 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; bh=6jLyDf7HA1xjI2cZ4/f5NFCTmMji2H18M6eJIfWLIio=; b=VX2J4cSPFXfm/bJQAfN8D1Epfq62qSi/g9C6N/+DRM1iBaZppiw82L3R2dmu7MfjjX hXj+7Np+ppht+Tz80NNM14orQqtES+EzoiyrOnFgEFGD4sh5iVIIL+vx7EKsIzcK9rje Q5hV6sNuGVQd7kxGQVKyQHL6P5dNi0O77ckBFyUvcXLTDZevO8JAb5CMJZAEQzf0nNJ8 weiaRHZC/hor+HSv6MBlwZrxXBr+PV5Nhk55BumRIjMLWZLG9l4z3TaQZZS+5LpU1RZx dPEMBRVGzirGz6wDuwa5f9bNPMn79iUACKViaqawrVKTVPW9wrlEQUhPdEebH1RogVZy GYeQ== X-Gm-Message-State: APjAAAUmJMXJpHSRzhDpXvUgUSwSZil+ChsmwXZk3BDvY7OnlkIuqEdF vN2dx++W4VArSUjMw6TgDZg= X-Google-Smtp-Source: APXvYqw2E+Kw7R0gNcvM5/xBp+Mo7r/IZp42jhZvRCSqeJUpfX2x+jEWuRWEd+uGspE5Km1km0p/6Q== X-Received: by 2002:a63:82c6:: with SMTP id w189mr3010846pgd.357.1582872015725; Thu, 27 Feb 2020 22:40:15 -0800 (PST) Received: from NICOLINC-LT.nvidia.com (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id 13sm8609829pgo.13.2020.02.27.22.40.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 22:40:15 -0800 (PST) Date: Thu, 27 Feb 2020 22:40:09 -0800 From: Nicolin Chen To: Shengjiu Wang Subject: Re: [PATCH v3 1/4] ASoC: fsl_asrc: Change asrc_width to asrc_format Message-ID: <20200228063958.GA473@NICOLINC-LT.nvidia.com> References: <20200227034121.GA20540@Asurada-Nvidia.nvidia.com> <20200227174540.GA17040@Asurada-Nvidia.nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux-ALSA , Timur Tabi , Xiubo Li , Fabio Estevam , Shengjiu Wang , Takashi Iwai , Liam Girdwood , Rob Herring , Mark Brown , linuxppc-dev@lists.ozlabs.org, linux-kernel 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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.