aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-02-12 06:05:44 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-02-16 14:14:52 -0500
commit96dd362284ddcb546d2783035ae7eeda73692eda (patch)
tree441df60fa2d47cfb05d9e3ccc52d6a0282952e1d /sound/soc
parent3a66d3877eaa4ab9818000a15c07326adaa9ca79 (diff)
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>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index ca89c782132d..94b9cde26139 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -542,7 +542,7 @@ static int soc_codec_close(struct snd_pcm_substream *substream)
542 /* start delayed pop wq here for playback streams */ 542 /* start delayed pop wq here for playback streams */
543 codec_dai->pop_wait = 1; 543 codec_dai->pop_wait = 1;
544 schedule_delayed_work(&card->delayed_work, 544 schedule_delayed_work(&card->delayed_work,
545 msecs_to_jiffies(pmdown_time)); 545 msecs_to_jiffies(card->pmdown_time));
546 } else { 546 } else {
547 /* capture streams can be powered down now */ 547 /* capture streams can be powered down now */
548 snd_soc_dapm_stream_event(codec, 548 snd_soc_dapm_stream_event(codec,
@@ -1039,6 +1039,8 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
1039 dev_dbg(card->dev, "All components present, instantiating\n"); 1039 dev_dbg(card->dev, "All components present, instantiating\n");
1040 1040
1041 /* Found everything, bring it up */ 1041 /* Found everything, bring it up */
1042 card->pmdown_time = pmdown_time;
1043
1042 if (card->probe) { 1044 if (card->probe) {
1043 ret = card->probe(pdev); 1045 ret = card->probe(pdev);
1044 if (ret < 0) 1046 if (ret < 0)