summaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-12-06 21:10:05 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-06 21:10:05 -0500
commit959327c7842e8621e28b89acea7d57ff02b60972 (patch)
treeb00de195fa401186228796abdcd16812862fbf4d /sound/pci/hda/patch_sigmatel.c
parentf84ea779c25dabc90956f1c329e5e5c501ea96cc (diff)
parentb835c0f47f725d864bf2545f10c733b754bb6d51 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index f3658658548e..d8d2f9dccd9b 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -4441,7 +4441,9 @@ static int stac92xx_init(struct hda_codec *codec)
int pinctl, def_conf;
/* power on when no jack detection is available */
- if (!spec->hp_detect) {
+ /* or when the VREF is used for controlling LED */
+ if (!spec->hp_detect ||
+ (spec->gpio_led > 8 && spec->gpio_led == nid)) {
stac_toggle_power_map(codec, nid, 1);
continue;
}
@@ -5055,20 +5057,6 @@ static int stac92xx_pre_resume(struct hda_codec *codec)
return 0;
}
-static int stac92xx_post_suspend(struct hda_codec *codec)
-{
- struct sigmatel_spec *spec = codec->spec;
- if (spec->gpio_led > 8) {
- /* with vref-out pin used for mute led control
- * codec AFG is prevented from D3 state, but on
- * system suspend it can (and should) be used
- */
- snd_hda_codec_read(codec, codec->afg, 0,
- AC_VERB_SET_POWER_STATE, AC_PWRST_D3);
- }
- return 0;
-}
-
static void stac92xx_set_power_state(struct hda_codec *codec, hda_nid_t fg,
unsigned int power_state)
{
@@ -5668,8 +5656,6 @@ again:
} else {
codec->patch_ops.set_power_state =
stac92xx_set_power_state;
- codec->patch_ops.post_suspend =
- stac92xx_post_suspend;
}
codec->patch_ops.pre_resume = stac92xx_pre_resume;
codec->patch_ops.check_power_status =
@@ -5983,8 +5969,6 @@ again:
} else {
codec->patch_ops.set_power_state =
stac92xx_set_power_state;
- codec->patch_ops.post_suspend =
- stac92xx_post_suspend;
}
codec->patch_ops.pre_resume = stac92xx_pre_resume;
codec->patch_ops.check_power_status =