summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-06-19 07:54:14 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-06-19 07:54:14 -0700
commit608d5ae7bc3b0b19bf583abf2d7cdee6c63a76ee (patch)
tree0da26da78f327ba06d5a25005e97aa7fb973828e
parentf79c3551768753cc376c7ca836138dde41fe9560 (diff)
parent04b7e499f885100ce8dd6ad3c19acfea5f62383a (diff)
Merge "ASoC: msm: Add Compressed app type in transcode loopback driver"
-rw-r--r--sound/soc/msm/qdsp6v2/msm-dai-q6-v2.c3
-rw-r--r--sound/soc/msm/qdsp6v2/msm-transcode-loopback-q6-v2.c20
2 files changed, 19 insertions, 4 deletions
diff --git a/sound/soc/msm/qdsp6v2/msm-dai-q6-v2.c b/sound/soc/msm/qdsp6v2/msm-dai-q6-v2.c
index 64b1961794b9..fa8bdddacef2 100644
--- a/sound/soc/msm/qdsp6v2/msm-dai-q6-v2.c
+++ b/sound/soc/msm/qdsp6v2/msm-dai-q6-v2.c
@@ -3586,6 +3586,9 @@ static int msm_dai_q6_dai_mi2s_probe(struct snd_soc_dai *dai)
ctrl = &mi2s_config_controls[11];
}
+ if (dai->id == MSM_QUAT_MI2S)
+ ctrl = &mi2s_config_controls[8];
+
if (ctrl) {
rc = snd_ctl_add(dai->component->card->snd_card,
snd_ctl_new1(ctrl,
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 dbda90c3616d..6bb85ca8e84e 100644
--- a/sound/soc/msm/qdsp6v2/msm-transcode-loopback-q6-v2.c
+++ b/sound/soc/msm/qdsp6v2/msm-transcode-loopback-q6-v2.c
@@ -112,7 +112,8 @@ static void loopback_event_handler(uint32_t opcode,
switch (opcode) {
case ASM_STREAM_CMD_ENCDEC_EVENTS:
case ASM_IEC_61937_MEDIA_FMT_EVENT:
- pr_debug("%s: ASM_IEC_61937_MEDIA_FMT_EVENT\n", __func__);
+ pr_debug("%s: Handling stream event : 0X%x\n",
+ __func__, opcode);
rtd = cstream->private_data;
if (!rtd) {
pr_err("%s: rtd is NULL\n", __func__);
@@ -449,17 +450,17 @@ static int msm_transcode_loopback_set_params(struct snd_compr_stream *cstream,
trans->audio_client->perf_mode,
trans->session_id,
SNDRV_PCM_STREAM_CAPTURE,
- true);
+ COMPRESSED_PASSTHROUGH_GEN);
else
msm_pcm_routing_reg_phy_stream(
soc_pcm_tx->dai_link->be_id,
trans->audio_client->perf_mode,
trans->session_id,
SNDRV_PCM_STREAM_CAPTURE);
-
+ /* Opening Rx ADM in LOW_LATENCY mode by default */
msm_pcm_routing_reg_phy_stream(
soc_pcm_rx->dai_link->be_id,
- trans->audio_client->perf_mode,
+ true,
trans->session_id,
SNDRV_PCM_STREAM_PLAYBACK);
pr_debug("%s: Successfully opened ADM sessions\n", __func__);
@@ -913,10 +914,21 @@ static int msm_transcode_loopback_probe(struct snd_soc_platform *platform)
return 0;
}
+static int msm_transcode_loopback_remove(struct snd_soc_platform *platform)
+{
+ struct trans_loopback_pdata *pdata = NULL;
+
+ pdata = (struct trans_loopback_pdata *)
+ snd_soc_platform_get_drvdata(platform);
+ kfree(pdata);
+ return 0;
+}
+
static struct snd_soc_platform_driver msm_soc_platform = {
.probe = msm_transcode_loopback_probe,
.compr_ops = &msm_transcode_loopback_ops,
.pcm_new = msm_transcode_loopback_new,
+ .remove = msm_transcode_loopback_remove,
};
static int msm_transcode_dev_probe(struct platform_device *pdev)