diff options
author | Mengdong Lin <mengdong.lin@intel.com> | 2013-08-26 21:35:31 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-08-27 06:15:17 -0400 |
commit | 7a624ea56222fc6f6e3ccd135efedc195ba0b28d (patch) | |
tree | 6501398d8e28348aa039cec3417c066b54fea006 /sound/pci/hda | |
parent | f1aa06847506d5b88f5eb41fae6a24a7128097e7 (diff) |
ALSA: hda - add device list & select info of display pins to codec proc file
If a display codec supports multi-stream transport on the pins, the pin's
device list length and device entries will be exposed to codec proc file.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/hda_proc.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index 9760f001916d..a8cb22eec89e 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c | |||
@@ -582,6 +582,36 @@ static void print_gpio(struct snd_info_buffer *buffer, | |||
582 | print_nid_array(buffer, codec, nid, &codec->nids); | 582 | print_nid_array(buffer, codec, nid, &codec->nids); |
583 | } | 583 | } |
584 | 584 | ||
585 | static void print_device_list(struct snd_info_buffer *buffer, | ||
586 | struct hda_codec *codec, hda_nid_t nid) | ||
587 | { | ||
588 | int i, curr = -1; | ||
589 | u8 dev_list[AC_MAX_DEV_LIST_LEN]; | ||
590 | int devlist_len; | ||
591 | |||
592 | devlist_len = snd_hda_get_devices(codec, nid, dev_list, | ||
593 | AC_MAX_DEV_LIST_LEN); | ||
594 | snd_iprintf(buffer, " Devices: %d\n", devlist_len); | ||
595 | if (devlist_len <= 0) | ||
596 | return; | ||
597 | |||
598 | curr = snd_hda_codec_read(codec, nid, 0, | ||
599 | AC_VERB_GET_DEVICE_SEL, 0); | ||
600 | |||
601 | for (i = 0; i < devlist_len; i++) { | ||
602 | if (i == curr) | ||
603 | snd_iprintf(buffer, " *"); | ||
604 | else | ||
605 | snd_iprintf(buffer, " "); | ||
606 | |||
607 | snd_iprintf(buffer, | ||
608 | "Dev %02d: PD = %d, ELDV = %d, IA = %d\n", i, | ||
609 | !!(dev_list[i] & AC_DE_PD), | ||
610 | !!(dev_list[i] & AC_DE_ELDV), | ||
611 | !!(dev_list[i] & AC_DE_IA)); | ||
612 | } | ||
613 | } | ||
614 | |||
585 | static void print_codec_info(struct snd_info_entry *entry, | 615 | static void print_codec_info(struct snd_info_entry *entry, |
586 | struct snd_info_buffer *buffer) | 616 | struct snd_info_buffer *buffer) |
587 | { | 617 | { |
@@ -751,6 +781,9 @@ static void print_codec_info(struct snd_info_entry *entry, | |||
751 | (wid_caps & AC_WCAP_DELAY) >> | 781 | (wid_caps & AC_WCAP_DELAY) >> |
752 | AC_WCAP_DELAY_SHIFT); | 782 | AC_WCAP_DELAY_SHIFT); |
753 | 783 | ||
784 | if (wid_type == AC_WID_PIN && codec->dp_mst) | ||
785 | print_device_list(buffer, codec, nid); | ||
786 | |||
754 | if (wid_caps & AC_WCAP_CONN_LIST) | 787 | if (wid_caps & AC_WCAP_CONN_LIST) |
755 | print_conn_list(buffer, codec, nid, wid_type, | 788 | print_conn_list(buffer, codec, nid, wid_type, |
756 | conn, conn_len); | 789 | conn, conn_len); |