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

Thank you very much for your review

On Fri, Oct 13, 2023 at 03:10:56 PM +0100, broonie@...nel.org wrote:
> 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.

Thank you very much, I will modify it to ".max_register = AW88399_REG_MAX;"

>> +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?

Thank you very much, but this is not a debugging statement, This is designed
to be compatible with different platforms that may not support continuous
writing.

>> +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?

Thank you very much. I will modify it

Best regards,
Weidong Wang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ