host_if
if (cont && (h = host_if(ps, mask)) != NULL)
struct node_host *host_if(const char *, int);
ac97_attach(struct ac97_host_if *host_if, device_t sc_dev, kmutex_t *lk)
return ac97_attach_type(host_if, sc_dev, AC97_CODEC_TYPE_AUDIO, lk);
ac97_attach_type(struct ac97_host_if *host_if, device_t sc_dev, int type, kmutex_t *lk)
as->host_if = host_if;
if ((error = host_if->attach(host_if->arg, &as->codec_if))) {
if (host_if->reset != NULL) {
if ((error = host_if->reset(host_if->arg))) {
if (host_if->flags)
as->host_flags = host_if->flags(host_if->arg);
host_if->write(host_if->arg, AC97_REG_RESET, 0);
host_if->write(host_if->arg, AC97_REG_POWER, AC97_POWER_MIXER);
host_if->write(host_if->arg, AC97_REG_POWER, POWER_EAMP_ON(as));
host_if->write(host_if->arg, AC97_REG_EXT_MODEM_ID, 0);
if (spdif && as->host_if->spdif_event != NULL) {
as->host_if->spdif_event(as->host_if->arg, cp->un.ord);
struct ac97_host_if *host_if;
if (as->host_if->read(as->host_if->arg, reg, val)) {
return as->host_if->write(as->host_if->arg, reg, val);
ret = as->host_if->write(as->host_if->arg, reg, val);
as->host_if->read(as->host_if->arg, reg, &actual);
struct ac97_host_if host_if;
sc->host_if.arg = sc;
sc->host_if.attach = auacer_attach_codec;
sc->host_if.read = auacer_read_codec;
sc->host_if.write = auacer_write_codec;
sc->host_if.reset = auacer_reset_codec;
if (ac97_attach(&sc->host_if, self, &sc->sc_lock) != 0) {
struct ac97_host_if host_if;
sc->host_if.arg = sc;
sc->host_if.attach = auich_attach_codec;
sc->host_if.read = auich_read_codec;
sc->host_if.write = auich_write_codec;
sc->host_if.reset = auich_reset_codec;
sc->host_if.flags = auich_flags_codec;
sc->host_if.spdif_event = auich_spdif_event;
if (ac97_attach_type(&sc->host_if, self, sc->sc_codectype,
codec->host_if.arg = codec;
codec->host_if.attach = auixp_attach_codec;
codec->host_if.read = auixp_read_codec;
codec->host_if.write = auixp_write_codec;
codec->host_if.reset = auixp_reset_codec;
codec->host_if.flags = auixp_flags_codec;
if (ac97_attach(&sc->sc_codec[0].host_if, sc->sc_dev,
if (ac97_attach(&sc->sc_codec[1].host_if, sc->sc_dev,
if (ac97_attach(&sc->sc_codec[2].host_if, sc->sc_dev,
struct ac97_host_if host_if;
codec->host_if.arg = codec;
codec->host_if.attach = autri_attach_codec;
codec->host_if.reset = autri_reset_codec;
codec->host_if.read = autri_read_codec;
codec->host_if.write = autri_write_codec;
codec->host_if.flags = autri_flags_codec;
r = ac97_attach(&codec->host_if, self, &sc->sc_lock);
struct ac97_host_if host_if;
sc->host_if.arg = sc;
sc->host_if.attach = auvia_attach_codec;
sc->host_if.read = auvia_read_codec;
sc->host_if.write = auvia_write_codec;
sc->host_if.reset = auvia_reset_codec;
sc->host_if.spdif_event = auvia_spdif_event;
if ((r = ac97_attach(&sc->host_if, self, &sc->sc_lock)) != 0) {
struct ac97_host_if host_if;
sc->host_if.arg = sc;
sc->host_if.attach = cs428x_attach_codec;
sc->host_if.read = cs4280_read_codec;
sc->host_if.write = cs4280_write_codec;
sc->host_if.reset = cs4280_reset_codec;
sc->host_if.reset = NULL;
sc->host_if.flags = cs4280_flags_codec;
if (ac97_attach(&sc->host_if, self, &sc->sc_lock) != 0) {
sc->host_if.arg = sc;
sc->host_if.attach = cs428x_attach_codec;
sc->host_if.read = cs428x_read_codec;
sc->host_if.write = cs428x_write_codec;
sc->host_if.reset = cs4281_reset_codec;
if (ac97_attach(&sc->host_if, self, &sc->sc_lock) != 0) {
struct ac97_host_if host_if;
sc->host_if.arg = sc;
sc->host_if.attach = eap1371_attach_codec;
sc->host_if.read = eap1371_read_codec;
sc->host_if.write = eap1371_write_codec;
sc->host_if.reset = eap1371_reset_codec;
if (ac97_attach(&sc->host_if, self, &sc->sc_lock) == 0) {
struct ac97_host_if host_if;
sc->host_if.arg = sc;
sc->host_if.attach = esa_attach_codec;
sc->host_if.read = esa_read_codec;
sc->host_if.write = esa_write_codec;
sc->host_if.reset = esa_reset_codec;
sc->host_if.flags = esa_flags_codec;
if (ac97_attach(&sc->host_if, self, &sc->sc_lock) != 0) {
struct ac97_host_if host_if;
ess->host_if.arg = ess;
ess->host_if.attach = esm_attach_codec;
ess->host_if.read = esm_read_codec;
ess->host_if.write = esm_write_codec;
ess->host_if.reset = esm_reset_codec;
ess->host_if.flags = esm_flags_codec;
if (ac97_attach(&ess->host_if, self, &ess->sc_lock) != 0) {
struct ac97_host_if host_if;
sc->host_if.arg = sc;
sc->host_if.attach = fms_attach_codec;
sc->host_if.read = fms_read_codec;
sc->host_if.write = fms_write_codec;
sc->host_if.reset = fms_reset_codec;
if (ac97_attach(&sc->host_if, self, &sc->sc_lock) != 0) {
struct ac97_host_if host_if;
struct ac97_host_if host_if;
sc->host_if.arg = sc;
sc->host_if.attach = gcscaudio_attach_codec;
sc->host_if.read = gcscaudio_read_codec;
sc->host_if.write = gcscaudio_write_codec;
sc->host_if.reset = gcscaudio_reset_codec;
sc->host_if.spdif_event = gcscaudio_spdif_event_codec;
if ((rc = ac97_attach(&sc->host_if, self, &sc->sc_lock)) != 0) {
struct ac97_host_if host_if;
sc->host_if.arg = sc;
sc->host_if.attach = neo_attach_codec;
sc->host_if.read = neo_read_codec;
sc->host_if.write = neo_write_codec;
sc->host_if.reset = neo_reset_codec;
sc->host_if.flags = neo_flags_codec;
if (ac97_attach(&sc->host_if, self, &sc->lock) != 0) {
codec->host_if.arg = codec;
codec->host_if.attach = yds_attach_codec;
codec->host_if.read = yds_read_codec;
codec->host_if.write = yds_write_codec;
codec->host_if.reset = yds_reset_codec;
r = ac97_attach(&codec->host_if, self, &sc->sc_lock);
struct ac97_host_if host_if;