diff options
-rw-r--r-- | sound/pci/hda/hda_codec.h | 1 | ||||
-rw-r--r-- | sound/pci/hda/hda_proc.c | 32 |
2 files changed, 24 insertions, 9 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 2bce925d84ef..03315105c904 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -135,6 +135,7 @@ enum { | |||
135 | #define AC_PAR_PROC_CAP 0x10 | 135 | #define AC_PAR_PROC_CAP 0x10 |
136 | #define AC_PAR_GPIO_CAP 0x11 | 136 | #define AC_PAR_GPIO_CAP 0x11 |
137 | #define AC_PAR_AMP_OUT_CAP 0x12 | 137 | #define AC_PAR_AMP_OUT_CAP 0x12 |
138 | #define AC_PAR_VOL_KNB_CAP 0x13 | ||
138 | 139 | ||
139 | /* | 140 | /* |
140 | * AC_VERB_PARAMETERS results (32bit) | 141 | * AC_VERB_PARAMETERS results (32bit) |
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index 000c6c45011b..7df1d16d1469 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c | |||
@@ -305,6 +305,12 @@ static void print_codec_info(struct snd_info_entry *entry, | |||
305 | snd_iprintf(buffer, " Amp-Out"); | 305 | snd_iprintf(buffer, " Amp-Out"); |
306 | snd_iprintf(buffer, "\n"); | 306 | snd_iprintf(buffer, "\n"); |
307 | 307 | ||
308 | /* volume knob is a special widget that always have connection | ||
309 | * list | ||
310 | */ | ||
311 | if (wid_type == AC_WID_VOL_KNB) | ||
312 | wid_caps |= AC_WCAP_CONN_LIST; | ||
313 | |||
308 | if (wid_caps & AC_WCAP_CONN_LIST) | 314 | if (wid_caps & AC_WCAP_CONN_LIST) |
309 | conn_len = snd_hda_get_connections(codec, nid, conn, | 315 | conn_len = snd_hda_get_connections(codec, nid, conn, |
310 | HDA_MAX_CONNECTIONS); | 316 | HDA_MAX_CONNECTIONS); |
@@ -340,9 +346,15 @@ static void print_codec_info(struct snd_info_entry *entry, | |||
340 | snd_iprintf(buffer, "\n"); | 346 | snd_iprintf(buffer, "\n"); |
341 | break; | 347 | break; |
342 | case AC_WID_VOL_KNB: | 348 | case AC_WID_VOL_KNB: |
343 | snd_iprintf(buffer, " Volume-Knob: 0x%x\n", | 349 | pinctls = snd_hda_param_read(codec, nid, |
344 | snd_hda_codec_read(codec, nid, 0, | 350 | AC_PAR_VOL_KNB_CAP); |
345 | AC_VERB_GET_VOLUME_KNOB_CONTROL, 0)); | 351 | snd_iprintf(buffer, " Volume-Knob: delta=%d, " |
352 | "steps=%d, ", | ||
353 | (pinctls >> 7) & 1, pinctls & 0x7f); | ||
354 | pinctls = snd_hda_codec_read(codec, nid, 0, | ||
355 | AC_VERB_GET_VOLUME_KNOB_CONTROL, 0); | ||
356 | snd_iprintf(buffer, "direct=%d, val=%d\n", | ||
357 | (pinctls >> 7) & 1, pinctls & 0x7f); | ||
346 | break; | 358 | break; |
347 | case AC_WID_AUD_OUT: | 359 | case AC_WID_AUD_OUT: |
348 | case AC_WID_AUD_IN: | 360 | case AC_WID_AUD_IN: |
@@ -365,13 +377,15 @@ static void print_codec_info(struct snd_info_entry *entry, | |||
365 | curr = snd_hda_codec_read(codec, nid, 0, | 377 | curr = snd_hda_codec_read(codec, nid, 0, |
366 | AC_VERB_GET_CONNECT_SEL, 0); | 378 | AC_VERB_GET_CONNECT_SEL, 0); |
367 | snd_iprintf(buffer, " Connection: %d\n", conn_len); | 379 | snd_iprintf(buffer, " Connection: %d\n", conn_len); |
368 | snd_iprintf(buffer, " "); | 380 | if (conn_len > 0) { |
369 | for (c = 0; c < conn_len; c++) { | 381 | snd_iprintf(buffer, " "); |
370 | snd_iprintf(buffer, " 0x%02x", conn[c]); | 382 | for (c = 0; c < conn_len; c++) { |
371 | if (c == curr) | 383 | snd_iprintf(buffer, " 0x%02x", conn[c]); |
372 | snd_iprintf(buffer, "*"); | 384 | if (c == curr) |
385 | snd_iprintf(buffer, "*"); | ||
386 | } | ||
387 | snd_iprintf(buffer, "\n"); | ||
373 | } | 388 | } |
374 | snd_iprintf(buffer, "\n"); | ||
375 | } | 389 | } |
376 | } | 390 | } |
377 | snd_hda_power_down(codec); | 391 | snd_hda_power_down(codec); |