summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-10-11 15:05:54 +0200
committerJaroslav Kysela <perex@suse.cz>2005-11-04 13:18:29 +0100
commit86284e458b48ffb6f9849673880f8342dee5b76a (patch)
tree02e6af9a1522ab520b69250bd296e3649540989c /sound
parent93b9f426374a07d46f582fdf284e4e26d8fe9756 (diff)
downloadlinux-86284e458b48ffb6f9849673880f8342dee5b76a.tar.gz
linux-86284e458b48ffb6f9849673880f8342dee5b76a.tar.bz2
linux-86284e458b48ffb6f9849673880f8342dee5b76a.zip
[ALSA] hda-codec - Get subsystem ID from AFG/MFG
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_codec.c7
-rw-r--r--sound/pci/hda/hda_codec.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 3815403ed095..57b5a0a83c8d 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -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,
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index bb53bcf76742..1179d6cfa82a 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -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