aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_cmedia.c
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/patch_cmedia.c
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/patch_cmedia.c')
-rw-r--r--sound/pci/hda/patch_cmedia.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/sound/pci/hda/patch_cmedia.c b/sound/pci/hda/patch_cmedia.c
index 3c722e667bc8..2468f3171222 100644
--- a/sound/pci/hda/patch_cmedia.c
+++ b/sound/pci/hda/patch_cmedia.c
@@ -427,27 +427,6 @@ static int cmi9880_init(struct hda_codec *codec)
427 return 0; 427 return 0;
428} 428}
429 429
430#ifdef CONFIG_PM
431/*
432 * resume
433 */
434static int cmi9880_resume(struct hda_codec *codec)
435{
436 struct cmi_spec *spec = codec->spec;
437
438 cmi9880_init(codec);
439 snd_hda_resume_ctls(codec, cmi9880_basic_mixer);
440 if (spec->channel_modes)
441 snd_hda_resume_ctls(codec, cmi9880_ch_mode_mixer);
442 if (spec->multiout.dig_out_nid)
443 snd_hda_resume_spdif_out(codec);
444 if (spec->dig_in_nid)
445 snd_hda_resume_spdif_in(codec);
446
447 return 0;
448}
449#endif
450
451/* 430/*
452 * Analog playback callbacks 431 * Analog playback callbacks
453 */ 432 */
@@ -635,9 +614,6 @@ static struct hda_codec_ops cmi9880_patch_ops = {
635 .build_pcms = cmi9880_build_pcms, 614 .build_pcms = cmi9880_build_pcms,
636 .init = cmi9880_init, 615 .init = cmi9880_init,
637 .free = cmi9880_free, 616 .free = cmi9880_free,
638#ifdef CONFIG_PM
639 .resume = cmi9880_resume,
640#endif
641}; 617};
642 618
643static int patch_cmi9880(struct hda_codec *codec) 619static int patch_cmi9880(struct hda_codec *codec)