From: Nicolin Chen <nicoleotsuka@gmail.com>
To: "S.j. Wang" <shengjiu.wang@nxp.com>
Cc: "timur@kernel.org" <timur@kernel.org>,
"Xiubo.Lee@gmail.com" <Xiubo.Lee@gmail.com>,
"festevam@gmail.com" <festevam@gmail.com>,
"broonie@kernel.org" <broonie@kernel.org>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V3 1/2] ASoC: fsl_asrc: replace the process_option table with function
Date: Wed, 17 Apr 2019 11:52:36 -0700 [thread overview]
Message-ID: <20190417185236.GC5073@Asurada-Nvidia.nvidia.com> (raw)
In-Reply-To: <1eaeb882bdd69108c8ce897398c5c36ece6d49c5.1555491598.git.shengjiu.wang@nxp.com>
Hi Shengjiu,
This looks better. Just a couple of more small comments inline.
On Wed, Apr 17, 2019 at 09:06:18AM +0000, S.j. Wang wrote:
> +static int fsl_asrc_sel_proc(int inrate, int outrate, int *pre_proc,
> + int *post_proc)
Just a nit: it looks better by grouping them two-two.
static int fsl_asrc_sel_proc(int inrate, int outrate,
int *pre_proc, int *post_proc)
> + /* Condition for selection of post-processing */
> + post_proc_cond2 = (inrate * 15 > outrate * 16 && outrate < 56000) ||
> + (inrate > 56000 && outrate < 56000);
Could align the indentation:
post_proc_cond2 = (inrate * 15 > outrate * 16 && outrate < 56000) ||
(inrate > 56000 && outrate < 56000);
Here:
> + /* Does not support cases: Tsout > 8.125 * Tsin */
> + if (inrate * 8 > 65 * outrate)
> + return -EINVAL;
And here:
> + ret = fsl_asrc_sel_proc(inrate, outrate, &pre_proc, &post_proc);
> + if (ret) {
> + pair_err("No supported pre-processing options\n");
> + return ret;
> + }
Instead of a general message, I was thinking of a more specific
one by telling users that the ratio between the two rates isn't
supported -- something similar to what I suggested previously:
pair_err("Does not support %d (input) > 8.125 * %d (output)\n",
outrate, inrate);
Thanks
Nicolin
next prev parent reply other threads:[~2019-04-17 18:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-17 9:06 [PATCH V3 0/2] Support more sample rate in asrc S.j. Wang
2019-04-17 9:06 ` [PATCH V3 1/2] ASoC: fsl_asrc: replace the process_option table with function S.j. Wang
2019-04-17 18:52 ` Nicolin Chen [this message]
2019-04-17 9:06 ` [PATCH V3 2/2] ASoC: fsl_asrc: Unify the supported input and output rate S.j. Wang
2019-04-18 2:37 [PATCH V3 1/2] ASoC: fsl_asrc: replace the process_option table with function S.j. Wang
2019-04-18 8:03 ` Nicolin Chen
2019-04-18 8:50 S.j. Wang
2019-04-18 9:05 ` Nicolin Chen
2019-04-18 9:37 S.j. Wang
2019-04-18 19:17 ` Nicolin Chen
2019-04-19 10:21 S.j. Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190417185236.GC5073@Asurada-Nvidia.nvidia.com \
--to=nicoleotsuka@gmail.com \
--cc=Xiubo.Lee@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=shengjiu.wang@nxp.com \
--cc=timur@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).