summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-11 18:00:27 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-11 18:00:27 +0100
commitee3aee6a3bd846a70588ff219142244d00a51582 (patch)
tree36095e2514e34cb8c59f981765416b72af97df57 /sound
parentf6f629f8332ea70255f6c60c904270640a21a114 (diff)
parentfa40ef208c955bfe21f53913f51f297ac3237e95 (diff)
downloadlinux-ee3aee6a3bd846a70588ff219142244d00a51582.tar.bz2
Merge remote-tracking branch 'asoc/fix/compress' into tmp
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-compress.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index b5b3db71e253..ed0bfb0ddb96 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -211,19 +211,27 @@ static int soc_compr_set_params(struct snd_compr_stream *cstream,
if (platform->driver->compr_ops && platform->driver->compr_ops->set_params) {
ret = platform->driver->compr_ops->set_params(cstream, params);
if (ret < 0)
- goto out;
+ goto err;
}
if (rtd->dai_link->compr_ops && rtd->dai_link->compr_ops->set_params) {
ret = rtd->dai_link->compr_ops->set_params(cstream);
if (ret < 0)
- goto out;
+ goto err;
}
snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK,
SND_SOC_DAPM_STREAM_START);
-out:
+ /* cancel any delayed stream shutdown that is pending */
+ rtd->pop_wait = 0;
+ mutex_unlock(&rtd->pcm_mutex);
+
+ cancel_delayed_work_sync(&rtd->delayed_work);
+
+ return ret;
+
+err:
mutex_unlock(&rtd->pcm_mutex);
return ret;
}