Commit a184d4e4591bb53fd8b91d6e8b85cffa261fb83e

Authored by Takashi Iwai

Merge branch 'for-linus' into for-next

Need to merge the fixes regarding EPSS.

Conflicts:
	sound/pci/hda/hda_codec.c

Showing 4 changed files Side-by-side Diff

... ... @@ -233,7 +233,7 @@
233 233 irq[dev], dma8[dev], dma16[dev]);
234 234 }
235 235  
236   - if ((error = snd_sb16dsp_pcm(chip, 0, NULL)) < 0) {
  236 + if ((error = snd_sb16dsp_pcm(chip, 0, &chip->pcm)) < 0) {
237 237 snd_card_free(card);
238 238 return error;
239 239 }
sound/pci/hda/hda_codec.c
... ... @@ -1327,6 +1327,9 @@
1327 1327 if (!codec->d3_stop_clk)
1328 1328 bus->power_keep_link_on = 1;
1329 1329 #endif
  1330 + codec->epss = snd_hda_codec_get_supported_ps(codec,
  1331 + codec->afg ? codec->afg : codec->mfg,
  1332 + AC_PWRST_EPSS);
1330 1333  
1331 1334 /* power-up all before initialization */
1332 1335 hda_set_power_state(codec,
... ... @@ -3558,8 +3561,7 @@
3558 3561 /* this delay seems necessary to avoid click noise at power-down */
3559 3562 if (power_state == AC_PWRST_D3) {
3560 3563 /* transition time less than 10ms for power down */
3561   - bool epss = snd_hda_codec_get_supported_ps(codec, fg, AC_PWRST_EPSS);
3562   - msleep(epss ? 10 : 100);
  3564 + msleep(codec->epss ? 10 : 100);
3563 3565 }
3564 3566  
3565 3567 /* repeat power states setting at most 10 times*/
sound/pci/hda/hda_codec.h
... ... @@ -866,6 +866,7 @@
866 866 unsigned int ignore_misc_bit:1; /* ignore MISC_NO_PRESENCE bit */
867 867 unsigned int no_jack_detect:1; /* Machine has no jack-detection */
868 868 unsigned int pcm_format_first:1; /* PCM format must be set first */
  869 + unsigned int epss:1; /* supporting EPSS? */
869 870 #ifdef CONFIG_SND_HDA_POWER_SAVE
870 871 unsigned int power_on :1; /* current (global) power-state */
871 872 int power_transition; /* power-state in transition */
sound/pci/hda/patch_sigmatel.c
... ... @@ -4541,6 +4541,9 @@
4541 4541 struct auto_pin_cfg *cfg = &spec->autocfg;
4542 4542 int i;
4543 4543  
  4544 + if (cfg->speaker_outs == 0)
  4545 + return;
  4546 +
4544 4547 for (i = 0; i < cfg->line_outs; i++) {
4545 4548 if (presence)
4546 4549 break;
... ... @@ -5529,6 +5532,7 @@
5529 5532 snd_hda_codec_set_pincfg(codec, 0xf, 0x2181205e);
5530 5533 }
5531 5534  
  5535 + codec->epss = 0; /* longer delay needed for D3 */
5532 5536 codec->no_trigger_sense = 1;
5533 5537 codec->spec = spec;
5534 5538