linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V5 0/3] Support more sample rate in asrc
@ 2019-04-22  2:32 S.j. Wang
  2019-04-22  2:32 ` [PATCH V5 1/3] ASoC: fsl_asrc: Fix the issue about unsupported rate S.j. Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: S.j. Wang @ 2019-04-22  2:32 UTC (permalink / raw)
  To: timur@kernel.org, nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com,
	festevam@gmail.com, broonie@kernel.org,
	alsa-devel@alsa-project.org
  Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org

Support more sample rate in asrc

Shengjiu Wang (3):
  ASoC: fsl_asrc: Fix the issue about unsupported rate
  ASoC: fsl_asrc: replace the process_option table with function
  ASoC: fsl_asrc: Unify the supported input and output rate

Changes in v5
- fix the [1/24, 8]
- move fsl_asrc_sel_proc before setting

Changes in v4
- add patch to Fix the [8kHz, 30kHz] open set issue.

Changes in v3
- remove FSL_ASRC_RATES
- refine fsl_asrc_sel_proc according to comments

Changes in v2
- add more comments in code
- add commit "Unify the supported input and output rate"

 sound/soc/fsl/fsl_asrc.c | 104 +++++++++++++++++++++++++++++++----------------
 1 file changed, 70 insertions(+), 34 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: [PATCH V5 2/3] ASoC: fsl_asrc: replace the process_option table with function
@ 2019-04-22  3:15 S.j. Wang
  2019-04-22  3:23 ` Nicolin Chen
  0 siblings, 1 reply; 10+ messages in thread
From: S.j. Wang @ 2019-04-22  3:15 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: alsa-devel@alsa-project.org, timur@kernel.org,
	Xiubo.Lee@gmail.com, festevam@gmail.com,
	linux-kernel@vger.kernel.org, broonie@kernel.org,
	linuxppc-dev@lists.ozlabs.org

Hi

> 
> 
> On Mon, Apr 22, 2019 at 02:32:35AM +0000, S.j. Wang wrote:
> > When we want to support more sample rate, for example 12kHz/24kHz
> we
> > need update the process_option table, if we want to support more
> > sample rate next time, the table need to be updated again. which is
> > not flexible.
> >
> > We got a function fsl_asrc_sel_proc to replace the table, which can
> > give the pre-processing and post-processing options according to the
> > sample rate.
> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> 
> A couple of more small comments.
> 
> And please add this when you resend:
> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
> 
> > + * Unsupport cases: Tsout > 8.125 * Tsin, Tsout > 16.125 * Tsin
> 
> Since we have a ratio validation somewhere else, it's okay to drop this line -
> - it may confuse people since the function no longer checks these
> unsupported cases.

I add this for may be in the future we forget the limitation. Just for a reminder.

Best regards
Wang shengjiu
> 
> > +static int fsl_asrc_sel_proc(int inrate, int outrate,
> 
> I think "void" type should be just fine as we made sure there is no
> unsupported cases running in this function.

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: [PATCH V5 2/3] ASoC: fsl_asrc: replace the process_option table with function
@ 2019-04-22  3:34 S.j. Wang
  0 siblings, 0 replies; 10+ messages in thread
From: S.j. Wang @ 2019-04-22  3:34 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: alsa-devel@alsa-project.org, timur@kernel.org,
	Xiubo.Lee@gmail.com, festevam@gmail.com,
	linux-kernel@vger.kernel.org, broonie@kernel.org,
	linuxppc-dev@lists.ozlabs.org

Hi

> 
> 
> On Mon, Apr 22, 2019 at 03:15:34AM +0000, S.j. Wang wrote:
> > Hi
> >
> > >
> > >
> > > On Mon, Apr 22, 2019 at 02:32:35AM +0000, S.j. Wang wrote:
> > > > When we want to support more sample rate, for example
> 12kHz/24kHz
> > > we
> > > > need update the process_option table, if we want to support more
> > > > sample rate next time, the table need to be updated again. which
> > > > is not flexible.
> > > >
> > > > We got a function fsl_asrc_sel_proc to replace the table, which
> > > > can give the pre-processing and post-processing options according
> > > > to the sample rate.
> > > >
> > > > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > >
> > > A couple of more small comments.
> > >
> > > And please add this when you resend:
> > > Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
> > >
> > > > + * Unsupport cases: Tsout > 8.125 * Tsin, Tsout > 16.125 * Tsin
> > >
> > > Since we have a ratio validation somewhere else, it's okay to drop
> > > this line -
> > > - it may confuse people since the function no longer checks these
> > > unsupported cases.
> >
> > I add this for may be in the future we forget the limitation. Just for a
> reminder.
> 
> Okay. Let's use something more practical like:
> 
> +* Make sure to exclude following unsupported cases before calling the
> function:
> +* 1) outrate > 8.125 * inrate
> +* 2) outrate > 16.125 * inrate

Ok.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-04-22  3:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-22  2:32 [PATCH V5 0/3] Support more sample rate in asrc S.j. Wang
2019-04-22  2:32 ` [PATCH V5 1/3] ASoC: fsl_asrc: Fix the issue about unsupported rate S.j. Wang
2019-04-22  2:49   ` Nicolin Chen
2019-04-22  2:32 ` [PATCH V5 2/3] ASoC: fsl_asrc: replace the process_option table with function S.j. Wang
2019-04-22  2:57   ` Nicolin Chen
2019-04-22  2:32 ` [PATCH V5 3/3] ASoC: fsl_asrc: Unify the supported input and output rate S.j. Wang
2019-04-22  2:58   ` Nicolin Chen
  -- strict thread matches above, loose matches on Subject: below --
2019-04-22  3:15 [PATCH V5 2/3] ASoC: fsl_asrc: replace the process_option table with function S.j. Wang
2019-04-22  3:23 ` Nicolin Chen
2019-04-22  3:34 S.j. Wang

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).