diff options
author | Matthew Ranostay <mranostay@embeddedalley.com> | 2008-11-18 20:54:17 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-11-19 01:37:23 -0500 |
commit | c6798d2bd1805e32a92ba8db168ec51cdbb534b0 (patch) | |
tree | 0c058ffce5d9c7b74614159a4fcf7072cf734956 /sound | |
parent | 9c8641e8ee438273079337c86f4d739fbfdd8b33 (diff) |
ALSA: hda: EAPD mute on suspend
Moved support for EAPD mute on suspend from stac92hd71xx_suspend
to the generic stac92xx_suspend function.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 139efe37f3b3..c346c77e3068 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -4185,6 +4185,16 @@ static int stac92xx_resume(struct hda_codec *codec) | |||
4185 | (STAC_HP_EVENT | spec->autocfg.hp_pins[0]) << 26); | 4185 | (STAC_HP_EVENT | spec->autocfg.hp_pins[0]) << 26); |
4186 | return 0; | 4186 | return 0; |
4187 | } | 4187 | } |
4188 | |||
4189 | static int stac92xx_suspend(struct hda_codec *codec, pm_message_t state) | ||
4190 | { | ||
4191 | struct sigmatel_spec *spec = codec->spec; | ||
4192 | if (spec->eapd_mask) | ||
4193 | stac_gpio_set(codec, spec->gpio_mask, | ||
4194 | spec->gpio_dir, spec->gpio_data & | ||
4195 | ~spec->eapd_mask); | ||
4196 | return 0; | ||
4197 | } | ||
4188 | #endif | 4198 | #endif |
4189 | 4199 | ||
4190 | static struct hda_codec_ops stac92xx_patch_ops = { | 4200 | static struct hda_codec_ops stac92xx_patch_ops = { |
@@ -4194,6 +4204,7 @@ static struct hda_codec_ops stac92xx_patch_ops = { | |||
4194 | .free = stac92xx_free, | 4204 | .free = stac92xx_free, |
4195 | .unsol_event = stac92xx_unsol_event, | 4205 | .unsol_event = stac92xx_unsol_event, |
4196 | #ifdef SND_HDA_NEEDS_RESUME | 4206 | #ifdef SND_HDA_NEEDS_RESUME |
4207 | .suspend = stac92xx_suspend, | ||
4197 | .resume = stac92xx_resume, | 4208 | .resume = stac92xx_resume, |
4198 | #endif | 4209 | #endif |
4199 | }; | 4210 | }; |
@@ -4598,14 +4609,8 @@ static int stac92hd71xx_resume(struct hda_codec *codec) | |||
4598 | 4609 | ||
4599 | static int stac92hd71xx_suspend(struct hda_codec *codec, pm_message_t state) | 4610 | static int stac92hd71xx_suspend(struct hda_codec *codec, pm_message_t state) |
4600 | { | 4611 | { |
4601 | struct sigmatel_spec *spec = codec->spec; | ||
4602 | |||
4603 | stac92hd71xx_set_power_state(codec, AC_PWRST_D3); | 4612 | stac92hd71xx_set_power_state(codec, AC_PWRST_D3); |
4604 | if (spec->eapd_mask) | 4613 | return stac92xx_suspend(codec, state); |
4605 | stac_gpio_set(codec, spec->gpio_mask, | ||
4606 | spec->gpio_dir, spec->gpio_data & | ||
4607 | ~spec->eapd_mask); | ||
4608 | return 0; | ||
4609 | }; | 4614 | }; |
4610 | 4615 | ||
4611 | #endif | 4616 | #endif |
@@ -4617,8 +4622,8 @@ static struct hda_codec_ops stac92hd71bxx_patch_ops = { | |||
4617 | .free = stac92xx_free, | 4622 | .free = stac92xx_free, |
4618 | .unsol_event = stac92xx_unsol_event, | 4623 | .unsol_event = stac92xx_unsol_event, |
4619 | #ifdef SND_HDA_NEEDS_RESUME | 4624 | #ifdef SND_HDA_NEEDS_RESUME |
4620 | .resume = stac92hd71xx_resume, | ||
4621 | .suspend = stac92hd71xx_suspend, | 4625 | .suspend = stac92hd71xx_suspend, |
4626 | .resume = stac92hd71xx_resume, | ||
4622 | #endif | 4627 | #endif |
4623 | }; | 4628 | }; |
4624 | 4629 | ||