Tue Aug 10 13:52:13 2010 UTC ()
Include the type of non-complex pins in the label.


(joerg)
diff -r1.1 -r1.2 src/usr.sbin/hdaudioctl/graph.c

cvs diff -r1.1 -r1.2 src/usr.sbin/hdaudioctl/graph.c (expand / switch to context diff)
--- src/usr.sbin/hdaudioctl/graph.c 2009/10/11 08:57:54 1.1
+++ src/usr.sbin/hdaudioctl/graph.c 2010/08/10 13:52:13 1.2
@@ -1,4 +1,4 @@
-/* $NetBSD: graph.c,v 1.1 2009/10/11 08:57:54 sborrill Exp $ */
+/* $NetBSD: graph.c,v 1.2 2010/08/10 13:52:13 joerg Exp $ */
 
 /*
  * Copyright (c) 2009 Precedence Technologies Ltd <support@precedence.co.uk>
@@ -112,18 +112,20 @@
 
 		switch (type) {
 		case COP_AWCAP_TYPE_AUDIO_OUTPUT:
-			printf(" %s [shape=box,style=filled,fillcolor=\""
-			    "#88ff88\"];\n", buf);
+			printf(" %s [label=\"%s\\naudio output\",shape=box,style=filled,fillcolor=\""
+			    "#88ff88\"];\n", buf, buf);
 			break;
 		case COP_AWCAP_TYPE_AUDIO_INPUT:
-			printf(" %s [shape=box,style=filled,fillcolor=\""
-			    "#ff8888\"];\n", buf);
+			printf(" %s [label=\"%s\\naudio input\",shape=box,style=filled,fillcolor=\""
+			    "#ff8888\"];\n", buf, buf);
 			break;
 		case COP_AWCAP_TYPE_AUDIO_MIXER:
-			printf(" %s [shape=invhouse];\n", buf);
+			printf(" %s [label=\"%s\\naudio mixer\","
+			    "shape=invhouse];\n", buf, buf);
 			break;
 		case COP_AWCAP_TYPE_AUDIO_SELECTOR:
-			printf(" %s [shape=invtrapezium];\n", buf);
+			printf(" %s [label=\"%s\\naudio selector\","
+			    "shape=invtrapezium];\n", buf, buf);
 			break;
 		case COP_AWCAP_TYPE_PIN_COMPLEX:
 			printf(" %s [label=\"%s\\ndevice=%s\",style=filled",
@@ -131,14 +133,30 @@
 			    pin_devices[COP_CFG_DEFAULT_DEVICE(config)]);
 			if (cap & COP_PINCAP_OUTPUT_CAPABLE &&
 			    cap & COP_PINCAP_INPUT_CAPABLE)
-				printf(",shape=doublecircle,fillcolor=\""
-				    "#ffff88\"];\n");
+				puts(",shape=doublecircle,fillcolor=\""
+				    "#ffff88\"];");
 			else if (cap & COP_PINCAP_OUTPUT_CAPABLE)
-				printf(",shape=circle,fillcolor=\"#88ff88\"];\n");
+				puts(",shape=circle,fillcolor=\"#88ff88\"];");
 			else if (cap & COP_PINCAP_INPUT_CAPABLE)
-				printf(",shape=circle,fillcolor=\"#ff8888\"];\n");
+				puts(",shape=circle,fillcolor=\"#ff8888\"];");
 			else
-				printf(",shape=circle,fillcolor=\"#888888\"];\n");
+				puts(",shape=circle,fillcolor=\"#888888\"];");
+			break;
+		case COP_AWCAP_TYPE_POWER_WIDGET:
+			printf(" %s [label=\"%s\\npower widget\","
+			    "shape=box];\n", buf, buf);
+			break;
+		case COP_AWCAP_TYPE_VOLUME_KNOB:
+			printf(" %s [label=\"%s\\nvolume knob\","
+			    "shape=box];\n", buf, buf);
+			break;
+		case COP_AWCAP_TYPE_BEEP_GENERATOR:
+			printf(" %s [label=\"%s\\nbeep generator\","
+			    "shape=box];\n", buf, buf);
+			break;
+		case COP_AWCAP_TYPE_VENDOR_DEFINED:
+			printf(" %s [label=\"%s\\nvendor defined\","
+			    "shape=box];\n", buf, buf);
 			break;
 		}
 		connlist = prop_dictionary_get(response, "connlist");