* Re: [PATCH V3] ALSA: hda/senarytech: add senarytech codec support
[not found] <20240614031630.61581-1-bo.liu@senarytech.com>
@ 2024-06-14 12:55 ` Takashi Iwai
0 siblings, 0 replies; only message in thread
From: Takashi Iwai @ 2024-06-14 12:55 UTC (permalink / raw)
To: bo liu; +Cc: perex, tiwai, linux-sound, linux-kernel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-06-14 12:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20240614031630.61581-1-bo.liu@senarytech.com>
2024-06-14 12:55 ` [PATCH V3] ALSA: hda/senarytech: add senarytech codec support Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox