ASoC: AMD: Clear format bits before setting them

This avoids residual bit form previous format when the format is changed.
Hence, the resultant format is not an invalid one.

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com>
Link: https://lore.kernel.org/r/20200328093921.32211-1-akshu.agrawal@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Akshu Agrawal 2020-03-28 03:39:16 -06:00 коммит произвёл Mark Brown
Родитель 76385a665f
Коммит a91ab6509c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 24D68B725D5487D0
2 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -139,6 +139,7 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
rv_writel(adata->tdm_fmt, rtd->acp3x_base + frmt_reg); rv_writel(adata->tdm_fmt, rtd->acp3x_base + frmt_reg);
} }
val = rv_readl(rtd->acp3x_base + reg_val); val = rv_readl(rtd->acp3x_base + reg_val);
val &= ~ACP3x_ITER_IRER_SAMP_LEN_MASK;
val = val | (rtd->xfer_resolution << 3); val = val | (rtd->xfer_resolution << 3);
rv_writel(val, rtd->acp3x_base + reg_val); rv_writel(val, rtd->acp3x_base + reg_val);
return 0; return 0;

Просмотреть файл

@ -76,6 +76,8 @@
#define ACP_POWERED_OFF 0x02 #define ACP_POWERED_OFF 0x02
#define ACP_POWER_OFF_IN_PROGRESS 0x03 #define ACP_POWER_OFF_IN_PROGRESS 0x03
#define ACP3x_ITER_IRER_SAMP_LEN_MASK 0x38
struct acp3x_platform_info { struct acp3x_platform_info {
u16 play_i2s_instance; u16 play_i2s_instance;
u16 cap_i2s_instance; u16 cap_i2s_instance;