summaryrefslogtreecommitdiff
path: root/sound/soc/msm/qdsp6v2
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-07-25 00:35:47 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-07-25 00:35:46 -0700
commitba7b97eed0a5949b4cc4b4a5eccdd44384a55f4c (patch)
tree5b9abf0b62a89b2199ead70316686c463585971e /sound/soc/msm/qdsp6v2
parentc4e3783d9c08a95276fd31e494eaf50230b33e1a (diff)
parente29ec858f7408620eac5d0ae0994075f86fcf6e1 (diff)
Merge "ASoC: msm: mixer control queue handling in sink stream"
Diffstat (limited to 'sound/soc/msm/qdsp6v2')
-rw-r--r--sound/soc/msm/qdsp6v2/msm-transcode-loopback-q6-v2.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/msm/qdsp6v2/msm-transcode-loopback-q6-v2.c b/sound/soc/msm/qdsp6v2/msm-transcode-loopback-q6-v2.c
index 6bb85ca8e84e..5c5f7bc482c8 100644
--- a/sound/soc/msm/qdsp6v2/msm-transcode-loopback-q6-v2.c
+++ b/sound/soc/msm/qdsp6v2/msm-transcode-loopback-q6-v2.c
@@ -100,7 +100,7 @@ static void loopback_event_handler(uint32_t opcode,
return;
}
- cstream = trans->source.cstream;
+ cstream = trans->sink.cstream;
ac = trans->audio_client;
/*
@@ -223,6 +223,7 @@ static int msm_transcode_loopback_open(struct snd_compr_stream *cstream)
ret = -EINVAL;
goto exit;
}
+ msm_adsp_init_mixer_ctl_pp_event_queue(rtd);
}
pr_debug("%s: num stream%d, stream name %s\n", __func__,
@@ -237,8 +238,7 @@ static int msm_transcode_loopback_open(struct snd_compr_stream *cstream)
}
runtime->private_data = trans;
- if (trans->num_streams == 1)
- msm_adsp_init_mixer_ctl_pp_event_queue(rtd);
+
exit:
mutex_unlock(&trans->lock);
return ret;
@@ -283,14 +283,14 @@ static int msm_transcode_loopback_free(struct snd_compr_stream *cstream)
trans->num_streams--;
stop_transcoding(trans);
- if (cstream->direction == SND_COMPRESS_PLAYBACK)
+ if (cstream->direction == SND_COMPRESS_PLAYBACK) {
memset(&trans->sink, 0, sizeof(struct loopback_stream));
- else if (cstream->direction == SND_COMPRESS_CAPTURE)
+ msm_adsp_clean_mixer_ctl_pp_event_queue(rtd);
+ } else if (cstream->direction == SND_COMPRESS_CAPTURE) {
memset(&trans->source, 0, sizeof(struct loopback_stream));
+ }
trans->session_state = LOOPBACK_SESSION_CLOSE;
- if (trans->num_streams == 1)
- msm_adsp_clean_mixer_ctl_pp_event_queue(rtd);
mutex_unlock(&trans->lock);
return ret;
}