aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sound
diff options
context:
space:
mode:
authorOrion Hodson <orion@FreeBSD.org>2001-11-21 04:26:04 +0000
committerOrion Hodson <orion@FreeBSD.org>2001-11-21 04:26:04 +0000
commiteb5b9d0b873ccd8c373f81d49be21e3ea36bd5a0 (patch)
treeeefb756c6c437eadd511eec503b3fdd64893844e /sys/dev/sound
parent647fbfebc5b739d7475989ecd98135c3a04eba73 (diff)
Notes
Diffstat (limited to 'sys/dev/sound')
-rw-r--r--sys/dev/sound/pci/ich.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/sound/pci/ich.c b/sys/dev/sound/pci/ich.c
index 3d7b21faa8644..ddbd6b9ff0f73 100644
--- a/sys/dev/sound/pci/ich.c
+++ b/sys/dev/sound/pci/ich.c
@@ -473,6 +473,7 @@ static int
ich_pci_attach(device_t dev)
{
u_int32_t data;
+ u_int16_t extcaps;
struct sc_info *sc;
char status[SND_STATUSLEN];
@@ -522,10 +523,11 @@ ich_pci_attach(device_t dev)
mixer_init(dev, ac97_getmixerclass(), sc->codec);
/* check and set VRA function */
- if (ac97_setextmode(sc->codec, AC97_EXTCAP_VRA) == 0)
- sc->hasvra = 1;
- if (ac97_setextmode(sc->codec, AC97_EXTCAP_VRM) == 0)
- sc->hasvrm = 1;
+ extcaps = ac97_getcaps(sc->codec);
+ sc->hasvra = extcaps & AC97_EXTCAP_VRA;
+ sc->hasvrm = extcaps & AC97_EXTCAP_VRM;
+ ac97_setextmode(sc->codec,
+ extcaps & (AC97_EXTCAP_VRA | AC97_EXTCAP_VRM));
if (ac97_getcaps(sc->codec) & AC97_CAP_MICCHANNEL)
sc->hasmic = 1;