summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2009-09-09 02:13:36 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2009-09-09 02:13:36 +0000
commit59019a52eb95fcb0b7becca9a942cff945ff4862 (patch)
tree5ae96fef27175ca880ab540f5ac881b84cb8d730 /sys/dev
parent2e7baea3a86085043bc858c8deb16ced7c959307 (diff)
handle mixer get/set requests for class type mixer items in the underlying
mixer get/set routines instead of in the MI audio routines.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/azalia.c8
-rw-r--r--sys/dev/pci/azalia_codec.c14
2 files changed, 12 insertions, 10 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index dc3f6d64e48..90c4228b8de 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.145 2009/09/09 00:26:57 jakemsr Exp $ */
+/* $OpenBSD: azalia.c,v 1.146 2009/09/09 02:13:35 jakemsr Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -3705,9 +3705,6 @@ azalia_set_port(void *v, mixer_ctrl_t *mc)
codec_t *co;
const mixer_item_t *m;
- if (mc->type == AUDIO_MIXER_CLASS)
- return 0; /* nothing to do */
-
az = v;
co = &az->codecs[az->codecno];
if (mc->dev < 0 || mc->dev >= co->nmixers)
@@ -3727,9 +3724,6 @@ azalia_get_port(void *v, mixer_ctrl_t *mc)
codec_t *co;
const mixer_item_t *m;
- if (mc->type == AUDIO_MIXER_CLASS)
- return 0; /* nothing to do */
-
az = v;
co = &az->codecs[az->codecno];
if (mc->dev < 0 || mc->dev >= co->nmixers)
diff --git a/sys/dev/pci/azalia_codec.c b/sys/dev/pci/azalia_codec.c
index e27c23d5468..402dddcba74 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.134 2009/09/09 02:06:04 jakemsr Exp $ */
+/* $OpenBSD: azalia_codec.c,v 1.135 2009/09/09 02:13:35 jakemsr Exp $ */
/* $NetBSD: azalia_codec.c,v 1.8 2006/05/10 11:17:27 kent Exp $ */
/*-
@@ -1405,8 +1405,12 @@ azalia_mixer_get(const codec_t *this, nid_t nid, int target,
nid_t n;
int i, err;
+ if (mc->type == AUDIO_MIXER_CLASS) {
+ return(0);
+ }
+
/* inamp mute */
- if (IS_MI_TARGET_INAMP(target) && mc->type == AUDIO_MIXER_ENUM) {
+ else if (IS_MI_TARGET_INAMP(target) && mc->type == AUDIO_MIXER_ENUM) {
err = azalia_comresp(this, nid, CORB_GET_AMPLIFIER_GAIN_MUTE,
CORB_GAGM_INPUT | CORB_GAGM_LEFT |
MI_TARGET_INAMP(target), &result);
@@ -1673,8 +1677,12 @@ azalia_mixer_set(codec_t *this, nid_t nid, int target, const mixer_ctrl_t *mc)
uint32_t result, value;
int i, err;
+ if (mc->type == AUDIO_MIXER_CLASS) {
+ return(0);
+ }
+
/* inamp mute */
- if (IS_MI_TARGET_INAMP(target) && mc->type == AUDIO_MIXER_ENUM) {
+ else if (IS_MI_TARGET_INAMP(target) && mc->type == AUDIO_MIXER_ENUM) {
/* set stereo mute separately to keep each gain value */
err = azalia_comresp(this, nid, CORB_GET_AMPLIFIER_GAIN_MUTE,
CORB_GAGM_INPUT | CORB_GAGM_LEFT |