summaryrefslogtreecommitdiff
path: root/sys/dev/pci/azalia.c
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2008-10-23 02:06:54 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2008-10-23 02:06:54 +0000
commitf5f752d5cd7d016b5b2720c483ab9cb9054f6bb8 (patch)
tree45020573643d384df69d6f3675b1f3f06c8c5e65 /sys/dev/pci/azalia.c
parent7986b39d9b197deebbbb66fe494b3054e2ccd2aa (diff)
Sve power. Power down codec if it has no audio function groups.
from Alexey Suslikov, thanks
Diffstat (limited to 'sys/dev/pci/azalia.c')
-rw-r--r--sys/dev/pci/azalia.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index 3f7e11aa0f9..02c8677e734 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.60 2008/10/16 19:16:58 jakemsr Exp $ */
+/* $OpenBSD: azalia.c,v 1.61 2008/10/23 02:06:53 jakemsr Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -1210,11 +1210,15 @@ azalia_codec_init(codec_t *this)
if (this->audiofunc < 0) {
DPRINTF(("%s: codec[%d]: No audio function groups\n",
XNAME(this->az), addr));
+ this->comresp(this, this->audiofunc, CORB_SET_POWER_STATE,
+ CORB_PS_D3, &result);
+ DELAY(100);
return -1;
}
/* power the audio function */
- this->comresp(this, this->audiofunc, CORB_SET_POWER_STATE, CORB_PS_D0, &result);
+ this->comresp(this, this->audiofunc, CORB_SET_POWER_STATE,
+ CORB_PS_D0, &result);
DELAY(100);
/* check widgets in the audio function */