diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-07-30 15:01:46 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-10-13 02:43:03 +0200 |
commit | 11aeff082ad9bd00e8475bf1630c3264344d3764 (patch) | |
tree | fc00a9f4ccaa392032f09acbbd7d460f2e4d17de /sound/pci/hda/hda_codec.c | |
parent | d7ffba19ce4c1b153d502a89d829400bf76d6c11 (diff) | |
download | blackbird-obmc-linux-11aeff082ad9bd00e8475bf1630c3264344d3764.tar.gz blackbird-obmc-linux-11aeff082ad9bd00e8475bf1630c3264344d3764.zip |
ALSA: hda - Add init_verbs entries
This patch enables the additional init verbs for each codec. The verbs
can be entered via hwdep sysfs file. These verbs are executed at
reconfiguring the codec for non-standard setups like overriding
the pin-defcfg.
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.c | 13 |
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, } } +#ifdef CONFIG_SND_HDA_HWDEP +/* execute additional init verbs */ +static void hda_exec_init_verbs(struct hda_codec *codec) +{ + if (codec->init_verbs.list) + snd_hda_sequence_write(codec, codec->init_verbs.list); +} +#else +static inline void hda_exec_init_verbs(struct hda_codec *codec) {} +#endif + #ifdef SND_HDA_NEEDS_RESUME /* * 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) hda_set_power_state(codec, codec->afg ? codec->afg : codec->mfg, AC_PWRST_D0); + hda_exec_init_verbs(codec); if (codec->patch_ops.resume) codec->patch_ops.resume(codec); else { @@ -2008,6 +2020,7 @@ int snd_hda_codec_build_controls(struct hda_codec *codec) hda_set_power_state(codec, codec->afg ? codec->afg : codec->mfg, AC_PWRST_D0); + hda_exec_init_verbs(codec); /* continue to initialize... */ if (codec->patch_ops.init) err = codec->patch_ops.init(codec); |