Module Name:    src
Committed By:   christos
Date:           Wed Nov  4 15:01:56 UTC 2015

Modified Files:
        src/sys/dev/hdaudio: hdafg.c

Log Message:
be more selective and mute only mic's. Suggested by jmcneill


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/hdaudio/hdafg.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/hdaudio/hdafg.c
diff -u src/sys/dev/hdaudio/hdafg.c:1.4 src/sys/dev/hdaudio/hdafg.c:1.5
--- src/sys/dev/hdaudio/hdafg.c:1.4	Wed Nov  4 09:11:09 2015
+++ src/sys/dev/hdaudio/hdafg.c	Wed Nov  4 10:01:56 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: hdafg.c,v 1.4 2015/11/04 14:11:09 christos Exp $ */
+/* $NetBSD: hdafg.c,v 1.5 2015/11/04 15:01:56 christos Exp $ */
 
 /*
  * Copyright (c) 2009 Precedence Technologies Ltd <[email protected]>
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.4 2015/11/04 14:11:09 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.5 2015/11/04 15:01:56 christos Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -2367,7 +2367,8 @@ hdafg_control_commit(struct hdafg_softc 
 		z = ctl->ctl_offset;
 		if (z > ctl->ctl_step)
 			z = ctl->ctl_step;
-		if (ctl->ctl_dir & HDAUDIO_PINDIR_IN)
+		if ((ctl->ctl_dir & HDAUDIO_PINDIR_IN) &&
+		    ctl->ctl_widget->w_type == COP_AWCAP_TYPE_AUDIO_INPUT)
 			hdafg_control_amp_set(ctl, HDAUDIO_AMP_MUTE_ALL, z, z);
 		else
 			hdafg_control_amp_set(ctl, HDAUDIO_AMP_MUTE_NONE, z, z);

Reply via email to