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;
}
}
staticvoid senary_auto_turn_eapd(struct hda_codec *codec, int num_pins, const hda_nid_t *pins, bool on)
{ int i;
for (i = 0; i < num_pins; i++) { if (snd_hda_query_pin_caps(codec, pins[i]) & AC_PINCAP_EAPD)
snd_hda_codec_write(codec, pins[i], 0,
AC_VERB_SET_EAPD_BTLENABLE,
on ? 0x02 : 0);
}
}
/* turn on/off EAPD according to Master switch */ staticvoid senary_auto_vmaster_hook(void *private_data, int enabled)
{ struct hda_codec *codec = private_data; struct senary_spec *spec = codec->spec;
/* Turn the problematic codec into D3 to avoid spurious noises * from the internal speaker during (and after) reboot
*/
senary_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, false);
}
err = senary_auto_parse_beep(codec); if (err < 0) goto error;
err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); if (err < 0) goto error;
/* Some laptops with Senary chips show stalls in S3 resume, * which falls into the single-cmd mode. * Better to make reset, then.
*/ if (!codec->bus->core.sync_write) {
codec_info(codec, "Enable sync_write for stable communication\n");
codec->bus->core.sync_write = 1;
codec->bus->allow_bus_reset = 1;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.