]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.drivers/alsa-hda-proc-fix
Imported linux-2.6.27.39 suse/xen patches.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.drivers / alsa-hda-proc-fix
CommitLineData
2cb7cef9
BS
1From: Takashi Iwai <tiwai@suse.de>
2Subject: ALSA: hda - Misc fixes on proc output
3Patch-mainline: 2.6.28-rc1
4References:
5
6Misc fixes and additions for codec#* proc output.
7
8Signed-off-by: Takashi Iwai <tiwai@suse.de>
9
10---
11---
12 sound/pci/hda/hda_proc.c | 21 ++++++++++++++++++---
13 1 file changed, 18 insertions(+), 3 deletions(-)
14
15--- a/sound/pci/hda/hda_proc.c
16+++ b/sound/pci/hda/hda_proc.c
17@@ -229,6 +229,13 @@ static void print_pin_caps(struct snd_in
18 snd_iprintf(buffer, " Detect");
19 if (caps & AC_PINCAP_BALANCE)
20 snd_iprintf(buffer, " Balanced");
21+ if (caps & AC_PINCAP_HDMI) {
22+ /* Realtek uses this bit as a different meaning */
23+ if ((codec->vendor_id >> 16) == 0x10ec)
24+ snd_iprintf(buffer, " R/L");
25+ else
26+ snd_iprintf(buffer, " HDMI");
27+ }
28 if (caps & AC_PINCAP_LR_SWAP)
29 snd_iprintf(buffer, " R/L");
30 if (caps & AC_PINCAP_TRIG_REQ)
31@@ -552,9 +559,15 @@ static void print_codec_info(struct snd_
32
33 snd_iprintf(buffer, "Node 0x%02x [%s] wcaps 0x%x:", nid,
34 get_wid_type_name(wid_type), wid_caps);
35- if (wid_caps & AC_WCAP_STEREO)
36- snd_iprintf(buffer, " Stereo");
37- else
38+ if (wid_caps & AC_WCAP_STEREO) {
39+ unsigned int chans;
40+ chans = (wid_caps & AC_WCAP_CHAN_CNT_EXT) >> 13;
41+ chans = ((chans << 1) | 1) + 1;
42+ if (chans == 2)
43+ snd_iprintf(buffer, " Stereo");
44+ else
45+ snd_iprintf(buffer, " %d-Channels", chans);
46+ } else
47 snd_iprintf(buffer, " Mono");
48 if (wid_caps & AC_WCAP_DIGITAL)
49 snd_iprintf(buffer, " Digital");
50@@ -566,6 +579,8 @@ static void print_codec_info(struct snd_
51 snd_iprintf(buffer, " Stripe");
52 if (wid_caps & AC_WCAP_LR_SWAP)
53 snd_iprintf(buffer, " R/L");
54+ if (wid_caps & AC_WCAP_CP_CAPS)
55+ snd_iprintf(buffer, " CP");
56 snd_iprintf(buffer, "\n");
57
58 /* volume knob is a special widget that always have connection