aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-08-05 05:17:04 -0400
committerTakashi Iwai <tiwai@suse.de>2010-08-05 05:17:04 -0400
commit74bf40f0793fed9e01eb6164c2ce63e8c27ca205 (patch)
treef41312c0943978842ac258873b29da04d72d0625 /sound/pci/hda
parente71981343ad29b5d929f82ac56c0b27b8ea0e540 (diff)
parentc4685849b4d725ab80cd29f5e09f5f128b4724b5 (diff)
Merge branch 'topic/misc' into for-linus
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_codec.c10
-rw-r--r--sound/pci/hda/hda_codec.h5
-rw-r--r--sound/pci/hda/hda_proc.c7
3 files changed, 16 insertions, 6 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 05e8995f9aec..a7802b99436c 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -733,15 +733,17 @@ static void /*__devinit*/ setup_fg_nodes(struct hda_codec *codec)
733 total_nodes = snd_hda_get_sub_nodes(codec, AC_NODE_ROOT, &nid); 733 total_nodes = snd_hda_get_sub_nodes(codec, AC_NODE_ROOT, &nid);
734 for (i = 0; i < total_nodes; i++, nid++) { 734 for (i = 0; i < total_nodes; i++, nid++) {
735 function_id = snd_hda_param_read(codec, nid, 735 function_id = snd_hda_param_read(codec, nid,
736 AC_PAR_FUNCTION_TYPE) & 0xff; 736 AC_PAR_FUNCTION_TYPE);
737 switch (function_id) { 737 switch (function_id & 0xff) {
738 case AC_GRP_AUDIO_FUNCTION: 738 case AC_GRP_AUDIO_FUNCTION:
739 codec->afg = nid; 739 codec->afg = nid;
740 codec->function_id = function_id; 740 codec->afg_function_id = function_id & 0xff;
741 codec->afg_unsol = (function_id >> 8) & 1;
741 break; 742 break;
742 case AC_GRP_MODEM_FUNCTION: 743 case AC_GRP_MODEM_FUNCTION:
743 codec->mfg = nid; 744 codec->mfg = nid;
744 codec->function_id = function_id; 745 codec->mfg_function_id = function_id & 0xff;
746 codec->mfg_unsol = (function_id >> 8) & 1;
745 break; 747 break;
746 default: 748 default:
747 break; 749 break;
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 46f75bccf0d3..0328cf55cdba 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -784,7 +784,10 @@ struct hda_codec {
784 hda_nid_t mfg; /* MFG node id */ 784 hda_nid_t mfg; /* MFG node id */
785 785
786 /* ids */ 786 /* ids */
787 u32 function_id; 787 u8 afg_function_id;
788 u8 mfg_function_id;
789 u8 afg_unsol;
790 u8 mfg_unsol;
788 u32 vendor_id; 791 u32 vendor_id;
789 u32 subsystem_id; 792 u32 subsystem_id;
790 u32 revision_id; 793 u32 revision_id;
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index f97d35de66c4..f025200f2a62 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -557,7 +557,12 @@ static void print_codec_info(struct snd_info_entry *entry,
557 else 557 else
558 snd_iprintf(buffer, "Not Set\n"); 558 snd_iprintf(buffer, "Not Set\n");
559 snd_iprintf(buffer, "Address: %d\n", codec->addr); 559 snd_iprintf(buffer, "Address: %d\n", codec->addr);
560 snd_iprintf(buffer, "Function Id: 0x%x\n", codec->function_id); 560 if (codec->afg)
561 snd_iprintf(buffer, "AFG Function Id: 0x%x (unsol %u)\n",
562 codec->afg_function_id, codec->afg_unsol);
563 if (codec->mfg)
564 snd_iprintf(buffer, "MFG Function Id: 0x%x (unsol %u)\n",
565 codec->mfg_function_id, codec->mfg_unsol);
561 snd_iprintf(buffer, "Vendor Id: 0x%08x\n", codec->vendor_id); 566 snd_iprintf(buffer, "Vendor Id: 0x%08x\n", codec->vendor_id);
562 snd_iprintf(buffer, "Subsystem Id: 0x%08x\n", codec->subsystem_id); 567 snd_iprintf(buffer, "Subsystem Id: 0x%08x\n", codec->subsystem_id);
563 snd_iprintf(buffer, "Revision Id: 0x%x\n", codec->revision_id); 568 snd_iprintf(buffer, "Revision Id: 0x%x\n", codec->revision_id);