alsa: Intel HDA output and align Ids.
PATCH 1/1 alsa: Intel HDA output and align Ids.
Output Intel HDA Function Id in /proc/asound/cardX/codec#X
Align Vendor/Subsystem/Revision Ids to 8 characters, front-padded with zeros
As submitted to Kernel Bugzilla #12888
sound/pci/hda/hda_codec.c +2 -3
@@ -519,9 +519,8 @@ static void __devinit setup_fg_nodes(str 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 ;
sound/pci/hda/hda_codec.h +1 -0
@@ -693,6 +693,7 @@ struct hda_codec {hda_nid_t mfg;/* MFG node id */ /* ids */ +u32 function_id;u32 vendor_id;u32 subsystem_id;u32 revision_id;
sound/pci/hda/hda_proc.c +4 -3
@@ -520,9 +520,10 @@ static void print_codec_info(struct snd_snd_hda_get_codec_name (codec, buf,sizeof (buf));snd_iprintf (buffer,"Codec: %s\n" , buf);snd_iprintf (buffer,"Address: %d\n" , codec->addr); -snd_iprintf (buffer,"Vendor Id: 0x%x\n" , codec->vendor_id); -snd_iprintf (buffer,"Subsystem Id: 0x%x\n" , codec->subsystem_id); -snd_iprintf (buffer,"Revision Id: 0x%x\n" , codec->revision_id); +snd_iprintf (buffer,"Function Id: 0x%x\n" , codec->function_id); +snd_iprintf (buffer,"Vendor Id: 0x%08x\n" , codec->vendor_id); +snd_iprintf (buffer,"Subsystem Id: 0x%08x\n" , codec->subsystem_id); +snd_iprintf (buffer,"Revision Id: 0x%08x\n" , codec->revision_id);if (codec->mfg)snd_iprintf (buffer,"Modem Function Group: 0x%x\n" , codec->mfg);
At Fri, 20 Mar 2009 14:00:56 +0100,
Quoted 7 lines · Pascal de Bruijn | Unilogic Networks B.V.
Output Intel HDA Function Id in /proc/asound/cardX/codec#X
Align Vendor/Subsystem/Revision Ids to 8 characters, front-padded with zerosAs submitted to Kernel Bugzilla #12888
Signed-off-by Pascal de Bruijn <[email protected]>
Thanks for the patch.
The changes look OK, but could you make a patch against the latest 2.6.29-rc tree, and fix a coding issue reported by checkpatch.pl?
Also, a bit more explanatory subject would be helpful...
Takashi
Quoted 53 lines
diff -Nurp
linux-2.6.28.8-orig/sound/pci/hda/hda_codec.clinux-2.6.28.8-func/sound/pci/hda/hda_codec.csound/pci/hda/hda_codec.c +2
-3@@ -519,9 +519,8 @@ static void __devinit setup_fg_nodes(str 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 ;diff -Nurp
linux-2.6.28.8-orig/sound/pci/hda/hda_codec.hlinux-2.6.28.8-func/sound/pci/hda/hda_codec.hsound/pci/hda/hda_codec.h +1
-0@@ -693,6 +693,7 @@ struct hda_codec {hda_nid_t mfg;/* MFG node id */ /* ids */ +u32 function_id;u32 vendor_id;u32 subsystem_id;u32 revision_id;diff -Nurp
linux-2.6.28.8-orig/sound/pci/hda/hda_proc.clinux-2.6.28.8-func/sound/pci/hda/hda_proc.csound/pci/hda/hda_proc.c +4
-4@@ -520,9 +520,10 @@ static void print_codec_info(struct snd_snd_hda_get_codec_name (codec, buf,sizeof (buf));snd_iprintf (buffer,"Codec: %s\n" , buf);snd_iprintf (buffer,"Address: %d\n" , codec->addr); -snd_iprintf (buffer,"Vendor Id: 0x%x\n" , codec->vendor_id); -snd_iprintf (buffer,"Subsystem Id: 0x%x\n" , codec->subsystem_id); -snd_iprintf (buffer,"Revision Id: 0x%x\n" , codec->revision_id); +snd_iprintf (buffer,"Function Id: 0x%x\n" , codec->function_id); +snd_iprintf (buffer,"Vendor Id: 0x%08x\n" , codec->vendor_id); +snd_iprintf (buffer,"Subsystem Id: 0x%08x\n" , codec->subsystem_id); +snd_iprintf (buffer,"Revision Id: 0x%08x\n" , codec->revision_id);if (codec->mfg)snd_iprintf (buffer,"Modem Function Group: 0x%x\n" , codec->mfg); --To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/