Re: [PATCH v2 3/3] ASoC: fsl_easrc: Add EASRC ASoC CPU DAI and platform drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@xxxxxxx>
> > ---
> >  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





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux