diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2014-06-27 08:11:07 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-06-27 08:11:06 -0700 |
commit | 163376d5fc7632ac257339619524680c10a3f157 (patch) | |
tree | 222f2ca9a73b729d8aa8cf6ae8b820f851769f86 /sound/soc | |
parent | ee305353e0dd9189741020271fb22435ff2d1b43 (diff) | |
parent | e08e8815e9236080c5303fd438f3cd79dd2eea01 (diff) |
Merge "ASoC: msm: unblock the calls sent to the driver during SSR"
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c | 10 | ||||
-rw-r--r-- | sound/soc/msm/qdsp6v2/q6asm.c | 4 | ||||
-rw-r--r-- | sound/soc/soc-compress.c | 5 |
3 files changed, 13 insertions, 6 deletions
diff --git a/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c b/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c index 01648e075e1b..2e03799fb916 100644 --- a/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c +++ b/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c @@ -1488,14 +1488,13 @@ static int msm_compr_pointer(struct snd_compr_stream *cstream, tstamp.byte_offset = prtd->byte_offset; tstamp.copied_total = prtd->copied_total; first_buffer = prtd->first_buffer; - if (atomic_read(&prtd->error)) { pr_err("%s Got RESET EVENTS notification, return error", __func__); tstamp.pcm_io_frames = 0; memcpy(arg, &tstamp, sizeof(struct snd_compr_tstamp)); spin_unlock_irqrestore(&prtd->lock, flags); - return -EINVAL; + return -ENETRESET; } spin_unlock_irqrestore(&prtd->lock, flags); @@ -1509,7 +1508,10 @@ static int msm_compr_pointer(struct snd_compr_stream *cstream, if (rc < 0) { pr_err("%s: Get Session Time return value =%lld\n", __func__, timestamp); - return -EAGAIN; + if (atomic_read(&prtd->error)) + return -ENETRESET; + else + return -EAGAIN; } } @@ -1590,7 +1592,7 @@ static int msm_compr_copy(struct snd_compr_stream *cstream, if (atomic_read(&prtd->error)) { pr_err("%s Got RESET EVENTS notification", __func__); spin_unlock_irqrestore(&prtd->lock, flags); - return -EINVAL; + return -ENETRESET; } spin_unlock_irqrestore(&prtd->lock, flags); diff --git a/sound/soc/msm/qdsp6v2/q6asm.c b/sound/soc/msm/qdsp6v2/q6asm.c index 5eda54b6b554..745b4c1d6945 100644 --- a/sound/soc/msm/qdsp6v2/q6asm.c +++ b/sound/soc/msm/qdsp6v2/q6asm.c @@ -1312,6 +1312,10 @@ static int32_t q6asm_callback(struct apr_client_data *data, void *priv) if (ac->cb) ac->cb(data->opcode, data->token, data->payload, ac->priv); + atomic_set(&ac->time_flag, 0); + atomic_set(&ac->cmd_state, 0); + wake_up(&ac->time_wait); + wake_up(&ac->cmd_wait); ac->apr = NULL; return 0; } diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index 1d60bc49e185..35f29da55b59 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -593,14 +593,15 @@ static int soc_compr_pointer(struct snd_compr_stream *cstream, { struct snd_soc_pcm_runtime *rtd = cstream->private_data; struct snd_soc_platform *platform = rtd->platform; + int ret = 0; mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass); if (platform->driver->compr_ops && platform->driver->compr_ops->pointer) - platform->driver->compr_ops->pointer(cstream, tstamp); + ret = platform->driver->compr_ops->pointer(cstream, tstamp); mutex_unlock(&rtd->pcm_mutex); - return 0; + return ret; } static int soc_compr_copy(struct snd_compr_stream *cstream, |