lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191016080653.3seixioa2xiaobd7@gilmour>
Date:   Wed, 16 Oct 2019 10:06:53 +0200
From:   Maxime Ripard <mripard@...nel.org>
To:     codekipper@...il.com
Cc:     wens@...e.org, linux-sunxi@...glegroups.com,
        linux-arm-kernel@...ts.infradead.org, lgirdwood@...il.com,
        broonie@...nel.org, linux-kernel@...r.kernel.org,
        alsa-devel@...a-project.org, be17068@...rbole.bo.it
Subject: Re: [PATCH v6 2/7] ASoC: sun4i-i2s: Add functions for RX and TX
 channel offsets

Hi,

On Wed, Oct 16, 2019 at 09:07:35AM +0200, codekipper@...il.com wrote:
> From: Marcus Cooper <codekipper@...il.com>
>
> 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 <codekipper@...il.com>
> ---
>  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.

Maxime

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ