Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1715677

Re: [linux-sunxi] [PATCH v5 1/8] ASoC: sun4i-i2s: Add regmap fields for channels

From Chen-Yu Tsai <wens@csie.org>
Newsgroups linux.kernel
Subject Re: [linux-sunxi] [PATCH v5 1/8] ASoC: sun4i-i2s: Add regmap fields for channels
Date 2017-08-19 17:20 +0200
Message-ID <ugdHA-2Vl-19@gated-at.bofh.it> (permalink)
References <ugbmp-1m2-3@gated-at.bofh.it> <ugbw6-1pj-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v5 0/8] ASoC: Add I2S support for Allwinner H3 SoCs codekipper@gmail.com - 2017-08-19 14:50 +0200
  [PATCH v5 3/8] ASoC: sun4i-i2s: bclk and lrclk polarity tidyup codekipper@gmail.com - 2017-08-19 14:50 +0200
    Re: [linux-sunxi] [PATCH v5 3/8] ASoC: sun4i-i2s: bclk and lrclk  polarity tidyup Chen-Yu Tsai <wens@csie.org> - 2017-08-19 17:00 +0200
  [PATCH v5 8/8] ASoC: sun4i-i2s: Add support for H3 codekipper@gmail.com - 2017-08-19 14:50 +0200
  [PATCH v5 7/8] ASoC: sun4i-i2s: Update global enable with bitmask codekipper@gmail.com - 2017-08-19 14:50 +0200
  [PATCH v5 4/8] ASoC: sun4i-i2s: Add mclk enable regmap field codekipper@gmail.com - 2017-08-19 15:00 +0200
    Re: [linux-sunxi] [PATCH v5 4/8] ASoC: sun4i-i2s: Add mclk enable  regmap field Chen-Yu Tsai <wens@csie.org> - 2017-08-19 17:20 +0200
  [PATCH v5 2/8] ASoC: sun4i-i2s: Add regfields for word size select and sample resolution codekipper@gmail.com - 2017-08-19 15:00 +0200
  [PATCH v5 1/8] ASoC: sun4i-i2s: Add regmap fields for channels codekipper@gmail.com - 2017-08-19 15:00 +0200
    Re: [linux-sunxi] [PATCH v5 1/8] ASoC: sun4i-i2s: Add regmap fields  for channels Chen-Yu Tsai <wens@csie.org> - 2017-08-19 17:20 +0200

csiph-web