From: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> To: unlisted-recipients:; (no To-header on input) Cc: <Alexander.Deucher@amd.com>, <broonie@kernel.org>, "Ravulapati Vishnu vardhan rao" <Vishnuvardhanrao.Ravulapati@amd.com>, Liam Girdwood <lgirdwood@gmail.com>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Akshu Agrawal <akshu.agrawal@amd.com>, Wei Yongjun <weiyongjun1@huawei.com>, "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." <alsa-devel@alsa-project.org>, open list <linux-kernel@vger.kernel.org> Subject: [PATCH] ASoC: amd: Changing Audio Format does not reflect. Date: Thu, 19 Mar 2020 16:52:53 +0530 [thread overview] Message-ID: <1584616991-27348-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> (raw) When you run aplay subsequently as below by changing the stream format: aplay -Dhw:2,0 -c2 -fS16_LE -r48000 /dev/zero -vv -d 5;aplay -Dhw:2,0 -c2 -fS24_LE -r48000 /dev/zero -vv as a single command, the format gets corrupted and audio does not play. So clear the ACP_(I2S/BT)TDM_ITER/IRER register when dma stops. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> --- sound/soc/amd/raven/acp3x-i2s.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c index 3a3c47e..b07c50a 100644 --- a/sound/soc/amd/raven/acp3x-i2s.c +++ b/sound/soc/amd/raven/acp3x-i2s.c @@ -240,9 +240,7 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream, reg_val = mmACP_I2STDM_IRER; } } - val = rv_readl(rtd->acp3x_base + reg_val); - val = val & ~BIT(0); - rv_writel(val, rtd->acp3x_base + reg_val); + rv_writel(0, rtd->acp3x_base + reg_val); if (!(rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER) & BIT(0)) && !(rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER) & BIT(0))) -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." <alsa-devel@alsa-project.org>, open list <linux-kernel@vger.kernel.org>, Takashi Iwai <tiwai@suse.com>, Liam Girdwood <lgirdwood@gmail.com>, Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com>, broonie@kernel.org, Wei Yongjun <weiyongjun1@huawei.com>, Alexander.Deucher@amd.com, Akshu Agrawal <akshu.agrawal@amd.com> Subject: [PATCH] ASoC: amd: Changing Audio Format does not reflect. Date: Thu, 19 Mar 2020 16:52:53 +0530 [thread overview] Message-ID: <1584616991-27348-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> (raw) When you run aplay subsequently as below by changing the stream format: aplay -Dhw:2,0 -c2 -fS16_LE -r48000 /dev/zero -vv -d 5;aplay -Dhw:2,0 -c2 -fS24_LE -r48000 /dev/zero -vv as a single command, the format gets corrupted and audio does not play. So clear the ACP_(I2S/BT)TDM_ITER/IRER register when dma stops. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> --- sound/soc/amd/raven/acp3x-i2s.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c index 3a3c47e..b07c50a 100644 --- a/sound/soc/amd/raven/acp3x-i2s.c +++ b/sound/soc/amd/raven/acp3x-i2s.c @@ -240,9 +240,7 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream, reg_val = mmACP_I2STDM_IRER; } } - val = rv_readl(rtd->acp3x_base + reg_val); - val = val & ~BIT(0); - rv_writel(val, rtd->acp3x_base + reg_val); + rv_writel(0, rtd->acp3x_base + reg_val); if (!(rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER) & BIT(0)) && !(rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER) & BIT(0))) -- 2.7.4
next reply other threads:[~2020-03-19 11:26 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-19 11:22 Ravulapati Vishnu vardhan rao [this message] 2020-03-19 11:22 ` [PATCH] ASoC: amd: Changing Audio Format does not reflect Ravulapati Vishnu vardhan rao 2020-03-20 4:09 ` Agrawal, Akshu 2020-03-20 4:09 ` Agrawal, Akshu 2020-03-24 10:16 ` RAVULAPATI, VISHNU VARDHAN RAO 2020-03-24 10:16 ` RAVULAPATI, VISHNU VARDHAN RAO 2020-03-24 11:25 ` Agrawal, Akshu 2020-03-24 11:25 ` Agrawal, Akshu
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1584616991-27348-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com \ --to=vishnuvardhanrao.ravulapati@amd.com \ --cc=Alexander.Deucher@amd.com \ --cc=akshu.agrawal@amd.com \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=lgirdwood@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=perex@perex.cz \ --cc=tiwai@suse.com \ --cc=weiyongjun1@huawei.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.