diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-10-11 09:05:54 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-11-04 07:18:29 -0500 |
commit | 86284e458b48ffb6f9849673880f8342dee5b76a (patch) | |
tree | 02e6af9a1522ab520b69250bd296e3649540989c /sound | |
parent | 93b9f426374a07d46f582fdf284e4e26d8fe9756 (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')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 7 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.h | 2 |
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, | |||
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, |
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 { | |||
79 | #define AC_VERB_GET_GPIO_MASK 0x0f16 | 79 | #define AC_VERB_GET_GPIO_MASK 0x0f16 |
80 | #define AC_VERB_GET_GPIO_DIRECTION 0x0f17 | 80 | #define AC_VERB_GET_GPIO_DIRECTION 0x0f17 |
81 | #define AC_VERB_GET_CONFIG_DEFAULT 0x0f1c | 81 | #define AC_VERB_GET_CONFIG_DEFAULT 0x0f1c |
82 | /* f20: AFG/MFG */ | ||
83 | #define AC_VERB_GET_SUBSYSTEM_ID 0x0f20 | ||
82 | 84 | ||
83 | /* | 85 | /* |
84 | * SET verbs | 86 | * SET verbs |