summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-10-11 13:05:54 (GMT)
committerJaroslav Kysela <perex@suse.cz>2005-11-04 12:18:29 (GMT)
commit86284e458b48ffb6f9849673880f8342dee5b76a (patch)
tree02e6af9a1522ab520b69250bd296e3649540989c /sound/pci/hda/hda_codec.c
parent93b9f426374a07d46f582fdf284e4e26d8fe9756 (diff)
downloadlinux-fsl-qoriq-86284e458b48ffb6f9849673880f8342dee5b76a.tar.xz
[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/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 3815403..57b5a0a 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,