diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2009-05-29 05:04:46 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2009-05-29 05:04:46 +0000 |
commit | 48fdaf9f611a38f0968d165d5be96074f7b6da11 (patch) | |
tree | bd257feee7b6728cd469318d0c900e2bea28677e /sys/dev/pci | |
parent | e48256cdfac9b60861827c363e03831639b5ae82 (diff) |
if a control in outputs.master.slaves is muted, don't change it's
volume when outputs.master is changed
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/azalia_codec.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/pci/azalia_codec.c b/sys/dev/pci/azalia_codec.c index 69279b07914..fd4703516aa 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.125 2009/05/25 05:51:19 robert Exp $ */ +/* $OpenBSD: azalia_codec.c,v 1.126 2009/05/29 05:04:45 jakemsr Exp $ */ /* $NetBSD: azalia_codec.c,v 1.8 2006/05/10 11:17:27 kent Exp $ */ /*- @@ -2050,6 +2050,15 @@ azalia_generic_mixer_set(codec_t *this, nid_t nid, int target, w = &this->w[this->playvols.slaves[i]]; if (!(COP_AMPCAP_NUMSTEPS(w->outamp_cap))) continue; + + /* don't change volume if muted */ + if (w->outamp_cap & COP_AMPCAP_MUTE) { + mc2.type = AUDIO_MIXER_ENUM; + azalia_generic_mixer_get(this, w->nid, + MI_TARGET_OUTAMP, &mc2); + if (mc2.un.ord) + continue; + } mc2.type = AUDIO_MIXER_VALUE; mc2.un.value.num_channels = WIDGET_CHANNELS(w); mc2.un.value.level[0] = this->playvols.vol_l; |