Re: [PATCH v1] ALSA: hda/tas2781: Add speaker id check for ASUS projects
From: Andy Shevchenko
Date: Fri Oct 11 2024 - 07:08:17 EST
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