On Sat, Aug 19, 2017 at 8:48 PM, codekipper@gmail.com wrote:
From: Marcus Cooper codekipper@gmail.com
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@gmail.com Reviewed-by: Chen-Yu Tsai wens@csie.org
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