On Wed, 16 Oct 2019 at 10:06, Maxime Ripard <[email protected]> wrote: > > Hi, > > On Wed, Oct 16, 2019 at 09:07:35AM +0200, [email protected] wrote: > > From: Marcus Cooper <[email protected]> > > > > Newer SoCs like the H6 have the channel offset bits in a different > > position to what is on the H3. As we will eventually add multi- > > channel support then create function calls as opposed to regmap > > fields to add support for different devices. > > > > Signed-off-by: Marcus Cooper <[email protected]> > > --- > > sound/soc/sunxi/sun4i-i2s.c | 31 +++++++++++++++++++++++++------ > > 1 file changed, 25 insertions(+), 6 deletions(-) > > > > diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c > > index f1a80973c450..875567881f30 100644 > > --- a/sound/soc/sunxi/sun4i-i2s.c > > +++ b/sound/soc/sunxi/sun4i-i2s.c > > @@ -157,6 +157,8 @@ struct sun4i_i2s_quirks { > > int (*set_chan_cfg)(const struct sun4i_i2s *, > > const struct snd_pcm_hw_params *); > > int (*set_fmt)(struct sun4i_i2s *, unsigned int); > > + void (*set_txchanoffset)(const struct sun4i_i2s *, int); > > + void (*set_rxchanoffset)(const struct sun4i_i2s *); > > The point of removing the regmap_field was that because having a > one-size-fits-all function with regmap_field sort of making the > abstraction was becoming more and more of a burden to maintain. > > Having functions for each and every register access is exactly the > same as using regmap_field here, and the issue we adressed is not with > regmap_fields in itself. > > If the H6 has a different register layout, then so be it, create a new > set_chan_cfg or set_fmt function for the H6. The H3 and the H6 have a similar register layout but the issue here is that sooner rather than later we would want to be supporting multi-channel audio which requires the offset to be applied to each TX channel channel select register(8chan PCM for HDMI requires 4 Tx channels). Currently we're only using one. BR, CK > > Maxime
-- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/CAEKpxBmuYe-kHpa4cvo6iabTM_qNro2hXVAkjioBZFt9N4pHdA%40mail.gmail.com.
