From owner-svn-src-head@FreeBSD.ORG Sat Nov 15 09:39:01 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FD7C1065689; Sat, 15 Nov 2008 09:39:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F209D8FC1C; Sat, 15 Nov 2008 09:39:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAF9d0vc016190; Sat, 15 Nov 2008 09:39:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAF9d0jF016189; Sat, 15 Nov 2008 09:39:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200811150939.mAF9d0jF016189@svn.freebsd.org> From: Alexander Motin Date: Sat, 15 Nov 2008 09:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184991 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 09:39:01 -0000 Author: mav Date: Sat Nov 15 09:39:00 2008 New Revision: 184991 URL: http://svn.freebsd.org/changeset/base/184991 Log: Correct association 0 handling. as=0 means unused pin, so disable it explicitly, this is mostly cosmetics. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Sat Nov 15 09:30:09 2008 (r184990) +++ head/sys/dev/sound/pci/hda/hdac.c Sat Nov 15 09:39:00 2008 (r184991) @@ -83,7 +83,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20081030_0115" +#define HDA_DRV_TEST_REV "20081115_0116" SND_DECLARE_FILE("$FreeBSD$"); @@ -4255,9 +4255,9 @@ hdac_audio_as_parse(struct hdac_devinfo struct hdac_widget *w; int i, j, cnt, max, type, dir, assoc, seq, first, hpredir; - /* XXX This is redundant */ + /* Count present associations */ max = 0; - for (j = 0; j < 16; j++) { + for (j = 1; j < 16; j++) { for (i = devinfo->startnode; i < devinfo->endnode; i++) { w = hdac_widget_get(devinfo, i); if (w == NULL || w->enable == 0) @@ -5123,17 +5123,27 @@ hdac_audio_disable_useless(struct hdac_d w = hdac_widget_get(devinfo, i); if (w == NULL || w->enable == 0) continue; - if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX && - (w->wclass.pin.config & - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) == - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE) { - w->enable = 0; - HDA_BOOTHVERBOSE( - device_printf(devinfo->codec->sc->dev, - " Disabling pin nid %d due" - " to None connectivity.\n", - w->nid); - ); + if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) { + if ((w->wclass.pin.config & + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) == + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE) { + w->enable = 0; + HDA_BOOTHVERBOSE( + device_printf(devinfo->codec->sc->dev, + " Disabling pin nid %d due" + " to None connectivity.\n", + w->nid); + ); + } else if ((w->wclass.pin.config & + HDA_CONFIG_DEFAULTCONF_ASSOCIATION_MASK) == 0) { + w->enable = 0; + HDA_BOOTHVERBOSE( + device_printf(devinfo->codec->sc->dev, + " Disabling unassociated" + " pin nid %d.\n", + w->nid); + ); + } } } do {