[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8b1ab5dd-954e-29b7-b51f-f8c3e09a1521@amd.com>
Date: Fri, 20 Mar 2020 09:39:21 +0530
From: "Agrawal, Akshu" <aagrawal2@....com>
To: Ravulapati Vishnu vardhan rao
<Vishnuvardhanrao.Ravulapati@....com>
Cc: Alexander.Deucher@....com, broonie@...nel.org,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Akshu Agrawal <akshu.agrawal@....com>,
Wei Yongjun <weiyongjun1@...wei.com>,
"moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..."
<alsa-devel@...a-project.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ASoC: amd: Changing Audio Format does not reflect.
On 3/19/2020 4:52 PM, Ravulapati Vishnu vardhan rao wrote:
> 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@....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);
Clearing the entire register might result in issues.
IMO better fix is to have a sample_len mask for ITER and IRER register.
Use it to clear sample length bits in acp3x_i2s_hwparams function before
setting the new format resolution.
Thanks,
Akshu
Powered by blists - more mailing lists