Skip to content

Commit a91ab65

Browse files
Akshu Agrawalbroonie
authored andcommitted
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 <[email protected]> Signed-off-by: Ravulapati Vishnu vardhan rao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 76385a6 commit a91ab65

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

sound/soc/amd/raven/acp3x-i2s.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
139139
rv_writel(adata->tdm_fmt, rtd->acp3x_base + frmt_reg);
140140
}
141141
val = rv_readl(rtd->acp3x_base + reg_val);
142+
val &= ~ACP3x_ITER_IRER_SAMP_LEN_MASK;
142143
val = val | (rtd->xfer_resolution << 3);
143144
rv_writel(val, rtd->acp3x_base + reg_val);
144145
return 0;

sound/soc/amd/raven/acp3x.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@
7676
#define ACP_POWERED_OFF 0x02
7777
#define ACP_POWER_OFF_IN_PROGRESS 0x03
7878

79+
#define ACP3x_ITER_IRER_SAMP_LEN_MASK 0x38
80+
7981
struct acp3x_platform_info {
8082
u16 play_i2s_instance;
8183
u16 cap_i2s_instance;

0 commit comments

Comments
 (0)