linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [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 1/3] ASoC: fsl_asrc: Move common definition to fsl_asrc_common Shengjiu Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ 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] 12+ messages in thread
* 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; 12+ messages in thread
From: S.j. Wang @ 2020-02-24  8:53 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: mark.rutland, devicetree, alsa-devel, timur, Xiubo.Lee,
	linuxppc-dev, tiwai, lgirdwood, robh+dt, perex, broonie,
	festevam, linux-kernel

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] 12+ messages in thread

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

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 1/3] ASoC: fsl_asrc: Move common definition to fsl_asrc_common Shengjiu Wang
2020-02-18  6:39 ` [PATCH v2 2/3] ASoC: dt-bindings: fsl_easrc: Add document for EASRC Shengjiu Wang
2020-02-18 22:54   ` Nicolin Chen
2020-02-19 20:37   ` Rob Herring
2020-02-26 12:31     ` 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
2020-02-24  8:53 S.j. Wang
2020-02-25  8:03 ` Nicolin Chen
2020-02-26  1:51   ` Shengjiu Wang
2020-02-26  2:55     ` 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).