summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2008-11-15 09:39:00 +0000
committermav <mav@FreeBSD.org>2008-11-15 09:39:00 +0000
commitfb95775d9a2805abaebfdea79a397894d9434a02 (patch)
tree3b8f723a7099598b6ed8f1c41151016606f74975 /sys/dev/sound
parent531323da7ebdbc9ead7a27c47c5c5b50ce5c1b47 (diff)
downloadFreeBSD-src-fb95775d9a2805abaebfdea79a397894d9434a02.zip
FreeBSD-src-fb95775d9a2805abaebfdea79a397894d9434a02.tar.gz
Correct association 0 handling.
as=0 means unused pin, so disable it explicitly, this is mostly cosmetics.
Diffstat (limited to 'sys/dev/sound')
-rw-r--r--sys/dev/sound/pci/hda/hdac.c38
1 files changed, 24 insertions, 14 deletions
diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c
index 1bcf36b..749ad4a 100644
--- a/sys/dev/sound/pci/hda/hdac.c
+++ b/sys/dev/sound/pci/hda/hdac.c
@@ -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 *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_devinfo *devinfo)
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 {
OpenPOWER on IntegriCloud