diff options
author | ChenLi Tien <cltien@cmedia.com.tw> | 2005-03-24 06:02:54 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-05-29 03:00:14 -0400 |
commit | c301098233bdbaae369bfdd98207db916df8cef2 (patch) | |
tree | e5a3a8cb853cd3707ddc0ad552ef7fad7c634205 /sound/pci/hda/hda_proc.c | |
parent | 94f19c9a6da1fd3a5958f1a0b44aa340f2596a5b (diff) |
[ALSA] Show currectly selected widget in proc_read for hda driver
HDA generic 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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_proc.c')
-rw-r--r-- | sound/pci/hda/hda_proc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index 4d5db7faad8d..8c703ff056f4 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c | |||
@@ -266,13 +266,19 @@ static void print_codec_info(snd_info_entry_t *entry, snd_info_buffer_t *buffer) | |||
266 | 266 | ||
267 | if (wid_caps & AC_WCAP_CONN_LIST) { | 267 | if (wid_caps & AC_WCAP_CONN_LIST) { |
268 | hda_nid_t conn[HDA_MAX_CONNECTIONS]; | 268 | hda_nid_t conn[HDA_MAX_CONNECTIONS]; |
269 | int c, conn_len; | 269 | int c, conn_len, curr = -1; |
270 | conn_len = snd_hda_get_connections(codec, nid, conn, | 270 | conn_len = snd_hda_get_connections(codec, nid, conn, |
271 | HDA_MAX_CONNECTIONS); | 271 | HDA_MAX_CONNECTIONS); |
272 | if (conn_len > 1 && wid_type != AC_WID_AUD_MIX) | ||
273 | curr = snd_hda_codec_read(codec, nid, 0, | ||
274 | AC_VERB_GET_CONNECT_SEL, 0); | ||
272 | snd_iprintf(buffer, " Connection: %d\n", conn_len); | 275 | snd_iprintf(buffer, " Connection: %d\n", conn_len); |
273 | snd_iprintf(buffer, " "); | 276 | snd_iprintf(buffer, " "); |
274 | for (c = 0; c < conn_len; c++) | 277 | for (c = 0; c < conn_len; c++) { |
275 | snd_iprintf(buffer, " 0x%02x", conn[c]); | 278 | snd_iprintf(buffer, " 0x%02x", conn[c]); |
279 | if (c == curr) | ||
280 | snd_iprintf(buffer, "*"); | ||
281 | } | ||
276 | snd_iprintf(buffer, "\n"); | 282 | snd_iprintf(buffer, "\n"); |
277 | } | 283 | } |
278 | } | 284 | } |