Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/hdaudio Startup with the mic muted to avoid feedback...



details:   https://anonhg.NetBSD.org/src/rev/c91260e2aab1
branches:  trunk
changeset: 341397:c91260e2aab1
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Nov 04 14:11:09 2015 +0000

description:
Startup with the mic muted to avoid feedback and spying.

diffstat:

 sys/dev/hdaudio/hdafg.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r e3bef010c998 -r c91260e2aab1 sys/dev/hdaudio/hdafg.c
--- a/sys/dev/hdaudio/hdafg.c   Wed Nov 04 09:24:14 2015 +0000
+++ b/sys/dev/hdaudio/hdafg.c   Wed Nov 04 14:11:09 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hdafg.c,v 1.3 2015/07/26 19:06:26 jmcneill Exp $ */
+/* $NetBSD: hdafg.c,v 1.4 2015/11/04 14:11:09 christos Exp $ */
 
 /*
  * Copyright (c) 2009 Precedence Technologies Ltd <support%precedence.co.uk@localhost>
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.3 2015/07/26 19:06:26 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.4 2015/11/04 14:11:09 christos Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -2367,7 +2367,10 @@
                z = ctl->ctl_offset;
                if (z > ctl->ctl_step)
                        z = ctl->ctl_step;
-               hdafg_control_amp_set(ctl, HDAUDIO_AMP_MUTE_NONE, z, z);
+               if (ctl->ctl_dir & HDAUDIO_PINDIR_IN)
+                       hdafg_control_amp_set(ctl, HDAUDIO_AMP_MUTE_ALL, z, z);
+               else
+                       hdafg_control_amp_set(ctl, HDAUDIO_AMP_MUTE_NONE, z, z);
        }
 }
 



Home | Main Index | Thread Index | Old Index