diff options
author | Pascal de Bruijn <pascal@unilogicnetworks.net> | 2009-03-23 06:15:59 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-03-23 06:55:36 -0400 |
commit | 234b4346a064f8a2a488da10b3c1e640fb778a17 (patch) | |
tree | 2623fc41ec71072bfe53269f5a7a6d4db05c6651 /sound/pci/hda/hda_codec.c | |
parent | c9840cf4cf12a4ec4fe3c4db3c28f638d06e942b (diff) |
ALSA: hda - Add function id to proc output
This patch does two things:
Output Intel HDA Function Id in /proc/asound/cardX/codec#X
Align Vendor/Subsystem/Revision Ids to 8 characters, front-padded with zeros
Before:
Vendor Id: 0x11d41884
Subsystem Id: 0x103c281a
Revision Id: 0x100100
After:
Function Id: 0x1
Vendor Id: 0x11d41884
Subsystem Id: 0x103c281a
Revision Id: 0x0100100
As report on the Kernel Bugzilla #12888
Signed-off-by: Pascal de Bruijn <pascal@unilogicnetworks.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index b90a2400f53d..1b5575ecb0a4 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -647,9 +647,9 @@ static void /*__devinit*/ setup_fg_nodes(struct hda_codec *codec) | |||
647 | 647 | ||
648 | total_nodes = snd_hda_get_sub_nodes(codec, AC_NODE_ROOT, &nid); | 648 | total_nodes = snd_hda_get_sub_nodes(codec, AC_NODE_ROOT, &nid); |
649 | for (i = 0; i < total_nodes; i++, nid++) { | 649 | for (i = 0; i < total_nodes; i++, nid++) { |
650 | unsigned int func; | 650 | codec->function_id = snd_hda_param_read(codec, nid, |
651 | func = snd_hda_param_read(codec, nid, AC_PAR_FUNCTION_TYPE); | 651 | AC_PAR_FUNCTION_TYPE) & 0xff; |
652 | switch (func & 0xff) { | 652 | switch (codec->function_id) { |
653 | case AC_GRP_AUDIO_FUNCTION: | 653 | case AC_GRP_AUDIO_FUNCTION: |
654 | codec->afg = nid; | 654 | codec->afg = nid; |
655 | break; | 655 | break; |