Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/sound/pcm/ac97.c
Show All 12 Lines | |||||
ac97_wrcd(codec, AC97_REG_POWER, orig ^ 0x8000); | ac97_wrcd(codec, AC97_REG_POWER, orig ^ 0x8000); | ||||
val = ac97_rdcd(codec, AC97_REG_POWER); | val = ac97_rdcd(codec, AC97_REG_POWER); | ||||
ac97_wrcd(codec, AC97_REG_POWER, orig); | ac97_wrcd(codec, AC97_REG_POWER, orig); | ||||
snd_mtxunlock(codec->lock); | snd_mtxunlock(codec->lock); | ||||
if ((val & 0x8000) == (orig & 0x8000)) | if ((val & 0x8000) == (orig & 0x8000)) | ||||
return; | return; | ||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(codec->dev), | SYSCTL_ADD_PROC(device_get_sysctl_ctx(codec->dev), | ||||
SYSCTL_CHILDREN(device_get_sysctl_tree(codec->dev)), | SYSCTL_CHILDREN(device_get_sysctl_tree(codec->dev)), | ||||
OID_AUTO, "eapd", CTLTYPE_INT | CTLFLAG_RW, | OID_AUTO, "eapd", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | ||||
codec, sizeof(codec), sysctl_hw_snd_ac97_eapd, | codec, sizeof(codec), sysctl_hw_snd_ac97_eapd, | ||||
"I", "AC97 External Amplifier"); | "I", "AC97 External Amplifier"); | ||||
} | } | ||||
static int | static int | ||||
ac97mix_init(struct snd_mixer *m) | ac97mix_init(struct snd_mixer *m) | ||||
{ | { | ||||
struct ac97_info *codec = mix_getdevinfo(m); | struct ac97_info *codec = mix_getdevinfo(m); | ||||
Show All 12 Lines |