mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 09:31:14 +00:00
[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>
This commit is contained in:
parent
93b9f42637
commit
86284e458b
2 changed files with 9 additions and 0 deletions
|
@ -518,6 +518,13 @@ int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr,
|
||||||
return -ENODEV;
|
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);
|
codec->preset = find_codec_preset(codec);
|
||||||
if (! *bus->card->mixername)
|
if (! *bus->card->mixername)
|
||||||
snd_hda_get_codec_name(codec, bus->card->mixername,
|
snd_hda_get_codec_name(codec, bus->card->mixername,
|
||||||
|
|
|
@ -79,6 +79,8 @@ enum {
|
||||||
#define AC_VERB_GET_GPIO_MASK 0x0f16
|
#define AC_VERB_GET_GPIO_MASK 0x0f16
|
||||||
#define AC_VERB_GET_GPIO_DIRECTION 0x0f17
|
#define AC_VERB_GET_GPIO_DIRECTION 0x0f17
|
||||||
#define AC_VERB_GET_CONFIG_DEFAULT 0x0f1c
|
#define AC_VERB_GET_CONFIG_DEFAULT 0x0f1c
|
||||||
|
/* f20: AFG/MFG */
|
||||||
|
#define AC_VERB_GET_SUBSYSTEM_ID 0x0f20
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SET verbs
|
* SET verbs
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue