Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/sound/pci/hda/hdaa.c
Show First 20 Lines • Show All 5,028 Lines • ▼ Show 20 Lines | if (w == NULL) | ||||
continue; | continue; | ||||
if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX && | if (w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX && | ||||
w->waspin == 0) | w->waspin == 0) | ||||
continue; | continue; | ||||
pincap = w->wclass.pin.cap; | pincap = w->wclass.pin.cap; | ||||
/* Disable everything. */ | /* Disable everything. */ | ||||
if (devinfo->init_clear) { | |||||
w->wclass.pin.ctrl &= ~( | w->wclass.pin.ctrl &= ~( | ||||
HDA_CMD_SET_PIN_WIDGET_CTRL_HPHN_ENABLE | | HDA_CMD_SET_PIN_WIDGET_CTRL_HPHN_ENABLE | | ||||
HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE | | HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE | | ||||
HDA_CMD_SET_PIN_WIDGET_CTRL_IN_ENABLE | | HDA_CMD_SET_PIN_WIDGET_CTRL_IN_ENABLE | | ||||
HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE_MASK); | HDA_CMD_SET_PIN_WIDGET_CTRL_VREF_ENABLE_MASK); | ||||
} | |||||
if (w->enable == 0) { | if (w->enable == 0) { | ||||
/* Pin is unused so left it disabled. */ | /* Pin is unused so left it disabled. */ | ||||
continue; | continue; | ||||
} else if (w->waspin) { | } else if (w->waspin) { | ||||
/* Enable input for beeper input. */ | /* Enable input for beeper input. */ | ||||
w->wclass.pin.ctrl |= | w->wclass.pin.ctrl |= | ||||
HDA_CMD_SET_PIN_WIDGET_CTRL_IN_ENABLE; | HDA_CMD_SET_PIN_WIDGET_CTRL_IN_ENABLE; | ||||
▲ Show 20 Lines • Show All 1,616 Lines • ▼ Show 20 Lines | hdaa_attach(device_t dev) | ||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), | SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), | ||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, | SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, | ||||
"gpo_config", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, | "gpo_config", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, | ||||
devinfo, 0, hdaa_sysctl_gpo_config, "A", "GPO configuration"); | devinfo, 0, hdaa_sysctl_gpo_config, "A", "GPO configuration"); | ||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), | SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), | ||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, | SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, | ||||
"reconfig", CTLTYPE_INT | CTLFLAG_RW, | "reconfig", CTLTYPE_INT | CTLFLAG_RW, | ||||
dev, 0, hdaa_sysctl_reconfig, "I", "Reprocess configuration"); | dev, 0, hdaa_sysctl_reconfig, "I", "Reprocess configuration"); | ||||
SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), | |||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, | |||||
"init_clear", CTLFLAG_RW, | |||||
&devinfo->init_clear, 1,"Clear initial pin widget configuration"); | |||||
bus_generic_attach(dev); | bus_generic_attach(dev); | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
hdaa_detach(device_t dev) | hdaa_detach(device_t dev) | ||||
{ | { | ||||
struct hdaa_devinfo *devinfo = device_get_softc(dev); | struct hdaa_devinfo *devinfo = device_get_softc(dev); | ||||
▲ Show 20 Lines • Show All 472 Lines • Show Last 20 Lines |