Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp685557ybf; Wed, 26 Feb 2020 21:10:52 -0800 (PST) X-Google-Smtp-Source: APXvYqxjVHprGtT1yyd4GWZi6SDIH5xlCQvDjN/CwY33Pyefo0dt9Hyow9xIfCUA9Qz+PBXB4mmu X-Received: by 2002:aca:a8c4:: with SMTP id r187mr1250238oie.105.1582780252189; Wed, 26 Feb 2020 21:10:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582780252; cv=none; d=google.com; s=arc-20160816; b=lUzREdShn1cr77m3o5FVLj58fyG4UhzPnItyslaFthGjTKNlT4VI85xNsLQdVu9fAA kYTj4kQFo0KN1ZcC8aQFccazE+w8pfYYnuAC8TEZ99UGfbCx6GbtAplipJlA3CR4M1Nb q6a9fmIa7VCHE3QPln138Em1vMHq9pKi3yz6RrLxyjXPsmCEK1UpMxrzdm9ENP5bCtuf VJ8BraX/503gwZMPJlhsF1jmdfLFmKVAdLrkgpFSWfKoGE07/FSgZn9/dogUmkilJFuG 6mTguyXQvkTreUpRFc07dHjy4y3uB/e9i9WEm5QO+jnZ5pZ5XhmzVThFkBzRlBqlflDE DOhg== 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=pivyxHSyqwryDPI9Gp60bBQcqgh4EowGAu7KJlQgz8E=; b=XIch46xc7z/ztMdCEoTpAYI+yqDW9hHQws5cCL/pozGVT5QEmlD5iHXMU97E31eFyW tviRvBygI0EVFkQ9Kph+GdHmJ0PvixCyAlVrFojnLxAIs7zURHToaNZB2SAg6CFpZQNr gVzwmEJd8lr6DBainJFa8DoriZIFQFKmgC4j6CoZazSAVr9BgAsl9SL2HkrGpIPclxrP E2fHhN1YVRRvp0IbeonPdtptR2J+s0kjK5Mrtv732wWwuHgEqo9sLy1PvmM5+7BdFZbR +LFXqDZGpYHZzwUp9WFC6XsoAp5oW0OUsV/B8MdWVagioQnU8QPthmWV731IR7buoRMf vObw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=H4jCUaLf; 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 t137si766438oif.61.2020.02.26.21.10.40; Wed, 26 Feb 2020 21:10:52 -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=H4jCUaLf; 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 S1725911AbgB0FKc (ORCPT + 99 others); Thu, 27 Feb 2020 00:10:32 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:46540 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725790AbgB0FKb (ORCPT ); Thu, 27 Feb 2020 00:10:31 -0500 Received: by mail-qt1-f195.google.com with SMTP id i14so1355795qtv.13; Wed, 26 Feb 2020 21:10:31 -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=pivyxHSyqwryDPI9Gp60bBQcqgh4EowGAu7KJlQgz8E=; b=H4jCUaLfJYUfLLqA3eJUJTu4b5XveFIshSWzC8Y9ln+QPHPxLUrzmrpESy/4akroJp Z1nDx07X+MlLtNHzVPHE0eRY5Ki3r78WV31qoXhY51kbpvG/tDwciXC480UedUkCVCLI CfSE9KcQk9zWNnCwGGaiXi0+XGAOA+cUPGSLF1Kl8WM911mYZ5WBeZjtQ4p7/trNAmiG lee0S5ks436Q82ah/K+yp4MxHyjN4E9/4sbSeYHC8ECGGPVvAIYYtbLsEKwL6P41B1Jg 5juA7vU9RxBBlarCdwpP1F6wZhIcVRvZZ8LOzUBwNwcutzQsS1no+Zbav7A+e8MY9XBO f9ig== 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=pivyxHSyqwryDPI9Gp60bBQcqgh4EowGAu7KJlQgz8E=; b=P+rfVjrCmQdv7CjsQC6DA6IBYdcYOYo3uZ59w2bV6YXx1hggcaM2T1IoLAP8eI+kCn HIQ69jISmeDCan93DqUuFNILyT6dYD+01s0dz4o/RAqfkwYloje15WfrqMxrUJIGS6tZ E1D+ue13+F5MWC2v5BsPLTWOWmEx0fceKtrHIuiwVzYuGt55r9MnJx0c48e6AMRrdTfO RkVcdUdVHWqKo9KFkMuMIuvp3KzVtdZC2hOwwJgYLN6BsbKmA3l7ssc02yN2SgNcf0Sb sHFX0Km4weYzUTE2oquvtJqOIKmOliEdjfInPpyUpfriZtZN/hQ5aE1KefP/8pkkOh+K 1hVA== X-Gm-Message-State: APjAAAUaSxgH5NG8UiziUsX1uUXWzje3RxWi0/UQxwzOmGdr5E47opUF NxSUkdvBH1H6LFDTM31rDG4udjb3SQoZM9Q4UKk= X-Received: by 2002:ac8:5298:: with SMTP id s24mr2831317qtn.54.1582780230751; Wed, 26 Feb 2020 21:10:30 -0800 (PST) MIME-Version: 1.0 References: <20200227034121.GA20540@Asurada-Nvidia.nvidia.com> In-Reply-To: <20200227034121.GA20540@Asurada-Nvidia.nvidia.com> From: Shengjiu Wang Date: Thu, 27 Feb 2020 13:10:19 +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 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 input the format from the dts. format involve the info about width. best regards wang shengjiu