aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_proc.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-10-26 08:56:36 -0400
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:29:11 -0500
commite97a516701cfc3c4b27444212208884214d10c20 (patch)
tree6eb2c299525129930d88132ba6acd5f57c1a4897 /sound/pci/hda/hda_proc.c
parent040956fabbc16b9ce746a03d2b589052e1771138 (diff)
[ALSA] hda-codec - Show more information in proc file
Show the current EAPD status and volume-knob status in proc file. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/hda/hda_proc.c')
-rw-r--r--sound/pci/hda/hda_proc.c31
1 files changed, 22 insertions, 9 deletions
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index e94944f34ffd..000c6c45011b 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -213,7 +213,7 @@ static void print_pin_caps(struct snd_info_buffer *buffer,
213 "SPDIF In", "Digitial In", "Reserved", "Other" 213 "SPDIF In", "Digitial In", "Reserved", "Other"
214 }; 214 };
215 static char *jack_locations[4] = { "Ext", "Int", "Sep", "Oth" }; 215 static char *jack_locations[4] = { "Ext", "Int", "Sep", "Oth" };
216 unsigned int caps; 216 unsigned int caps, val;
217 217
218 caps = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP); 218 caps = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP);
219 snd_iprintf(buffer, " Pincap 0x08%x:", caps); 219 snd_iprintf(buffer, " Pincap 0x08%x:", caps);
@@ -237,6 +237,11 @@ static void print_pin_caps(struct snd_info_buffer *buffer,
237 snd_iprintf(buffer, " Conn = %s, Color = %s\n", 237 snd_iprintf(buffer, " Conn = %s, Color = %s\n",
238 get_jack_connection(caps), 238 get_jack_connection(caps),
239 get_jack_color(caps)); 239 get_jack_color(caps));
240 if (caps & AC_PINCAP_EAPD) {
241 val = snd_hda_codec_read(codec, nid, 0,
242 AC_VERB_GET_EAPD_BTLENABLE, 0);
243 snd_iprintf(buffer, " EAPD: 0x%x\n", val);
244 }
240} 245}
241 246
242 247
@@ -284,6 +289,7 @@ static void print_codec_info(struct snd_info_entry *entry,
284 (wid_caps & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT; 289 (wid_caps & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT;
285 int conn_len = 0; 290 int conn_len = 0;
286 hda_nid_t conn[HDA_MAX_CONNECTIONS]; 291 hda_nid_t conn[HDA_MAX_CONNECTIONS];
292 unsigned int pinctls;
287 293
288 snd_iprintf(buffer, "Node 0x%02x [%s] wcaps 0x%x:", nid, 294 snd_iprintf(buffer, "Node 0x%02x [%s] wcaps 0x%x:", nid,
289 get_wid_type_name(wid_type), wid_caps); 295 get_wid_type_name(wid_type), wid_caps);
@@ -318,8 +324,8 @@ static void print_codec_info(struct snd_info_entry *entry,
318 wid_caps & AC_WCAP_STEREO, 1); 324 wid_caps & AC_WCAP_STEREO, 1);
319 } 325 }
320 326
321 if (wid_type == AC_WID_PIN) { 327 switch (wid_type) {
322 unsigned int pinctls; 328 case AC_WID_PIN:
323 print_pin_caps(buffer, codec, nid); 329 print_pin_caps(buffer, codec, nid);
324 pinctls = snd_hda_codec_read(codec, nid, 0, 330 pinctls = snd_hda_codec_read(codec, nid, 0,
325 AC_VERB_GET_PIN_WIDGET_CONTROL, 331 AC_VERB_GET_PIN_WIDGET_CONTROL,
@@ -332,12 +338,19 @@ static void print_codec_info(struct snd_info_entry *entry,
332 if (pinctls & AC_PINCTL_HP_EN) 338 if (pinctls & AC_PINCTL_HP_EN)
333 snd_iprintf(buffer, " HP"); 339 snd_iprintf(buffer, " HP");
334 snd_iprintf(buffer, "\n"); 340 snd_iprintf(buffer, "\n");
335 } 341 break;
336 342 case AC_WID_VOL_KNB:
337 if ((wid_type == AC_WID_AUD_OUT || wid_type == AC_WID_AUD_IN) && 343 snd_iprintf(buffer, " Volume-Knob: 0x%x\n",
338 (wid_caps & AC_WCAP_FORMAT_OVRD)) { 344 snd_hda_codec_read(codec, nid, 0,
339 snd_iprintf(buffer, " PCM:\n"); 345 AC_VERB_GET_VOLUME_KNOB_CONTROL, 0));
340 print_pcm_caps(buffer, codec, nid); 346 break;
347 case AC_WID_AUD_OUT:
348 case AC_WID_AUD_IN:
349 if (wid_caps & AC_WCAP_FORMAT_OVRD) {
350 snd_iprintf(buffer, " PCM:\n");
351 print_pcm_caps(buffer, codec, nid);
352 }
353 break;
341 } 354 }
342 355
343 if (wid_caps & AC_WCAP_POWER) 356 if (wid_caps & AC_WCAP_POWER)