On Sat, Aug 19, 2017 at 8:48 PM, <codekipper@xxxxxxxxx> wrote: > From: Marcus Cooper <codekipper@xxxxxxxxx> > > On the original i2s block the channel mapping and selection were > configured for stereo audio by default: This is not the case with > the newer SoCs and they are also located at different offsets. > > To support the newer SoC then regmap fields have been added to the > quirks and these are initialised to their correct settings during > probing. > > Signed-off-by: Marcus Cooper <codekipper@xxxxxxxxx> > Reviewed-by: Chen-Yu Tsai <wens@xxxxxxxx> Reviewed-by still stands. > --- > sound/soc/sunxi/sun4i-i2s.c | 77 ++++++++++++++++++++++++++++++++++++++++----- > 1 file changed, 69 insertions(+), 8 deletions(-) > > diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c [...] > +static int sun4i_i2s_init_regmap_fields(struct device *dev, > + struct sun4i_i2s *i2s) > +{ > + i2s->field_txchanmap = > + devm_regmap_field_alloc(dev, i2s->regmap, > + i2s->variant->field_txchanmap); > + if (IS_ERR(i2s->field_txchanmap)) > + return PTR_ERR(i2s->field_txchanmap); > + > + i2s->field_rxchanmap = > + devm_regmap_field_alloc(dev, i2s->regmap, > + i2s->variant->field_rxchanmap); > + if (IS_ERR(i2s->field_rxchanmap)) > + return PTR_ERR(i2s->field_rxchanmap); > + > + i2s->field_txchansel = > + devm_regmap_field_alloc(dev, i2s->regmap, > + i2s->variant->field_txchansel); > + if (IS_ERR(i2s->field_txchansel)) > + return PTR_ERR(i2s->field_txchansel); > + > + i2s->field_rxchansel = > + devm_regmap_field_alloc(dev, i2s->regmap, > + i2s->variant->field_rxchansel); > + return PTR_ERR_OR_ZERO(i2s->field_rxchansel); > +} > + That's much better. Thanks! ChenYu _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel