aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-10-11 09:05:54 -0400
committerJaroslav Kysela <perex@suse.cz>2005-11-04 07:18:29 -0500
commit86284e458b48ffb6f9849673880f8342dee5b76a (patch)
tree02e6af9a1522ab520b69250bd296e3649540989c /sound/pci/hda/hda_codec.c
parent93b9f426374a07d46f582fdf284e4e26d8fe9756 (diff)
[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 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,
518 return -ENODEV; 518 return -ENODEV;
519 } 519 }
520 520
521 if (! codec->subsystem_id) {
522 hda_nid_t nid = codec->afg ? codec->afg : codec->mfg;
523 codec->subsystem_id = snd_hda_codec_read(codec, nid, 0,
524 AC_VERB_GET_SUBSYSTEM_ID,
525 0);
526 }
527
521 codec->preset = find_codec_preset(codec); 528 codec->preset = find_codec_preset(codec);
522 if (! *bus->card->mixername) 529 if (! *bus->card->mixername)
523 snd_hda_get_codec_name(codec, bus->card->mixername, 530 snd_hda_get_codec_name(codec, bus->card->mixername,