Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/sound/pci/via8233.c
Show All 12 Lines | |||||
via_init_sysctls(device_t dev) | via_init_sysctls(device_t dev) | ||||
{ | { | ||||
/* XXX: an user should be able to set this with a control tool, | /* XXX: an user should be able to set this with a control tool, | ||||
if not done before 7.0-RELEASE, this needs to be converted to | if not done before 7.0-RELEASE, this needs to be converted to | ||||
a device specific sysctl "dev.pcm.X.yyy" via device_get_sysctl_*() | a device specific sysctl "dev.pcm.X.yyy" via device_get_sysctl_*() | ||||
as discussed on multimedia@ in msg-id <861wujij2q.fsf@xps.des.no> */ | as discussed on multimedia@ in msg-id <861wujij2q.fsf@xps.des.no> */ | ||||
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, | ||||
"spdif_enabled", CTLTYPE_INT | CTLFLAG_RW, dev, sizeof(dev), | "spdif_enabled", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, dev, sizeof(dev), | |||||
sysctl_via8233_spdif_enable, "I", | sysctl_via8233_spdif_enable, "I", | ||||
"Enable S/PDIF output on primary playback channel"); | "Enable S/PDIF output on primary playback channel"); | ||||
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, | ||||
"dxs_src", CTLTYPE_INT | CTLFLAG_RW, dev, sizeof(dev), | "dxs_src", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, dev, sizeof(dev), | |||||
sysctl_via8233_dxs_src, "I", | sysctl_via8233_dxs_src, "I", | ||||
"Enable VIA DXS Sample Rate Converter"); | "Enable VIA DXS Sample Rate Converter"); | ||||
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, | ||||
"polling", CTLTYPE_INT | CTLFLAG_RW, dev, sizeof(dev), | "polling", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, dev, sizeof(dev), | |||||
sysctl_via_polling, "I", | sysctl_via_polling, "I", | ||||
"Enable polling mode"); | "Enable polling mode"); | ||||
} | } | ||||
static __inline uint32_t | static __inline uint32_t | ||||
via_rd(struct via_info *via, int regno, int size) | via_rd(struct via_info *via, int regno, int size) | ||||
{ | { | ||||
switch (size) { | switch (size) { | ||||
Show All 12 Lines |