Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp201099ybe; Thu, 12 Sep 2019 18:21:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpIxPnCK7N4oqa8uH/xsDRWkFHkYCTpMHEHwn+hWeuAX83+lqQVvvjMBHWdosM68CS3JsQ X-Received: by 2002:a50:bb22:: with SMTP id y31mr46289392ede.58.1568337672988; Thu, 12 Sep 2019 18:21:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568337672; cv=none; d=google.com; s=arc-20160816; b=oXcAS1xSPJ6fhK6fTbvDVBne5GKzBl0J+VSAnB3rjHOb3HJWRxYvT79rflWJUU/lc5 Yt0vpfOF8Hp3Wr6eouYMXOTv3u3dm9eKyNsgm+VZi2O0AykDcA/5IYEeayw517ltTZbP ICnFUy0HdvarEdy1JX38g7pI2FE9FQsRPZypXg0iVJTZiZc7zkKyu6Aw9gjEOgfDNxUK C5IQ9M8hS1W6o7QHgM1jOnD3/HCGCM6YeJ24Wr5SVF7m3lyjoCmirbdAfSw7MnCL+xb0 gZavpHnnPwwgDCk7WYVsijwHfKTlmbnR7vS1LwFKKbhodMPwIArwQi+Qq2r5E/JiG0AE +sCw== 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=YmpY77tOjMlIBM+QNhtMQBjrqYVfrKFcyr6SgoPVdxU=; b=okE3nzqVIyu2g3Pe6sjCsVScD0/pbqGVHAfpskH8khN8JW/bUklCVei0/HAWNymnpM 3Oz0836klSLm3hbCD0Bfj2cL/QEuhcaw/tlqStY9serNcGlnQxvDtA1y978QNCrjvdFv 1v9eFbLzZwjhEqcKqvIDH7yyx/HcjzXspAblEKUV7nR730XXpduSalRQOutajdYOegZ2 DdlMZHkgt9xSv6avycHnGuZ4f8+O+cMmNfqNYr4W0LKNY6ByOuJhtMMzo/VMGf+IFA6L l+M2sryDdIXxzO86n7Zf2oMxr1yvU9Sa3W0PvzndvR5OPWHfyQawwC2uhAat65TbnP/E INag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mVclnYpU; 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 l21si13663781ejg.365.2019.09.12.18.20.50; Thu, 12 Sep 2019 18:21:12 -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=mVclnYpU; 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 S1727573AbfILXWA (ORCPT + 99 others); Thu, 12 Sep 2019 19:22:00 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:33400 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726032AbfILXV7 (ORCPT ); Thu, 12 Sep 2019 19:21:59 -0400 Received: by mail-pg1-f193.google.com with SMTP id n190so14275999pgn.0 for ; Thu, 12 Sep 2019 16:21:59 -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=YmpY77tOjMlIBM+QNhtMQBjrqYVfrKFcyr6SgoPVdxU=; b=mVclnYpUotNVMVlsDFEnMjm9huupDI5osneDwNjpz3DEn7odTq1c2j3DWotgaHFfiP RrjHJyXSDm+jOs+8PAS76MemG0ZSxEVKxiDuzMSVkqgGaPZ+rBRIRjAdsDKGdsqmDTtV 8Mt5Z3cBPNwe+5kJ6n1RslkClAwV6Wvjtx61BNTXpB7H7V+dtKgX9hc5up8a01GcBRgR 1aygXyMNnQwQU56EcGzPJFVX4neoPPoyr92ld2d0Hs2kf0jf9Y5L3RTNqCXiFkcC2qFv z/cuxBvO5uT+Jm8RnPJQe231C5TPgiAibBCNfbVu/wM4UTIERhf0rLgrHxYfKtOwmB2t 61+Q== 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=YmpY77tOjMlIBM+QNhtMQBjrqYVfrKFcyr6SgoPVdxU=; b=lwhpNUvDo2vMi2KmQm7ugQUdGx96nYLWikm34LWu2WuiGsA8i9CtmRjUb28Tn1bqah E9cXbMywYwlsDtMjLkBeLAJzkzEb+1pRUIiFvfs7yNQxwfbq8lhaDYzo9bed4qc7d0WJ t4sb9qkLFGz0aYikZbGarae9tnSySovd0GVw2HmwfUMzJCvLKPnCm5SXvIrDfYEjAoPn baP6CcqpsbJRDnJyZAI6JgtStj94s40iCgUFnqnogSHSa1EcE69iPWIz8CQARibfvwq+ hulOIzqxvJyyqz0mTsymoQX9H85A2QY8JonespGb/g17fTegP4dF321Bmsm1zD6iis2b LTiQ== X-Gm-Message-State: APjAAAWQiVFuuSSDIP2J76aveVMoiTdDOe0TBp6H8yLmYyV3hfxEqG+M 7UMwLDPLptwcYlK9RvI1w8o= X-Received: by 2002:a17:90a:e98e:: with SMTP id v14mr1337906pjy.101.1568330519125; Thu, 12 Sep 2019 16:21:59 -0700 (PDT) Received: from Asurada-Nvidia.nvidia.com (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id q204sm33758013pfc.11.2019.09.12.16.21.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Sep 2019 16:21:58 -0700 (PDT) Date: Thu, 12 Sep 2019 16:21:37 -0700 From: Nicolin Chen To: "S.j. 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" Subject: Re: [EXT] Re: [PATCH 1/3] ASoC: fsl_asrc: Use in(out)put_format instead of in(out)put_word_width Message-ID: <20190912232136.GC24937@Asurada-Nvidia.nvidia.com> References: <65e96ca15afd4a282b122f3ea8b13642cf4614c7.1568025083.git.shengjiu.wang@nxp.com> <20190909200156.GB10344@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 Tue, Sep 10, 2019 at 02:22:06AM +0000, S.j. Wang wrote: > Hi > > > > > On Mon, Sep 09, 2019 at 06:33:19PM -0400, Shengjiu Wang wrote: > > > snd_pcm_format_t is more formal than enum asrc_word_width, which > > has > > > two property, width and physical width, which is more accurate than > > > enum asrc_word_width. So it is better to use in(out)put_format instead > > > of in(out)put_word_width. > > > > Hmm...I don't really see the benefit of using snd_pcm_format_t here...I > > mean, I know it's a generic one, and would understand if we use it as a > > param for a common API. But this patch merely packs the "width" by > > intentionally using this snd_pcm_format_t and then adds another > > translation to unpack it.. I feel it's a bit overcomplicated. Or am I missing > > something? > > > > And I feel it's not necessary to use ALSA common format in our own "struct > > asrc_config" since it is more IP/register specific. > > > > Thanks > > Nicolin > > > > As you know, we have another M2M function internally, when user want to > Set the format through M2M API, it is better to use snd_pcm_format_t instead the > Width, for snd_pcm_format_t include two property, data with and physical width > In driver some place need data width, some place need physical width. > For example how to distinguish S24_LE and S24_3LE in driver, DMA setting needs > The physical width, but ASRC need data width. > > Another purpose is that we have another new designed ASRC, which support more > Formats, I would like it can share same API with this ASRC, using snd_pcm_format_t > That we can use the common API, like snd_pcm_format_linear, > snd_pcm_format_big_endian to get the property of the format, which is needed by > driver. I see. Just acked the patch.