diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-04-07 04:39:25 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-04-07 04:39:25 -0400 |
commit | 5402e4cb80dc2cb407ca07e31cb7668ba45e5320 (patch) | |
tree | 0bf8f8ef7ea99258d7f0244a39485e01632a7806 /sound/pci/hda/patch_realtek.c | |
parent | 1c716153a87ae75c8bd63f1b6f7916300d87df7e (diff) |
ALSA: hda - Rewrite alc269_suspend to alc269_shutup
alc269_suspend is just calling the shut-up, so we can use the new shutup
callback for the purpose.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 3761fba5bcec..8406248236fe 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -14808,7 +14808,6 @@ static void alc269_auto_init(struct hda_codec *codec) | |||
14808 | alc_inithook(codec); | 14808 | alc_inithook(codec); |
14809 | } | 14809 | } |
14810 | 14810 | ||
14811 | #ifdef SND_HDA_NEEDS_RESUME | ||
14812 | static void alc269_toggle_power_output(struct hda_codec *codec, int power_up) | 14811 | static void alc269_toggle_power_output(struct hda_codec *codec, int power_up) |
14813 | { | 14812 | { |
14814 | int val = alc_read_coef_idx(codec, 0x04); | 14813 | int val = alc_read_coef_idx(codec, 0x04); |
@@ -14819,8 +14818,7 @@ static void alc269_toggle_power_output(struct hda_codec *codec, int power_up) | |||
14819 | alc_write_coef_idx(codec, 0x04, val); | 14818 | alc_write_coef_idx(codec, 0x04, val); |
14820 | } | 14819 | } |
14821 | 14820 | ||
14822 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 14821 | static void alc269_shutup(struct hda_codec *codec) |
14823 | static int alc269_suspend(struct hda_codec *codec, pm_message_t state) | ||
14824 | { | 14822 | { |
14825 | struct alc_spec *spec = codec->spec; | 14823 | struct alc_spec *spec = codec->spec; |
14826 | 14824 | ||
@@ -14830,14 +14828,9 @@ static int alc269_suspend(struct hda_codec *codec, pm_message_t state) | |||
14830 | alc269_toggle_power_output(codec, 0); | 14828 | alc269_toggle_power_output(codec, 0); |
14831 | msleep(150); | 14829 | msleep(150); |
14832 | } | 14830 | } |
14833 | |||
14834 | alc_shutup(codec); | ||
14835 | if (spec && spec->power_hook) | ||
14836 | spec->power_hook(codec); | ||
14837 | return 0; | ||
14838 | } | 14831 | } |
14839 | #endif /* CONFIG_SND_HDA_POWER_SAVE */ | ||
14840 | 14832 | ||
14833 | #ifdef SND_HDA_NEEDS_RESUME | ||
14841 | static int alc269_resume(struct hda_codec *codec) | 14834 | static int alc269_resume(struct hda_codec *codec) |
14842 | { | 14835 | { |
14843 | if ((alc_read_coef_idx(codec, 0) & 0x00ff) == 0x018) { | 14836 | if ((alc_read_coef_idx(codec, 0) & 0x00ff) == 0x018) { |
@@ -15302,14 +15295,12 @@ static int patch_alc269(struct hda_codec *codec) | |||
15302 | spec->vmaster_nid = 0x02; | 15295 | spec->vmaster_nid = 0x02; |
15303 | 15296 | ||
15304 | codec->patch_ops = alc_patch_ops; | 15297 | codec->patch_ops = alc_patch_ops; |
15305 | #ifdef CONFIG_SND_HDA_POWER_SAVE | ||
15306 | codec->patch_ops.suspend = alc269_suspend; | ||
15307 | #endif | ||
15308 | #ifdef SND_HDA_NEEDS_RESUME | 15298 | #ifdef SND_HDA_NEEDS_RESUME |
15309 | codec->patch_ops.resume = alc269_resume; | 15299 | codec->patch_ops.resume = alc269_resume; |
15310 | #endif | 15300 | #endif |
15311 | if (board_config == ALC269_AUTO) | 15301 | if (board_config == ALC269_AUTO) |
15312 | spec->init_hook = alc269_auto_init; | 15302 | spec->init_hook = alc269_auto_init; |
15303 | spec->shutup = alc269_shutup; | ||
15313 | 15304 | ||
15314 | alc_init_jacks(codec); | 15305 | alc_init_jacks(codec); |
15315 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 15306 | #ifdef CONFIG_SND_HDA_POWER_SAVE |