summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2010-06-27 21:47:08 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2010-06-27 21:47:08 +0000
commitd41b978186af813a0930f71b4972e6e4750be2c5 (patch)
tree338c63066072d8e4f9b1feebbf41f670316d9387 /sys
parent36c5964da8928b60ca04bb7631ec8eff4cb882b5 (diff)
don't probe "volume knobs" on resume. probably not needed and
is currently breaking resume. ok pirofti
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/azalia.c10
-rw-r--r--sys/dev/pci/azalia.h4
-rw-r--r--sys/dev/pci/azalia_codec.c8
3 files changed, 11 insertions, 11 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index 78ead0e85f8..72c6c041fce 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.172 2010/04/20 02:17:24 jakemsr Exp $ */
+/* $OpenBSD: azalia.c,v 1.173 2010/06/27 21:47:07 jakemsr Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -1415,10 +1415,6 @@ azalia_resume_codec(codec_t *this)
azalia_restore_mixer(this);
- err = azalia_codec_enable_unsol(this);
- if (err)
- return err;
-
return(0);
}
@@ -1449,6 +1445,10 @@ azalia_resume(azalia_t *az)
if (err)
return err;
+ err = azalia_codec_enable_unsol(&az->codecs[az->codecno], 1);
+ if (err)
+ return err;
+
if (az->pstream.active) {
err = azalia_stream_start(&az->pstream);
if (err)
diff --git a/sys/dev/pci/azalia.h b/sys/dev/pci/azalia.h
index c8f4edfb901..27a45ad6691 100644
--- a/sys/dev/pci/azalia.h
+++ b/sys/dev/pci/azalia.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.h,v 1.59 2010/03/21 15:02:31 jakemsr Exp $ */
+/* $OpenBSD: azalia.h,v 1.60 2010/06/27 21:47:07 jakemsr Exp $ */
/* $NetBSD: azalia.h,v 1.6 2006/01/16 14:15:26 kent Exp $ */
/*-
@@ -727,4 +727,4 @@ int azalia_comresp(const codec_t *, nid_t, uint32_t, uint32_t, uint32_t *);
int azalia_mixer_get(const codec_t *, nid_t, int, mixer_ctrl_t *);
int azalia_mixer_set(codec_t *, nid_t, int, const mixer_ctrl_t *);
-int azalia_codec_enable_unsol(codec_t *);
+int azalia_codec_enable_unsol(codec_t *, int);
diff --git a/sys/dev/pci/azalia_codec.c b/sys/dev/pci/azalia_codec.c
index a2e46237077..0cd1a12f713 100644
--- a/sys/dev/pci/azalia_codec.c
+++ b/sys/dev/pci/azalia_codec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia_codec.c,v 1.146 2010/06/27 17:42:27 jakemsr Exp $ */
+/* $OpenBSD: azalia_codec.c,v 1.147 2010/06/27 21:47:07 jakemsr Exp $ */
/* $NetBSD: azalia_codec.c,v 1.8 2006/05/10 11:17:27 kent Exp $ */
/*-
@@ -1390,7 +1390,7 @@ azalia_mixer_default(codec_t *this)
}
this->recvols.mute = 0;
- err = azalia_codec_enable_unsol(this);
+ err = azalia_codec_enable_unsol(this, 0);
if (err)
return(err);
@@ -1398,7 +1398,7 @@ azalia_mixer_default(codec_t *this)
}
int
-azalia_codec_enable_unsol(codec_t *this)
+azalia_codec_enable_unsol(codec_t *this, int resuming)
{
widget_t *w;
uint32_t result;
@@ -1416,7 +1416,7 @@ azalia_codec_enable_unsol(codec_t *this)
azalia_unsol_event(this, AZ_TAG_SPKR);
/* volume knob */
- if (this->playvols.master != this->audiofunc) {
+ if (this->playvols.master != this->audiofunc && !resuming) {
w = &this->w[this->playvols.master];
err = azalia_comresp(this, w->nid, CORB_GET_VOLUME_KNOB,