summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2008-11-30 04:01:54 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2008-11-30 04:01:54 +0000
commit481b3bf8733ebb3525701ebc5e8f04792d1026d1 (patch)
tree1902c9ec54788a0828a25cc4b559e27061eb2978 /sys
parent1fc4c9fdf9bd9dac8f8765f24498751e35c98ab4 (diff)
don't rebuild the list of supported formats if it isn't going
to change.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/azalia_codec.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/dev/pci/azalia_codec.c b/sys/dev/pci/azalia_codec.c
index 3de3d109700..c1561c9ae88 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.76 2008/11/30 03:50:29 jakemsr Exp $ */
+/* $OpenBSD: azalia_codec.c,v 1.77 2008/11/30 04:01:53 jakemsr Exp $ */
/* $NetBSD: azalia_codec.c,v 1.8 2006/05/10 11:17:27 kent Exp $ */
/*-
@@ -1535,8 +1535,11 @@ azalia_generic_mixer_set(codec_t *this, nid_t nid, int target,
return EBUSY;
if (mc->un.ord >= this->dacs.ngroups)
return EINVAL;
- return azalia_codec_construct_format(this,
- mc->un.ord, this->adcs.cur);
+ if (mc->un.ord != this->dacs.cur)
+ return azalia_codec_construct_format(this,
+ mc->un.ord, this->adcs.cur);
+ else
+ return 0;
}
/* ADC selection */
@@ -1545,8 +1548,11 @@ azalia_generic_mixer_set(codec_t *this, nid_t nid, int target,
return EBUSY;
if (mc->un.ord >= this->adcs.ngroups)
return EINVAL;
- return azalia_codec_construct_format(this,
- this->dacs.cur, mc->un.ord);
+ if (mc->un.ord != this->adcs.cur)
+ return azalia_codec_construct_format(this,
+ this->dacs.cur, mc->un.ord);
+ else
+ return 0;
}
/* Volume knob */