ALSA: hda/senarytech: add senarytech codec support
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · bo liu
(quoted diff) +7
-0+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)
Review
Quoted 10 lines
(quoted diff) +10
-0+ 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