ASoC: Make pmdown_time a per-card setting

Make the pmdown_time a per-card setting rather than a global one,
initialised before the card initialisation runs. This allows cards
to override the default setting if it makes sense to do so (for
example, due to an unavoidable pop).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>

+5 -1
+2
include/sound/soc.h
··· 521 521 int (*set_bias_level)(struct snd_soc_card *, 522 522 enum snd_soc_bias_level level); 523 523 524 + int pmdown_time; 525 + 524 526 /* CPU <--> Codec DAI links */ 525 527 struct snd_soc_dai_link *dai_link; 526 528 int num_links;
+3 -1
sound/soc/soc-core.c
··· 542 542 /* start delayed pop wq here for playback streams */ 543 543 codec_dai->pop_wait = 1; 544 544 schedule_delayed_work(&card->delayed_work, 545 - msecs_to_jiffies(pmdown_time)); 545 + msecs_to_jiffies(card->pmdown_time)); 546 546 } else { 547 547 /* capture streams can be powered down now */ 548 548 snd_soc_dapm_stream_event(codec, ··· 1039 1039 dev_dbg(card->dev, "All components present, instantiating\n"); 1040 1040 1041 1041 /* Found everything, bring it up */ 1042 + card->pmdown_time = pmdown_time; 1043 + 1042 1044 if (card->probe) { 1043 1045 ret = card->probe(pdev); 1044 1046 if (ret < 0)