Re: [PATCH V1 3/3] ASoC: codecs: Add aw88399 amplifier driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you very much for your review

On Fri, Oct 13, 2023 at 03:10:56 PM +0100, broonie@xxxxxxxxxx wrote:
> On Fri, Oct 13, 2023 at 06:42:20PM +0800, wangweidong.a@xxxxxxxxxx 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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux