Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/sound/pci/emu10kx.c
Show All 12 Lines | |||||
if (mix_name != NULL) { | if (mix_name != NULL) { | ||||
/* | /* | ||||
* Temporary sysctls should start with underscore, | * Temporary sysctls should start with underscore, | ||||
* see freebsd-current mailing list, emu10kx driver | * see freebsd-current mailing list, emu10kx driver | ||||
* discussion around 2006-05-24. | * discussion around 2006-05-24. | ||||
*/ | */ | ||||
snprintf(sysctl_name, 32, "_%s", mix_name); | snprintf(sysctl_name, 32, "_%s", mix_name); | ||||
SYSCTL_ADD_PROC(sc->ctx, | SYSCTL_ADD_PROC(sc->ctx, | ||||
SYSCTL_CHILDREN(sc->root), | SYSCTL_CHILDREN(sc->root), OID_AUTO, sysctl_name, | ||||
OID_AUTO, sysctl_name, | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, mix_id, | ||||
CTLTYPE_INT | CTLFLAG_RW, sc, mix_id, | sysctl_emu_mixer_control, "I", ""); | ||||
sysctl_emu_mixer_control, "I", ""); | |||||
} | } | ||||
return (volgpr); | return (volgpr); | ||||
} | } | ||||
static int | static int | ||||
sysctl_emu_digitalswitch_control(SYSCTL_HANDLER_ARGS) | sysctl_emu_digitalswitch_control(SYSCTL_HANDLER_ARGS) | ||||
{ | { | ||||
Show All 21 Lines | |||||
} | } | ||||
return (0); | return (0); | ||||
} | } | ||||
static void | static void | ||||
emu_digitalswitch(struct emu_sc_info *sc) | emu_digitalswitch(struct emu_sc_info *sc) | ||||
{ | { | ||||
/* XXX temporary? */ | /* XXX temporary? */ | ||||
SYSCTL_ADD_PROC(sc->ctx, | SYSCTL_ADD_PROC(sc->ctx, SYSCTL_CHILDREN(sc->root), OID_AUTO, | ||||
SYSCTL_CHILDREN(sc->root), | "_digital", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | ||||
OID_AUTO, "_digital", | sc, 0, sysctl_emu_digitalswitch_control, "I", | ||||
CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "Enable digital output"); | ||||
sysctl_emu_digitalswitch_control, "I", "Enable digital output"); | |||||
return; | return; | ||||
} | } | ||||
/* | /* | ||||
* Allocate cache GPRs that will hold mixed output channels | * Allocate cache GPRs that will hold mixed output channels | ||||
* and clear it on every DSP run. | * and clear it on every DSP run. | ||||
*/ | */ | ||||
Show All 12 Lines |