diff options
Diffstat (limited to 'sound/pci/hda/hda_proc.c')
-rw-r--r-- | sound/pci/hda/hda_proc.c | 55 |
1 files changed, 40 insertions, 15 deletions
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index f5b783ce450d..f465cff28041 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c | |||
@@ -46,6 +46,41 @@ static const char *get_wid_type_name(unsigned int wid_value) | |||
46 | return "UNKNOWN Widget"; | 46 | return "UNKNOWN Widget"; |
47 | } | 47 | } |
48 | 48 | ||
49 | static void print_nid_mixers(struct snd_info_buffer *buffer, | ||
50 | struct hda_codec *codec, hda_nid_t nid) | ||
51 | { | ||
52 | int i; | ||
53 | struct hda_nid_item *items = codec->mixers.list; | ||
54 | struct snd_kcontrol *kctl; | ||
55 | for (i = 0; i < codec->mixers.used; i++) { | ||
56 | if (items[i].nid == nid) { | ||
57 | kctl = items[i].kctl; | ||
58 | snd_iprintf(buffer, | ||
59 | " Control: name=\"%s\", index=%i, device=%i\n", | ||
60 | kctl->id.name, kctl->id.index, kctl->id.device); | ||
61 | } | ||
62 | } | ||
63 | } | ||
64 | |||
65 | static void print_nid_pcms(struct snd_info_buffer *buffer, | ||
66 | struct hda_codec *codec, hda_nid_t nid) | ||
67 | { | ||
68 | int pcm, type; | ||
69 | struct hda_pcm *cpcm; | ||
70 | for (pcm = 0; pcm < codec->num_pcms; pcm++) { | ||
71 | cpcm = &codec->pcm_info[pcm]; | ||
72 | for (type = 0; type < 2; type++) { | ||
73 | if (cpcm->stream[type].nid != nid || cpcm->pcm == NULL) | ||
74 | continue; | ||
75 | snd_iprintf(buffer, " Device: name=\"%s\", " | ||
76 | "type=\"%s\", device=%i\n", | ||
77 | cpcm->name, | ||
78 | snd_hda_pcm_type_name[cpcm->pcm_type], | ||
79 | cpcm->pcm->device); | ||
80 | } | ||
81 | } | ||
82 | } | ||
83 | |||
49 | static void print_amp_caps(struct snd_info_buffer *buffer, | 84 | static void print_amp_caps(struct snd_info_buffer *buffer, |
50 | struct hda_codec *codec, hda_nid_t nid, int dir) | 85 | struct hda_codec *codec, hda_nid_t nid, int dir) |
51 | { | 86 | { |
@@ -309,21 +344,7 @@ static void print_audio_io(struct snd_info_buffer *buffer, | |||
309 | struct hda_codec *codec, hda_nid_t nid, | 344 | struct hda_codec *codec, hda_nid_t nid, |
310 | unsigned int wid_type) | 345 | unsigned int wid_type) |
311 | { | 346 | { |
312 | int pcm, conv; | 347 | int conv = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0); |
313 | for (pcm = 0; pcm < codec->num_pcms; pcm++) { | ||
314 | int type; | ||
315 | struct hda_pcm *cpcm = &codec->pcm_info[pcm]; | ||
316 | for (type = 0; type < 2; type++) { | ||
317 | if (cpcm->stream[type].nid != nid || cpcm->pcm == NULL) | ||
318 | continue; | ||
319 | snd_iprintf(buffer, " Device: name=\"%s\", " | ||
320 | "type=\"%s\", device=%i\n", | ||
321 | cpcm->name, | ||
322 | snd_hda_pcm_type_name[cpcm->pcm_type], | ||
323 | cpcm->pcm->device); | ||
324 | } | ||
325 | } | ||
326 | conv = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0); | ||
327 | snd_iprintf(buffer, | 348 | snd_iprintf(buffer, |
328 | " Converter: stream=%d, channel=%d\n", | 349 | " Converter: stream=%d, channel=%d\n", |
329 | (conv & AC_CONV_STREAM) >> AC_CONV_STREAM_SHIFT, | 350 | (conv & AC_CONV_STREAM) >> AC_CONV_STREAM_SHIFT, |
@@ -471,6 +492,7 @@ static void print_gpio(struct snd_info_buffer *buffer, | |||
471 | (data & (1<<i)) ? 1 : 0, | 492 | (data & (1<<i)) ? 1 : 0, |
472 | (unsol & (1<<i)) ? 1 : 0); | 493 | (unsol & (1<<i)) ? 1 : 0); |
473 | /* FIXME: add GPO and GPI pin information */ | 494 | /* FIXME: add GPO and GPI pin information */ |
495 | print_nid_mixers(buffer, codec, nid); | ||
474 | } | 496 | } |
475 | 497 | ||
476 | static void print_codec_info(struct snd_info_entry *entry, | 498 | static void print_codec_info(struct snd_info_entry *entry, |
@@ -550,6 +572,9 @@ static void print_codec_info(struct snd_info_entry *entry, | |||
550 | snd_iprintf(buffer, " CP"); | 572 | snd_iprintf(buffer, " CP"); |
551 | snd_iprintf(buffer, "\n"); | 573 | snd_iprintf(buffer, "\n"); |
552 | 574 | ||
575 | print_nid_mixers(buffer, codec, nid); | ||
576 | print_nid_pcms(buffer, codec, nid); | ||
577 | |||
553 | /* volume knob is a special widget that always have connection | 578 | /* volume knob is a special widget that always have connection |
554 | * list | 579 | * list |
555 | */ | 580 | */ |