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]
Date:   Fri, 13 Oct 2023 15:10:56 +0100
From:   Mark Brown <broonie@...nel.org>
To:     wangweidong.a@...nic.com
Cc:     lgirdwood@...il.com, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
        perex@...ex.cz, tiwai@...e.com, herve.codina@...tlin.com,
        shumingf@...ltek.com, rf@...nsource.cirrus.com, arnd@...db.de,
        13916275206@....com, ryans.lee@...log.com,
        linus.walleij@...aro.org, ckeepax@...nsource.cirrus.com,
        fido_max@...ox.ru, sebastian.reichel@...labora.com,
        colin.i.king@...il.com, liweilei@...nic.com, trix@...hat.com,
        dan.carpenter@...aro.org, alsa-devel@...a-project.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V1 3/3] ASoC: codecs: Add aw88399 amplifier driver

On Fri, Oct 13, 2023 at 06:42:20PM +0800, wangweidong.a@...nic.com wrote:

This looks good - some *very* minor comments below.

> +static const struct regmap_config aw88399_remap_config = {
> +	.val_bits = 16,
> +	.reg_bits = 8,
> +	.max_register = AW88399_REG_MAX - 1,

I see this is already the case for the aw88261 driver but it is a bit
weird that _REG_MAX isn't the maximum register - it looks like it should
probably be _NUM_REG.  Not the end of the world though.

> +static int aw_dev_dsp_update_container(struct aw_device *aw_dev,
> +			unsigned char *data, unsigned int len, unsigned short base)
> +{
> +	int i, ret;
> +
> +#ifdef AW88399_DSP_I2C_WRITES
> +	u32 tmp_len;

This looks like debug code which can hopefully be removed in favour of
the regmap implementation?

> +static int aw88399_codec_probe(struct snd_soc_component *component)
> +{
> +	struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
> +	struct aw88399 *aw88399 = snd_soc_component_get_drvdata(component);
> +	int ret;
> +
> +	ret = aw88399_request_firmware_file(aw88399);
> +	if (ret < 0) {
> +		dev_err(aw88399->aw_pa->dev, "%s failed\n", __func__);
> +		return ret;
> +	}
> +
> +	INIT_DELAYED_WORK(&aw88399->start_work, aw88399_startup_work);
> +
> +	/* add widgets */
> +	ret = snd_soc_dapm_new_controls(dapm, aw88399_dapm_widgets,
> +							ARRAY_SIZE(aw88399_dapm_widgets));
> +	if (ret < 0)
> +		return ret;
> +
> +	/* add route */
> +	ret = snd_soc_dapm_add_routes(dapm, aw88399_audio_map,
> +							ARRAY_SIZE(aw88399_audio_map));
> +	if (ret < 0)
> +		return ret;
> +
> +	ret = snd_soc_add_component_controls(component, aw88399_controls,
> +							ARRAY_SIZE(aw88399_controls));

You should just be able to pass these arrays in the component strucutre?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ