]> err.no Git - linux-2.6/commitdiff
[ALSA] hda-codec - Get subsystem ID from AFG/MFG
authorTakashi Iwai <tiwai@suse.de>
Tue, 11 Oct 2005 13:05:54 +0000 (15:05 +0200)
committerJaroslav Kysela <perex@suse.cz>
Fri, 4 Nov 2005 12:18:29 +0000 (13:18 +0100)
Modules: HDA Codec driver

Get subsytem ID from AFG/MFG if not obtained from the root node.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_codec.h

index 3815403ed0953249418e2dc86ddf227833cf4970..57b5a0a83c8d8cbe37b6424e8ada08fdd07db664 100644 (file)
@@ -518,6 +518,13 @@ int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr,
                return -ENODEV;
        }
 
+       if (! codec->subsystem_id) {
+               hda_nid_t nid = codec->afg ? codec->afg : codec->mfg;
+               codec->subsystem_id = snd_hda_codec_read(codec, nid, 0,
+                                                        AC_VERB_GET_SUBSYSTEM_ID,
+                                                        0);
+       }
+
        codec->preset = find_codec_preset(codec);
        if (! *bus->card->mixername)
                snd_hda_get_codec_name(codec, bus->card->mixername,
index bb53bcf76742ed1ccc77078e2efb4c2cdc275a40..1179d6cfa82a3ae20a36c03c14cecad07494d3a2 100644 (file)
@@ -79,6 +79,8 @@ enum {
 #define AC_VERB_GET_GPIO_MASK                  0x0f16
 #define AC_VERB_GET_GPIO_DIRECTION             0x0f17
 #define AC_VERB_GET_CONFIG_DEFAULT             0x0f1c
+/* f20: AFG/MFG */
+#define AC_VERB_GET_SUBSYSTEM_ID               0x0f20
 
 /*
  * SET verbs