linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2 3/3] ASoC: fsl_easrc: Add EASRC ASoC CPU DAI and platform drivers
@ 2020-02-24  8:53 S.j. Wang
  2020-02-25  8:03 ` Nicolin Chen
  0 siblings, 1 reply; 6+ messages in thread
From: S.j. Wang @ 2020-02-24  8:53 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
	alsa-devel@alsa-project.org, timur@kernel.org,
	Xiubo.Lee@gmail.com, linuxppc-dev@lists.ozlabs.org,
	tiwai@suse.com, lgirdwood@gmail.com, robh+dt@kernel.org,
	perex@perex.cz, broonie@kernel.org, festevam@gmail.com,
	linux-kernel@vger.kernel.org

Hi

> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > ---
> >  sound/soc/fsl/Kconfig           |   10 +
> >  sound/soc/fsl/Makefile          |    2 +
> >  sound/soc/fsl/fsl_asrc_common.h |    1 +
> >  sound/soc/fsl/fsl_easrc.c       | 2265 +++++++++++++++++++++++++++++++
> >  sound/soc/fsl/fsl_easrc.h       |  668 +++++++++
> >  sound/soc/fsl/fsl_easrc_dma.c   |  440 ++++++
> 
> I see a 90% similarity between fsl_asrc_dma and fsl_easrc_dma files.
> Would it be possible reuse the existing code? Could share structures from
> my point of view, just like it reuses "enum asrc_pair_index", I know
> differentiating "pair" and "context" is a big point here though.
> 
> A possible quick solution for that, off the top of my head, could be:
> 
> 1) in fsl_asrc_common.h
> 
>         struct fsl_asrc {
>                 ....
>         };
> 
>         struct fsl_asrc_pair {
>                 ....
>         };
> 
> 2) in fsl_easrc.h
> 
>         /* Renaming shared structures */
>         #define fsl_easrc fsl_asrc
>         #define fsl_easrc_context fsl_asrc_pair
> 
> May be a good idea to see if others have some opinion too.
> 

We need to modify the fsl_asrc and fsl_asrc_pair, let them
To be used by both driver,  also we need to put the specific
Definition for each module to same struct, right?

> 
> > +static const struct regmap_config fsl_easrc_regmap_config = {
> > +     .readable_reg = fsl_easrc_readable_reg,
> > +     .volatile_reg = fsl_easrc_volatile_reg,
> > +     .writeable_reg = fsl_easrc_writeable_reg,
> 
> Can we use regmap_range and regmap_access_table?
> 

Can the regmap_range support discontinuous registers?  The
reg_stride = 4.

Best regards
Wang shengjiu


^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH v2 0/3] Add new module driver for new ASRC
@ 2020-02-18  6:39 Shengjiu Wang
  2020-02-18  6:39 ` [PATCH v2 3/3] ASoC: fsl_easrc: Add EASRC ASoC CPU DAI and platform drivers Shengjiu Wang
  0 siblings, 1 reply; 6+ messages in thread
From: Shengjiu Wang @ 2020-02-18  6:39 UTC (permalink / raw)
  To: timur, nicoleotsuka, Xiubo.Lee, festevam, broonie, alsa-devel,
	lgirdwood, perex, tiwai, robh+dt, mark.rutland, devicetree
  Cc: linuxppc-dev, linux-kernel

Add new module driver for new ASRC in i.MX8MN.

Shengjiu Wang (3):
  ASoC: fsl_asrc: Move common definition to fsl_asrc_common
  ASoC: dt-bindings: fsl_easrc: Add document for EASRC
  ASoC: fsl_easrc: Add EASRC ASoC CPU DAI and platform drivers

changes in v2
- change i.MX815 to i.MX8MN
- Add changes in Kconfig and Makefile

 .../devicetree/bindings/sound/fsl,easrc.txt   |   57 +
 sound/soc/fsl/Kconfig                         |   10 +
 sound/soc/fsl/Makefile                        |    2 +
 sound/soc/fsl/fsl_asrc.h                      |   11 +-
 sound/soc/fsl/fsl_asrc_common.h               |   22 +
 sound/soc/fsl/fsl_easrc.c                     | 2265 +++++++++++++++++
 sound/soc/fsl/fsl_easrc.h                     |  668 +++++
 sound/soc/fsl/fsl_easrc_dma.c                 |  440 ++++
 8 files changed, 3465 insertions(+), 10 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/fsl,easrc.txt
 create mode 100644 sound/soc/fsl/fsl_asrc_common.h
 create mode 100644 sound/soc/fsl/fsl_easrc.c
 create mode 100644 sound/soc/fsl/fsl_easrc.h
 create mode 100644 sound/soc/fsl/fsl_easrc_dma.c

-- 
2.21.0


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

end of thread, other threads:[~2020-02-26  2:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-24  8:53 [PATCH v2 3/3] ASoC: fsl_easrc: Add EASRC ASoC CPU DAI and platform drivers S.j. Wang
2020-02-25  8:03 ` Nicolin Chen
2020-02-26  1:51   ` Shengjiu Wang
2020-02-26  2:55     ` Nicolin Chen
  -- strict thread matches above, loose matches on Subject: below --
2020-02-18  6:39 [PATCH v2 0/3] Add new module driver for new ASRC Shengjiu Wang
2020-02-18  6:39 ` [PATCH v2 3/3] ASoC: fsl_easrc: Add EASRC ASoC CPU DAI and platform drivers Shengjiu Wang
2020-02-19  1:09   ` Nicolin Chen

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