Module Name: src
Committed By: jmcneill
Date: Thu Aug 19 18:06:38 UTC 2010
Modified Files:
src/sys/dev/pci/hdaudio: hdaudio_afg.c
Log Message:
more assoc dump fixes
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/hdaudio/hdaudio_afg.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/pci/hdaudio/hdaudio_afg.c
diff -u src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.25 src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.26
--- src/sys/dev/pci/hdaudio/hdaudio_afg.c:1.25 Sun Aug 15 22:32:02 2010
+++ src/sys/dev/pci/hdaudio/hdaudio_afg.c Thu Aug 19 18:06:37 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: hdaudio_afg.c,v 1.25 2010/08/15 22:32:02 jmcneill Exp $ */
+/* $NetBSD: hdaudio_afg.c,v 1.26 2010/08/19 18:06:37 jmcneill Exp $ */
/*
* Copyright (c) 2009 Precedence Technologies Ltd <[email protected]>
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hdaudio_afg.c,v 1.25 2010/08/15 22:32:02 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdaudio_afg.c,v 1.26 2010/08/19 18:06:37 jmcneill Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -120,8 +120,8 @@
static const char *hdaudio_afg_port_connectivity[] = {
"Jack",
"Unconnected",
- "Fixed Function",
- "Jack & Fixed Function"
+ "Built-In",
+ "Jack & Built-In"
};
static const char *hdaudio_afg_default_device[] = {
"Line Out",
@@ -129,7 +129,7 @@
"HP Out",
"CD",
"SPDIF Out",
- "Digital Other Out",
+ "Digital Out",
"Modem Line Side",
"Modem Handset Side",
"Line In",
@@ -137,7 +137,7 @@
"Mic In",
"Telephony",
"SPDIF In",
- "Digital Other In",
+ "Digital In",
"Reserved",
"Other"
};
@@ -792,9 +792,29 @@
hdaudio_afg_default_device[curdev]);
for (curport = 0; curport < 4; curport++) {
+ bool devonport = false;
if ((portmask & (1 << curport)) == 0)
continue;
+ for (j = 0; j < HDAUDIO_MAXPINS; j++) {
+ if (as[i].as_dacs[j] == 0)
+ continue;
+
+ w = hdaudio_afg_widget_lookup(sc,
+ as[i].as_pins[j]);
+ if (w == NULL)
+ continue;
+ conn = COP_CFG_PORT_CONNECTIVITY(w->w_pin.config);
+ defdev = COP_CFG_DEFAULT_DEVICE(w->w_pin.config);
+ if (conn != curport || defdev != curdev)
+ continue;
+
+ devonport = true;
+ }
+
+ if (devonport == false)
+ continue;
+
hda_print1(sc, " [%s",
hdaudio_afg_port_connectivity[curport]);
for (j = 0; j < HDAUDIO_MAXPINS; j++) {