diff options
author | Jaroslav Kysela <perex@perex.cz> | 2009-11-10 13:53:02 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-11-10 15:06:57 (GMT) |
commit | e3303235209c0496b490e10ab131e72a9568c153 (patch) | |
tree | 6ebac5010679a20afe06fb9362c52f12f6f55a4c /sound/pci/hda/hda_proc.c | |
parent | fb8d1a344dbe963f16249d07eee8415e93f9f3c2 (diff) | |
download | linux-e3303235209c0496b490e10ab131e72a9568c153.tar.xz |
ALSA: hda - proc - show which I/O NID is associated to PCM device
Output something like:
Node 0x02 [Audio Output] wcaps 0x11: Stereo
Device: name="ALC888 Analog", type="Audio", device=0, substream=0
Converter: stream=0, channel=0
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
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 | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index 95f24e4..f5639c2 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c @@ -309,7 +309,21 @@ static void print_audio_io(struct snd_info_buffer *buffer, struct hda_codec *codec, hda_nid_t nid, unsigned int wid_type) { - int conv = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0); + int pcm, conv; + for (pcm = 0; pcm < codec->num_pcms; pcm++) { + int type; + struct hda_pcm *cpcm = &codec->pcm_info[pcm]; + for (type = 0; type < 2; type++) { + if (cpcm->stream[type].nid != nid || cpcm->pcm == NULL) + continue; + snd_iprintf(buffer, " Device: name=\"%s\", type=\"%s\", device=%i, substream=%i\n", + cpcm->name, + snd_hda_pcm_type_name[cpcm->pcm_type], + cpcm->pcm->device, + cpcm->pcm->streams[type].substream->number); + } + } + conv = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0); snd_iprintf(buffer, " Converter: stream=%d, channel=%d\n", (conv & AC_CONV_STREAM) >> AC_CONV_STREAM_SHIFT, |