public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Nicolin Chen <nicoleotsuka@gmail•com>
To: "S.j. Wang" <shengjiu.wang@nxp•com>
Cc: "alsa-devel@alsa-project•org" <alsa-devel@alsa-project•org>,
	"timur@kernel•org" <timur@kernel•org>,
	"Xiubo.Lee@gmail•com" <Xiubo.Lee@gmail•com>,
	"festevam@gmail•com" <festevam@gmail•com>,
	"linux-kernel@vger•kernel.org" <linux-kernel@vger•kernel.org>,
	"broonie@kernel•org" <broonie@kernel•org>,
	"linuxppc-dev@lists•ozlabs.org" <linuxppc-dev@lists•ozlabs.org>
Subject: Re: [PATCH V3 1/2] ASoC: fsl_asrc: replace the process_option table with function
Date: Thu, 18 Apr 2019 02:05:35 -0700	[thread overview]
Message-ID: <20190418090534.GB4028@Asurada> (raw)
In-Reply-To: <VE1PR04MB647965FEAF3506E1775397AEE3260@VE1PR04MB6479.eurprd04.prod.outlook.com>

On Thu, Apr 18, 2019 at 08:50:48AM +0000, S.j. Wang wrote:
> > And this is according to IMX6DQRM:
> >     Limited support for the case when output sampling rates is
> >     between 8kHz and 30kHz. The limitation is the supported ratio
> >     (Fsin/Fsout) range as between 1/24 to 8
> > 
> > This should cover your 8.125 condition already, even if having an outrate
> > range between [8KHz, 30KHz] check, since an outrate above 30KHz will not
> > have an inrate bigger than 8.125 times of it, given the maximum input rate
> > is 192KHz.
> > 
> > So I think that we can just drop that 8.125 condition from your change and
> > there's no need to error out any more.
> > 
> No, if outrate=8kHz,  inrate > 88.2kHz, these cases are not supported. 
> This is not covered by
> 
>         if ((outrate > 8000 && outrate < 30000) &&
>             (outrate/inrate > 24 || inrate/outrate > 8)) {

Good catch. The range should be [8KHz, 30KHz] vs. (8KHz, 32KHz)
in the code. Then I think the fix should be at both lines:

-         if ((outrate > 8000 && outrate < 30000) &&
-             (outrate/inrate > 24 || inrate/outrate > 8)) {
+         if ((outrate >= 8000 && outrate =< 30000) &&
+             (outrate > 24 * inrate || inrate > 8 * outrate)) {

Overall, I think we should fix this instead of adding an extra
one, since it is very likely saying the same thing.

  reply	other threads:[~2019-04-18  9:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-18  8:50 [PATCH V3 1/2] ASoC: fsl_asrc: replace the process_option table with function S.j. Wang
2019-04-18  9:05 ` Nicolin Chen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-04-19 10:21 S.j. Wang
2019-04-18  9:37 S.j. Wang
2019-04-18 19:17 ` Nicolin Chen
2019-04-18  2:37 S.j. Wang
2019-04-18  8:03 ` Nicolin Chen
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

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=20190418090534.GB4028@Asurada \
    --to=nicoleotsuka@gmail$(echo .)com \
    --cc=Xiubo.Lee@gmail$(echo .)com \
    --cc=alsa-devel@alsa-project$(echo .)org \
    --cc=broonie@kernel$(echo .)org \
    --cc=festevam@gmail$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=shengjiu.wang@nxp$(echo .)com \
    --cc=timur@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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