Commit 21484e43 authored by Richard Fitzgerald's avatar Richard Fitzgerald Committed by Takashi Iwai

ALSA: hda: cs35l56: Fix missing RESET GPIO if _SUB is missing

In cs35l56_hda_read_acpi() do not return if ACPI _SUB is missing.

A missing _SUB means that the driver cannot load a system-specific
firmware, because the firmware is identified by the _SUB. But it can
fallback to a generic firmware. Unfortunately this was being handled
by immediately returning 0, which would skip the remaining ACPI
configuration in cs35l56_hda_read_acpi() and so it would not get the
RESET GPIO.
Signed-off-by: default avatarRichard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 73cfbfa9 ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier")
Link: https://lore.kernel.org/r/20230914152525.20829-1-rf@opensource.cirrus.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 057a28ef
...@@ -865,14 +865,12 @@ static int cs35l56_hda_read_acpi(struct cs35l56_hda *cs35l56, int id) ...@@ -865,14 +865,12 @@ static int cs35l56_hda_read_acpi(struct cs35l56_hda *cs35l56, int id)
sub = acpi_get_subsystem_id(ACPI_HANDLE(cs35l56->base.dev)); sub = acpi_get_subsystem_id(ACPI_HANDLE(cs35l56->base.dev));
if (IS_ERR(sub)) { if (IS_ERR(sub)) {
/* If no ACPI SUB, return 0 and fallback to legacy firmware path, otherwise fail */ dev_info(cs35l56->base.dev,
if (PTR_ERR(sub) == -ENODATA) "Read ACPI _SUB failed(%ld): fallback to generic firmware\n",
return 0; PTR_ERR(sub));
else } else {
return PTR_ERR(sub);
}
cs35l56->system_name = sub; cs35l56->system_name = sub;
}
cs35l56->base.reset_gpio = devm_gpiod_get_index_optional(cs35l56->base.dev, cs35l56->base.reset_gpio = devm_gpiod_get_index_optional(cs35l56->base.dev,
"reset", "reset",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment