diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-08-10 11:09:26 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 09:58:43 -0400 |
commit | 82beb8fd365afe3891b277c46425083f13e23c56 (patch) | |
tree | a564d7228b59170aa490d4fc9284b5fa4442adb0 /sound/pci/hda/patch_atihdmi.c | |
parent | b3ac56364126f78cae94eb2a75b72d9ea85aca9d (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/patch_atihdmi.c')
-rw-r--r-- | sound/pci/hda/patch_atihdmi.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/sound/pci/hda/patch_atihdmi.c b/sound/pci/hda/patch_atihdmi.c index 72d3ab9751ac..fbb8969dc559 100644 --- a/sound/pci/hda/patch_atihdmi.c +++ b/sound/pci/hda/patch_atihdmi.c | |||
@@ -62,19 +62,6 @@ static int atihdmi_init(struct hda_codec *codec) | |||
62 | return 0; | 62 | return 0; |
63 | } | 63 | } |
64 | 64 | ||
65 | #ifdef CONFIG_PM | ||
66 | /* | ||
67 | * resume | ||
68 | */ | ||
69 | static int atihdmi_resume(struct hda_codec *codec) | ||
70 | { | ||
71 | atihdmi_init(codec); | ||
72 | snd_hda_resume_spdif_out(codec); | ||
73 | |||
74 | return 0; | ||
75 | } | ||
76 | #endif | ||
77 | |||
78 | /* | 65 | /* |
79 | * Digital out | 66 | * Digital out |
80 | */ | 67 | */ |
@@ -141,9 +128,6 @@ static struct hda_codec_ops atihdmi_patch_ops = { | |||
141 | .build_pcms = atihdmi_build_pcms, | 128 | .build_pcms = atihdmi_build_pcms, |
142 | .init = atihdmi_init, | 129 | .init = atihdmi_init, |
143 | .free = atihdmi_free, | 130 | .free = atihdmi_free, |
144 | #ifdef CONFIG_PM | ||
145 | .resume = atihdmi_resume, | ||
146 | #endif | ||
147 | }; | 131 | }; |
148 | 132 | ||
149 | static int patch_atihdmi(struct hda_codec *codec) | 133 | static int patch_atihdmi(struct hda_codec *codec) |