aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_codec.c10
-rw-r--r--sound/pci/hda/hda_codec.h1
-rw-r--r--sound/pci/hda/patch_sigmatel.c4
3 files changed, 13 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index f560051a949e..f25c24c743f9 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1209,6 +1209,9 @@ static void snd_hda_codec_free(struct hda_codec *codec)
1209 kfree(codec); 1209 kfree(codec);
1210} 1210}
1211 1211
1212static bool snd_hda_codec_get_supported_ps(struct hda_codec *codec,
1213 hda_nid_t fg, unsigned int power_state);
1214
1212static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg, 1215static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg,
1213 unsigned int power_state); 1216 unsigned int power_state);
1214 1217
@@ -1317,6 +1320,10 @@ int /*__devinit*/ snd_hda_codec_new(struct hda_bus *bus,
1317 AC_VERB_GET_SUBSYSTEM_ID, 0); 1320 AC_VERB_GET_SUBSYSTEM_ID, 0);
1318 } 1321 }
1319 1322
1323 codec->epss = snd_hda_codec_get_supported_ps(codec,
1324 codec->afg ? codec->afg : codec->mfg,
1325 AC_PWRST_EPSS);
1326
1320 /* power-up all before initialization */ 1327 /* power-up all before initialization */
1321 hda_set_power_state(codec, 1328 hda_set_power_state(codec,
1322 codec->afg ? codec->afg : codec->mfg, 1329 codec->afg ? codec->afg : codec->mfg,
@@ -3543,8 +3550,7 @@ static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg,
3543 /* this delay seems necessary to avoid click noise at power-down */ 3550 /* this delay seems necessary to avoid click noise at power-down */
3544 if (power_state == AC_PWRST_D3) { 3551 if (power_state == AC_PWRST_D3) {
3545 /* transition time less than 10ms for power down */ 3552 /* transition time less than 10ms for power down */
3546 bool epss = snd_hda_codec_get_supported_ps(codec, fg, AC_PWRST_EPSS); 3553 msleep(codec->epss ? 10 : 100);
3547 msleep(epss ? 10 : 100);
3548 } 3554 }
3549 3555
3550 /* repeat power states setting at most 10 times*/ 3556 /* repeat power states setting at most 10 times*/
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 7fbc1bcaf1a9..e5a7e19a8071 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -862,6 +862,7 @@ struct hda_codec {
862 unsigned int ignore_misc_bit:1; /* ignore MISC_NO_PRESENCE bit */ 862 unsigned int ignore_misc_bit:1; /* ignore MISC_NO_PRESENCE bit */
863 unsigned int no_jack_detect:1; /* Machine has no jack-detection */ 863 unsigned int no_jack_detect:1; /* Machine has no jack-detection */
864 unsigned int pcm_format_first:1; /* PCM format must be set first */ 864 unsigned int pcm_format_first:1; /* PCM format must be set first */
865 unsigned int epss:1; /* supporting EPSS? */
865#ifdef CONFIG_SND_HDA_POWER_SAVE 866#ifdef CONFIG_SND_HDA_POWER_SAVE
866 unsigned int power_on :1; /* current (global) power-state */ 867 unsigned int power_on :1; /* current (global) power-state */
867 int power_transition; /* power-state in transition */ 868 int power_transition; /* power-state in transition */
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index ea5775a1a7db..6f806d3e56bb 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -4543,6 +4543,9 @@ static void stac92xx_line_out_detect(struct hda_codec *codec,
4543 struct auto_pin_cfg *cfg = &spec->autocfg; 4543 struct auto_pin_cfg *cfg = &spec->autocfg;
4544 int i; 4544 int i;
4545 4545
4546 if (cfg->speaker_outs == 0)
4547 return;
4548
4546 for (i = 0; i < cfg->line_outs; i++) { 4549 for (i = 0; i < cfg->line_outs; i++) {
4547 if (presence) 4550 if (presence)
4548 break; 4551 break;
@@ -5531,6 +5534,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
5531 snd_hda_codec_set_pincfg(codec, 0xf, 0x2181205e); 5534 snd_hda_codec_set_pincfg(codec, 0xf, 0x2181205e);
5532 } 5535 }
5533 5536
5537 codec->epss = 0; /* longer delay needed for D3 */
5534 codec->no_trigger_sense = 1; 5538 codec->no_trigger_sense = 1;
5535 codec->spec = spec; 5539 codec->spec = spec;
5536 5540