aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 0741eda78a5e..9a8adc600a57 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1941,6 +1941,17 @@ static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg,
1941 } 1941 }
1942} 1942}
1943 1943
1944#ifdef CONFIG_SND_HDA_HWDEP
1945/* execute additional init verbs */
1946static void hda_exec_init_verbs(struct hda_codec *codec)
1947{
1948 if (codec->init_verbs.list)
1949 snd_hda_sequence_write(codec, codec->init_verbs.list);
1950}
1951#else
1952static inline void hda_exec_init_verbs(struct hda_codec *codec) {}
1953#endif
1954
1944#ifdef SND_HDA_NEEDS_RESUME 1955#ifdef SND_HDA_NEEDS_RESUME
1945/* 1956/*
1946 * call suspend and power-down; used both from PM and power-save 1957 * call suspend and power-down; used both from PM and power-save
@@ -1967,6 +1978,7 @@ static void hda_call_codec_resume(struct hda_codec *codec)
1967 hda_set_power_state(codec, 1978 hda_set_power_state(codec,
1968 codec->afg ? codec->afg : codec->mfg, 1979 codec->afg ? codec->afg : codec->mfg,
1969 AC_PWRST_D0); 1980 AC_PWRST_D0);
1981 hda_exec_init_verbs(codec);
1970 if (codec->patch_ops.resume) 1982 if (codec->patch_ops.resume)
1971 codec->patch_ops.resume(codec); 1983 codec->patch_ops.resume(codec);
1972 else { 1984 else {
@@ -2008,6 +2020,7 @@ int snd_hda_codec_build_controls(struct hda_codec *codec)
2008 hda_set_power_state(codec, 2020 hda_set_power_state(codec,
2009 codec->afg ? codec->afg : codec->mfg, 2021 codec->afg ? codec->afg : codec->mfg,
2010 AC_PWRST_D0); 2022 AC_PWRST_D0);
2023 hda_exec_init_verbs(codec);
2011 /* continue to initialize... */ 2024 /* continue to initialize... */
2012 if (codec->patch_ops.init) 2025 if (codec->patch_ops.init)
2013 err = codec->patch_ops.init(codec); 2026 err = codec->patch_ops.init(codec);