From: Takashi Iwai <tiwai@suse.de>
To: bo liu <bo.liu@senarytech.com>
Cc: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3] ALSA: hda/senarytech: add senarytech codec support
Date: Fri, 14 Jun 2024 14:55:31 +0200 [thread overview]
Message-ID: <875xub8z0c.wl-tiwai@suse.de> (raw)
In-Reply-To: <20240614031630.61581-1-bo.liu@senarytech.com>
On Fri, 14 Jun 2024 05:16:30 +0200,
bo liu wrote:
>
> +static void senary_auto_parse_eapd(struct hda_codec *codec)
> +{
> + struct senary_spec *spec = codec->spec;
> + hda_nid_t nid;
> +
> + for_each_hda_codec_node(nid, codec) {
> + if (get_wcaps_type(get_wcaps(codec, nid)) != AC_WID_PIN)
> + continue;
> + if (!(snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_EAPD))
> + continue;
> + spec->eapds[spec->num_eapds++] = nid;
> + if (spec->num_eapds >= ARRAY_SIZE(spec->eapds))
> + break;
> + }
> +
> + /* chips always have more than two EAPDs, we can control EAPD per pin. */
> + spec->dynamic_eapd = 1;
So it's a fixed value, and we can drop this flag and the
conditionals. Let's clean up the code.
thanks,
Takashi
parent reply other threads:[~2024-06-14 12:55 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20240614031630.61581-1-bo.liu@senarytech.com>]
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=875xub8z0c.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=bo.liu@senarytech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--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