Commit 67e69e1d authored by Akshu Agrawal's avatar Akshu Agrawal Committed by Mark Brown

ASoC: amd: Fix simultaneous playback and capture

Stopping of one stream is killing the other stream when they
are running simultaneously. This is because, IER register is
cleared which disables I2S and overrides any other block enables.

Clearing IER register only when all streams on a channel are disabled,
fixes the issue.
Signed-off-by: default avatarAkshu Agrawal <akshu.agrawal@amd.com>
Link: https://lore.kernel.org/r/20200128103029.128841-1-akshu.agrawal@amd.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 98ff5c26
...@@ -234,30 +234,32 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream, ...@@ -234,30 +234,32 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
switch (rtd->i2s_instance) { switch (rtd->i2s_instance) {
case I2S_BT_INSTANCE: case I2S_BT_INSTANCE:
reg_val = mmACP_BTTDM_ITER; reg_val = mmACP_BTTDM_ITER;
ier_val = mmACP_BTTDM_IER;
break; break;
case I2S_SP_INSTANCE: case I2S_SP_INSTANCE:
default: default:
reg_val = mmACP_I2STDM_ITER; reg_val = mmACP_I2STDM_ITER;
ier_val = mmACP_I2STDM_IER;
} }
} else { } else {
switch (rtd->i2s_instance) { switch (rtd->i2s_instance) {
case I2S_BT_INSTANCE: case I2S_BT_INSTANCE:
reg_val = mmACP_BTTDM_IRER; reg_val = mmACP_BTTDM_IRER;
ier_val = mmACP_BTTDM_IER;
break; break;
case I2S_SP_INSTANCE: case I2S_SP_INSTANCE:
default: default:
reg_val = mmACP_I2STDM_IRER; reg_val = mmACP_I2STDM_IRER;
ier_val = mmACP_I2STDM_IER;
} }
} }
val = rv_readl(rtd->acp3x_base + reg_val); val = rv_readl(rtd->acp3x_base + reg_val);
val = val & ~BIT(0); val = val & ~BIT(0);
rv_writel(val, rtd->acp3x_base + reg_val); rv_writel(val, rtd->acp3x_base + reg_val);
rv_writel(0, rtd->acp3x_base + ier_val);
if (!(rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER) & BIT(0)) &&
!(rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER) & BIT(0)))
rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
if (!(rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER) & BIT(0)) &&
!(rv_readl(rtd->acp3x_base + mmACP_I2STDM_IRER) & BIT(0)))
rv_writel(0, rtd->acp3x_base + mmACP_I2STDM_IER);
ret = 0; ret = 0;
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment