Skip to content

Commit 0a0342e

Browse files
povikbroonie
authored andcommitted
ASoC: tas2770: Reinit regcache on reset
On probe of the ASoC component, the device is reset but the regcache is retained. This means the regcache gets out of sync if the codec is rebound to a sound card for a second time. Fix it by reinitializing the regcache to defaults after the device is reset. Fixes: b0bcbe6 ("ASoC: tas2770: Fix calling reset in probe") Signed-off-by: Martin Povišer <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 7042bde commit 0a0342e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sound/soc/codecs/tas2770.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,8 @@ static struct snd_soc_dai_driver tas2770_dai_driver[] = {
495495
},
496496
};
497497

498+
static const struct regmap_config tas2770_i2c_regmap;
499+
498500
static int tas2770_codec_probe(struct snd_soc_component *component)
499501
{
500502
struct tas2770_priv *tas2770 =
@@ -508,6 +510,7 @@ static int tas2770_codec_probe(struct snd_soc_component *component)
508510
}
509511

510512
tas2770_reset(tas2770);
513+
regmap_reinit_cache(tas2770->regmap, &tas2770_i2c_regmap);
511514

512515
return 0;
513516
}

0 commit comments

Comments
 (0)