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

This commit is contained in:
qctecmdr 2021-04-07 23:34:50 -07:00 • committed by Gerrit - the friendly Code Review server
commit 31f4eab8ba

6
asoc/msm-pcm-loopback-v2.c Normal file → Executable file
View file

@ -347,6 +347,7 @@ static int msm_pcm_open(struct snd_pcm_substream *substream)
pcm->audio_client->fedai_id = rtd->dai_link->id;
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) {
@ -523,6 +524,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);