aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-08-10 11:09:26 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 09:58:43 -0400
commit82beb8fd365afe3891b277c46425083f13e23c56 (patch)
treea564d7228b59170aa490d4fc9284b5fa4442adb0 /sound/pci/hda/hda_codec.h
parentb3ac56364126f78cae94eb2a75b72d9ea85aca9d (diff)
[ALSA] hda-codec - optimize resume using caches
So far, the driver looked the table of snd_kcontrol_new used for creating mixer elements and forces to call each of its put callbacks in PM resume code. This is too ugly and hackish. Now, the resume is simplified using the codec amp and command register caches. The driver simply restores the values that have been written in the cache table. With this simplification, most codec support codes don't require any special resume callback. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r--sound/pci/hda/hda_codec.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index ef94c9122c6d..92938d2a52e2 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -552,11 +552,6 @@ struct hda_codec {
552 /* set by patch */ 552 /* set by patch */
553 struct hda_codec_ops patch_ops; 553 struct hda_codec_ops patch_ops;
554 554
555 /* resume phase - all controls should update even if
556 * the values are not changed
557 */
558 unsigned int in_resume;
559
560 /* PCM to create, set by patch_ops.build_pcms callback */ 555 /* PCM to create, set by patch_ops.build_pcms callback */
561 unsigned int num_pcms; 556 unsigned int num_pcms;
562 struct hda_pcm *pcm_info; 557 struct hda_pcm *pcm_info;
@@ -622,11 +617,16 @@ void snd_hda_sequence_write(struct hda_codec *codec,
622int snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex); 617int snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex);
623 618
624/* cached write */ 619/* cached write */
620#ifdef CONFIG_PM
625int snd_hda_codec_write_cache(struct hda_codec *codec, hda_nid_t nid, 621int snd_hda_codec_write_cache(struct hda_codec *codec, hda_nid_t nid,
626 int direct, unsigned int verb, unsigned int parm); 622 int direct, unsigned int verb, unsigned int parm);
627void snd_hda_sequence_write_cache(struct hda_codec *codec, 623void snd_hda_sequence_write_cache(struct hda_codec *codec,
628 const struct hda_verb *seq); 624 const struct hda_verb *seq);
629void snd_hda_codec_resume_cache(struct hda_codec *codec); 625void snd_hda_codec_resume_cache(struct hda_codec *codec);
626#else
627#define snd_hda_codec_write_cache snd_hda_codec_write
628#define snd_hda_sequence_write_cache snd_hda_sequence_write
629#endif
630 630
631/* 631/*
632 * Mixer 632 * Mixer