---------------------
PatchSet 3074 
Date: 2005/03/24 12:02:54
Author: tiwai
Branch: HEAD
Tag: (none) 
Log:
Summary: Show currectly selected widget in proc_read for hda driver

During debugging for cm9880 multi-channel playback, I added the * after
the currently selected widget, mixer widget doesn't need this but other
3 widget types need it.

Signed-off-by: ChenLi Tien <cltien@cmedia.com.tw>

Members: 
	pci/hda/hda_proc.c:1.1->1.2 

Index: /sound/pci/hda/hda_proc.c
diff -u /sound/pci/hda/hda_proc.c.old /sound/pci/hda/hda_proc.c
--- /sound/pci/hda/hda_proc.c.old	Thu Jan 20 07:02:28 2005
+++ /sound/pci/hda/hda_proc.c	Thu Mar 24 04:02:54 2005
@@ -266,13 +266,19 @@
 
 		if (wid_caps & AC_WCAP_CONN_LIST) {
 			hda_nid_t conn[HDA_MAX_CONNECTIONS];
-			int c, conn_len;
+			int c, conn_len, curr = -1;
 			conn_len = snd_hda_get_connections(codec, nid, conn,
 							   HDA_MAX_CONNECTIONS);
+			if (conn_len > 1 && wid_type != AC_WID_AUD_MIX)
+				curr = snd_hda_codec_read(codec, nid, 0,
+					AC_VERB_GET_CONNECT_SEL, 0);
 			snd_iprintf(buffer, "  Connection: %d\n", conn_len);
 			snd_iprintf(buffer, "    ");
-			for (c = 0; c < conn_len; c++)
+			for (c = 0; c < conn_len; c++) {
 				snd_iprintf(buffer, " 0x%02x", conn[c]);
+				if (c == curr)
+					snd_iprintf(buffer, "*");
+			}
 			snd_iprintf(buffer, "\n");
 		}
 	}