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>
This commit is contained in:
Pascal de Bruijn
2009-03-23 11:15:59 +01:00
committed by Takashi Iwai
parent c9840cf4cf
commit 234b4346a0
3 changed files with 7 additions and 5 deletions

View File

@@ -647,9 +647,9 @@ static void /*__devinit*/ setup_fg_nodes(struct hda_codec *codec)
total_nodes = snd_hda_get_sub_nodes(codec, AC_NODE_ROOT, &nid);
for (i = 0; i < total_nodes; i++, nid++) {
unsigned int func;
func = snd_hda_param_read(codec, nid, AC_PAR_FUNCTION_TYPE);
switch (func & 0xff) {
codec->function_id = snd_hda_param_read(codec, nid,
AC_PAR_FUNCTION_TYPE) & 0xff;
switch (codec->function_id) {
case AC_GRP_AUDIO_FUNCTION:
codec->afg = nid;
break;