aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_local.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_local.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_local.h')
-rw-r--r--sound/pci/hda/hda_local.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index 51208974c2da..8dec32cfdf54 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -84,7 +84,9 @@ int snd_hda_codec_amp_read(struct hda_codec *codec, hda_nid_t nid, int ch,
84 int direction, int index); 84 int direction, int index);
85int snd_hda_codec_amp_update(struct hda_codec *codec, hda_nid_t nid, int ch, 85int snd_hda_codec_amp_update(struct hda_codec *codec, hda_nid_t nid, int ch,
86 int direction, int idx, int mask, int val); 86 int direction, int idx, int mask, int val);
87#ifdef CONFIG_PM
87void snd_hda_codec_resume_amp(struct hda_codec *codec); 88void snd_hda_codec_resume_amp(struct hda_codec *codec);
89#endif
88 90
89/* mono switch binding multiple inputs */ 91/* mono switch binding multiple inputs */
90#define HDA_BIND_MUTE_MONO(xname, nid, channel, indices, direction) \ 92#define HDA_BIND_MUTE_MONO(xname, nid, channel, indices, direction) \
@@ -257,15 +259,6 @@ int snd_hda_add_new_ctls(struct hda_codec *codec,
257 struct snd_kcontrol_new *knew); 259 struct snd_kcontrol_new *knew);
258 260
259/* 261/*
260 * power management
261 */
262#ifdef CONFIG_PM
263int snd_hda_resume_ctls(struct hda_codec *codec, struct snd_kcontrol_new *knew);
264int snd_hda_resume_spdif_out(struct hda_codec *codec);
265int snd_hda_resume_spdif_in(struct hda_codec *codec);
266#endif
267
268/*
269 * unsolicited event handler 262 * unsolicited event handler
270 */ 263 */
271 264