public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Richard Fitzgerald <rf@opensource.cirrus.com>
Cc: <tiwai@suse.com>, <alsa-devel@alsa-project.org>,
	<patches@opensource.cirrus.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ALSA: hda: cs35l56: Fix missing RESET GPIO if _SUB is missing
Date: Thu, 14 Sep 2023 16:29:11 +0200	[thread overview]
Message-ID: <871qf0zv48.wl-tiwai@suse.de> (raw)
In-Reply-To: <20230914121120.6201-1-rf@opensource.cirrus.com>

On Thu, 14 Sep 2023 14:11:20 +0200,
Richard Fitzgerald wrote:
> 
> 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: Richard Fitzgerald <rf@opensource.cirrus.com>
> Fixes: 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier")
> ---
>  sound/pci/hda/cs35l56_hda.c | 14 +++++---------
>  1 file changed, 5 insertions(+), 9 deletions(-)
> 
> diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c
> index 9e4976bdb5e0..a9844336bdc9 100644
> --- a/sound/pci/hda/cs35l56_hda.c
> +++ b/sound/pci/hda/cs35l56_hda.c
> @@ -864,15 +864,11 @@ static int cs35l56_hda_read_acpi(struct cs35l56_hda *cs35l56, int id)
>  
>  	sub = acpi_get_subsystem_id(ACPI_HANDLE(cs35l56->base.dev));
>  
> -	if (IS_ERR(sub)) {
> -		/* If no ACPI SUB, return 0 and fallback to legacy firmware path, otherwise fail */
> -		if (PTR_ERR(sub) == -ENODATA)
> -			return 0;
> -		else
> -			return PTR_ERR(sub);
> -	}
> -
> -	cs35l56->system_name = sub;
> +	if (IS_ERR(sub))
> +		dev_err_probe(cs35l56->base.dev, PTR_ERR(sub),
> +			      "Read ACPI _SUB failed: fallback to generic firmware\n");

Do we want to show as an error?  Since the driver continue to work, it
could be rather dev_info()?


thanks,

Takashi

      reply	other threads:[~2023-09-14 14:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 12:11 [PATCH] ALSA: hda: cs35l56: Fix missing RESET GPIO if _SUB is missing Richard Fitzgerald
2023-09-14 14:29 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qf0zv48.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=rf@opensource.cirrus.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox