X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=sound%2Fpci%2Fhda%2Fhda_proc.c;h=c39af986bff17dac41abad79090244f7f60b88a1;hb=c4dc5071859bf666a5a9d6565f16c51a261a88b7;hp=35a630d1770f80a2d5b62198bb6685f50069aa6c;hpb=4f4ae0d42680889c62db4e1f3e6b4aa7787a7257;p=mv-sheeva.git diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index 35a630d1770..c39af986bff 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c @@ -216,7 +216,7 @@ static void print_pin_caps(struct snd_info_buffer *buffer, unsigned int caps, val; caps = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP); - snd_iprintf(buffer, " Pincap 0x08%x:", caps); + snd_iprintf(buffer, " Pincap 0x%08x:", caps); if (caps & AC_PINCAP_IN) snd_iprintf(buffer, " IN"); if (caps & AC_PINCAP_OUT) @@ -229,8 +229,13 @@ static void print_pin_caps(struct snd_info_buffer *buffer, snd_iprintf(buffer, " Detect"); if (caps & AC_PINCAP_BALANCE) snd_iprintf(buffer, " Balanced"); - if (caps & AC_PINCAP_LR_SWAP) - snd_iprintf(buffer, " R/L"); + if (caps & AC_PINCAP_HDMI) { + /* Realtek uses this bit as a different meaning */ + if ((codec->vendor_id >> 16) == 0x10ec) + snd_iprintf(buffer, " R/L"); + else + snd_iprintf(buffer, " HDMI"); + } if (caps & AC_PINCAP_TRIG_REQ) snd_iprintf(buffer, " Trigger"); if (caps & AC_PINCAP_IMP_SENSE) @@ -366,8 +371,6 @@ static void print_digital_conv(struct snd_info_buffer *buffer, { unsigned int digi1 = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_DIGI_CONVERT_1, 0); - unsigned int digi2 = snd_hda_codec_read(codec, nid, 0, - AC_VERB_GET_DIGI_CONVERT_2, 0); snd_iprintf(buffer, " Digital:"); if (digi1 & AC_DIG1_ENABLE) snd_iprintf(buffer, " Enabled"); @@ -386,7 +389,8 @@ static void print_digital_conv(struct snd_info_buffer *buffer, if (digi1 & AC_DIG1_LEVEL) snd_iprintf(buffer, " GenLevel"); snd_iprintf(buffer, "\n"); - snd_iprintf(buffer, " Digital category: 0x%x\n", digi2 & AC_DIG2_CC); + snd_iprintf(buffer, " Digital category: 0x%x\n", + (digi1 >> 8) & AC_DIG2_CC); } static const char *get_pwr_state(u32 state) @@ -479,6 +483,8 @@ static void print_gpio(struct snd_info_buffer *buffer, (gpio & AC_GPIO_UNSOLICITED) ? 1 : 0, (gpio & AC_GPIO_WAKE) ? 1 : 0); max = gpio & AC_GPIO_IO_COUNT; + if (!max || max > 8) + return; enable = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_GPIO_MASK, 0); direction = snd_hda_codec_read(codec, nid, 0, @@ -553,9 +559,15 @@ static void print_codec_info(struct snd_info_entry *entry, snd_iprintf(buffer, "Node 0x%02x [%s] wcaps 0x%x:", nid, get_wid_type_name(wid_type), wid_caps); - if (wid_caps & AC_WCAP_STEREO) - snd_iprintf(buffer, " Stereo"); - else + if (wid_caps & AC_WCAP_STEREO) { + unsigned int chans; + chans = (wid_caps & AC_WCAP_CHAN_CNT_EXT) >> 13; + chans = ((chans << 1) | 1) + 1; + if (chans == 2) + snd_iprintf(buffer, " Stereo"); + else + snd_iprintf(buffer, " %d-Channels", chans); + } else snd_iprintf(buffer, " Mono"); if (wid_caps & AC_WCAP_DIGITAL) snd_iprintf(buffer, " Digital"); @@ -567,6 +579,8 @@ static void print_codec_info(struct snd_info_entry *entry, snd_iprintf(buffer, " Stripe"); if (wid_caps & AC_WCAP_LR_SWAP) snd_iprintf(buffer, " R/L"); + if (wid_caps & AC_WCAP_CP_CAPS) + snd_iprintf(buffer, " CP"); snd_iprintf(buffer, "\n"); /* volume knob is a special widget that always have connection @@ -584,7 +598,8 @@ static void print_codec_info(struct snd_info_entry *entry, print_amp_caps(buffer, codec, nid, HDA_INPUT); snd_iprintf(buffer, " Amp-In vals: "); print_amp_vals(buffer, codec, nid, HDA_INPUT, - wid_caps & AC_WCAP_STEREO, conn_len); + wid_caps & AC_WCAP_STEREO, + wid_type == AC_WID_PIN ? 1 : conn_len); } if (wid_caps & AC_WCAP_OUT_AMP) { snd_iprintf(buffer, " Amp-Out caps: ");