Re: [PATCH v2 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg

2021-02-22 Thread Mark Brown
On Thu, Feb 18, 2021 at 03:57:11PM +0800, Shengjiu Wang wrote: > Can I add a flag: > "rpmsg->mclk_streams & BIT(substream->stream)" > for avoiding multiple calls of hw_params function before enabling > clock? Yes, if you do local refcounting that'd avoid the issue. signature.asc Description:

Re: [PATCH v2 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg

2021-02-18 Thread Shengjiu Wang
On Wed, Feb 10, 2021 at 11:39 PM Mark Brown wrote: > > On Wed, Feb 10, 2021 at 02:35:29PM +0800, Shengjiu Wang wrote: > > On Wed, Feb 10, 2021 at 6:30 AM Mark Brown wrote: > > > > Like I say I'd actually recommend moving this control to DAPM. > > > I may understand your point, you suggest to use

Re: [PATCH v2 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg

2021-02-10 Thread Mark Brown
On Wed, Feb 10, 2021 at 02:35:29PM +0800, Shengjiu Wang wrote: > On Wed, Feb 10, 2021 at 6:30 AM Mark Brown wrote: > > Like I say I'd actually recommend moving this control to DAPM. > I may understand your point, you suggest to use the .set_bias_level > interface. But in my case I need to

Re: [PATCH v2 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg

2021-02-09 Thread Shengjiu Wang
On Wed, Feb 10, 2021 at 6:30 AM Mark Brown wrote: > > On Tue, Feb 09, 2021 at 05:16:16PM +0800, Shengjiu Wang wrote: > > On Mon, Feb 8, 2021 at 7:53 PM Mark Brown wrote: > > > > hw_params() can be called multiple times and there's no need for it to > > > be balanced with hw_free(), I'd move this

Re: [PATCH v2 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg

2021-02-09 Thread Mark Brown
On Tue, Feb 09, 2021 at 05:16:16PM +0800, Shengjiu Wang wrote: > On Mon, Feb 8, 2021 at 7:53 PM Mark Brown wrote: > > hw_params() can be called multiple times and there's no need for it to > > be balanced with hw_free(), I'd move this to a different callback (DAPM > > should work well). > Which

Re: [PATCH v2 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg

2021-02-09 Thread Shengjiu Wang
On Mon, Feb 8, 2021 at 7:53 PM Mark Brown wrote: > > On Sun, Feb 07, 2021 at 06:23:50PM +0800, Shengjiu Wang wrote: > > > +static int fsl_rpmsg_hw_params(struct snd_pcm_substream *substream, > > +struct snd_pcm_hw_params *params, > > +struct

Re: [PATCH v2 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg

2021-02-08 Thread Mark Brown
On Sun, Feb 07, 2021 at 06:23:50PM +0800, Shengjiu Wang wrote: > +static int fsl_rpmsg_hw_params(struct snd_pcm_substream *substream, > +struct snd_pcm_hw_params *params, > +struct snd_soc_dai *dai) > +{ ... > + ret =

[PATCH v2 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg

2021-02-07 Thread Shengjiu Wang
This is a cpu dai driver for rpmsg audio use case, which is mainly used for getting the user's configuration from devicetree and configure the clocks which is used by Cortex-M core. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/Kconfig | 7 ++ sound/soc/fsl/Makefile| 2 +