ASoC: msm: Fix repeated reg phy stream issue
Fix repeated reg phy stream issue in loopback driver which cause audio dsp calibration failure due to rtac device could not remove successfully. Change-Id: Ifa1b9cd579bc313d4addc00d48a8b4b636181220 Signed-off-by: Cong Tang <congt@codeaurora.org>
This commit is contained in:
parent
07324253e2
commit
3886996825
1 changed files with 7 additions and 1 deletions
|
@ -416,6 +416,12 @@ static int msm_pcm_prepare(struct snd_pcm_substream *substream)
|
||||||
|
|
||||||
dev_dbg(rtd->platform->dev, "%s: ASM loopback stream:%d\n",
|
dev_dbg(rtd->platform->dev, "%s: ASM loopback stream:%d\n",
|
||||||
__func__, substream->stream);
|
__func__, substream->stream);
|
||||||
|
|
||||||
|
if (pcm->playback_start && pcm->capture_start) {
|
||||||
|
mutex_unlock(&pcm->lock);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
|
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
|
||||||
if (!pcm->playback_start)
|
if (!pcm->playback_start)
|
||||||
pcm->playback_start = 1;
|
pcm->playback_start = 1;
|
||||||
|
@ -424,7 +430,7 @@ static int msm_pcm_prepare(struct snd_pcm_substream *substream)
|
||||||
pcm->capture_start = 1;
|
pcm->capture_start = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pcm->instance == 2) {
|
if (pcm->playback_start && pcm->capture_start) {
|
||||||
struct snd_soc_pcm_runtime *soc_pcm_rx =
|
struct snd_soc_pcm_runtime *soc_pcm_rx =
|
||||||
pcm->playback_substream->private_data;
|
pcm->playback_substream->private_data;
|
||||||
struct snd_soc_pcm_runtime *soc_pcm_tx =
|
struct snd_soc_pcm_runtime *soc_pcm_tx =
|
||||||
|
|
Loading…
Add table
Reference in a new issue