Skip to content

Commit 043b8da

Browse files
codekipperbroonie
authored andcommitted
ASoC: sun4i-i2s: Update global enable with bitmask
The default value of the config register is different on newer SoCs and therefore enabling/disabling with a register write will clear bits used to set the direction of the clock and frame pins. Signed-off-by: Marcus Cooper <[email protected]> Reviewed-by: Chen-Yu Tsai <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent d03d273 commit 043b8da

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sound/soc/sunxi/sun4i-i2s.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,8 @@ static int sun4i_i2s_startup(struct snd_pcm_substream *substream,
529529
struct sun4i_i2s *i2s = snd_soc_dai_get_drvdata(dai);
530530

531531
/* Enable the whole hardware block */
532-
regmap_write(i2s->regmap, SUN4I_I2S_CTRL_REG,
533-
SUN4I_I2S_CTRL_GL_EN);
532+
regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG,
533+
SUN4I_I2S_CTRL_GL_EN, SUN4I_I2S_CTRL_GL_EN);
534534

535535
/* Enable the first output line */
536536
regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG,
@@ -553,7 +553,8 @@ static void sun4i_i2s_shutdown(struct snd_pcm_substream *substream,
553553
SUN4I_I2S_CTRL_SDO_EN_MASK, 0);
554554

555555
/* Disable the whole hardware block */
556-
regmap_write(i2s->regmap, SUN4I_I2S_CTRL_REG, 0);
556+
regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG,
557+
SUN4I_I2S_CTRL_GL_EN, 0);
557558
}
558559

559560
static int sun4i_i2s_set_sysclk(struct snd_soc_dai *dai, int clk_id,

0 commit comments

Comments
 (0)