Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6aa368c1 authored by Hongtao Peng's avatar Hongtao Peng Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: msm: Loopback Driver send asm cal data in prepare stage



Add the q6asm_send_cal in msm_pcm_prepare for loopback driver.
This will allow to send asm calibration data to POPP

Change-Id: I649734ff735a2253c7e01fd5bdd8e9665ef5244a
Signed-off-by: default avatarHongtao Peng <hongtaop@codeaurora.org>
parent 965a68a2
Loading
Loading
Loading
Loading

asoc/msm-pcm-loopback-v2.c

100644 → 100755
+6 −0
Original line number Diff line number Diff line
@@ -345,6 +345,7 @@ static int msm_pcm_open(struct snd_pcm_substream *substream)
		}
		pcm->session_id = pcm->audio_client->session;
		pcm->audio_client->perf_mode = pdata->perf_mode;
		pcm->audio_client->stream_type = substream->stream;
		ret = q6asm_open_loopback_v2(pcm->audio_client,
					     bits_per_sample);
		if (ret < 0) {
@@ -521,6 +522,11 @@ static int msm_pcm_prepare(struct snd_pcm_substream *substream)
			pr_err("%s: audio client freed\n", __func__);
			return -EINVAL;
		}

		ret = q6asm_send_cal(pcm->audio_client);
		if (ret < 0)
			pr_err("%s : Send audio cal failed : %d", __func__, ret);

		msm_pcm_routing_reg_phy_stream(soc_pcm_tx->dai_link->id,
			pcm->audio_client->perf_mode,
			pcm->session_id, pcm->capture_substream->stream);