Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/dev/hdaudio Pull up following revision(s) (requested ...



details:   https://anonhg.NetBSD.org/src/rev/763d7af36dd1
branches:  netbsd-8
changeset: 435302:763d7af36dd1
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Oct 09 10:09:51 2018 +0000

description:
Pull up following revision(s) (requested by manu in ticket #1053):

        sys/dev/hdaudio/hdafg.c: revision 1.16

Fix hdaudio device configuration

When disabling unassociated devices, we have a special handling
for pins of type COP_AWCAP_TYPE_PIN_COMPLEX, but it came after code
that may disable any pins, including the ones that should be handled
as COP_AWCAP_TYPE_PIN_COMPLEX.

The result was that hdaudio could fail to detect some devices.  We
fix the situation by making sure that COP_AWCAP_TYPE_PIN_COMPLEX
pins always get their specific handling.

The change makes the built-in speaker work on Dell OptiPlex 5060

diffstat:

 sys/dev/hdaudio/hdafg.c |  32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diffs (58 lines):

diff -r be8516bd70b5 -r 763d7af36dd1 sys/dev/hdaudio/hdafg.c
--- a/sys/dev/hdaudio/hdafg.c   Tue Oct 09 10:01:38 2018 +0000
+++ b/sys/dev/hdaudio/hdafg.c   Tue Oct 09 10:09:51 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hdafg.c,v 1.12.2.1 2017/08/20 04:50:38 snj Exp $ */
+/* $NetBSD: hdafg.c,v 1.12.2.2 2018/10/09 10:09:51 martin 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.12.2.1 2017/08/20 04:50:38 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.12.2.2 2018/10/09 10:09:51 martin Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -2106,25 +2106,25 @@
        struct hdaudio_control *ctl;
        int i, j, k;
 
-       /* Disable unassociated widgets */
        for (i = sc->sc_startnode; i < sc->sc_endnode; i++) {
                w = hdafg_widget_lookup(sc, i);
                if (w == NULL || w->w_enable == false)
                        continue;
-               if (w->w_bindas == -1) {
-                       w->w_enable = 0;
-                       hda_trace(sc, "disable %02X [unassociated]\n",
-                           w->w_nid);
+               
+               /* Disable unassociated widgets */
+               if (w->w_type != COP_AWCAP_TYPE_PIN_COMPLEX) {
+                       if (w->w_bindas == -1) {
+                               w->w_enable = 0;
+                               hda_trace(sc, "disable %02X [unassociated]\n",
+                                   w->w_nid);
+                       }
+                       continue;
                }
-       }
-
-       /* Disable input connections on input pin and output on output */
-       for (i = sc->sc_startnode; i < sc->sc_endnode; i++) {
-               w = hdafg_widget_lookup(sc, i);
-               if (w == NULL || w->w_enable == false)
-                       continue;
-               if (w->w_type != COP_AWCAP_TYPE_PIN_COMPLEX)
-                       continue;
+
+               /*
+                * Disable input connections on input pin
+                * and output on output pin
+                */
                if (w->w_bindas < 0)
                        continue;
                if (as[w->w_bindas].as_dir == HDAUDIO_PINDIR_IN) {



Home | Main Index | Thread Index | Old Index