Re: [PATCH v1] ALSA: hda/tas2781: Add speaker id check for ASUS projects

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

 



On Fri, Oct 11, 2024 at 04:53:03PM +0800, Baojun Xu wrote:
> Add speaker id check by gpio in ACPI for ASUS projects.

...

> +		scnprintf(tas_priv->coef_binaryname, 64, "TAS2XXX%04X%01d.bin",

sizeof() ?

> +			codec->core.subsystem_id & 0xffff, spk_id);

lower_16_bits() ?

...

> +		scnprintf(tas_priv->coef_binaryname, 64, "TAS2XXX%04X.bin",

Ditto.

> +			codec->core.subsystem_id & 0xffff);

Ditto.

...

> +	tas_hda->priv->speaker_id = devm_gpiod_get(tas_hda->dev, "speakerid",
> +						   GPIOD_IN);
> +	if (IS_ERR(tas_hda->priv->speaker_id))
> +		dev_info(tas_hda->dev, "Failed to get Speaker id gpio.\n");

This is wrong. If it's okay to ignore, make it optional. Either way you have to
return an error code to the caller as you effectively ignore deferred probe,
for example.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux