Skip to content

Commit 1bba0ba

Browse files
rfvirgilbroonie
authored andcommitted
ASoC: cs35l56: ASP1 DOUT must default to Hi-Z when not transmitting
The ASP1 DOUT line must be defaulted to be high-impedance when it is not actually transmitting data for an active channel. In non-SoundWire modes ASP1 will usually be shared by multiple amps so each amp must only drive the line during the slot for an enabled TX channel. In SoundWire mode a custom firmware can use ASP1 as a secondary chip-to-chip audio link or as GPIO. It should be defaulted to high-impedance since by default the purpose of this pin is not known. Backport note: On kernel versions before 6.6 the cs35l56->base.regmap argument to regmap_set_bits() must be changed to cs35l56->regmap. Signed-off-by: Richard Fitzgerald <[email protected]> Fixes: e496112 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent cc660a4 commit 1bba0ba

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sound/soc/codecs/cs35l56.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,6 +1186,12 @@ int cs35l56_init(struct cs35l56_private *cs35l56)
11861186
/* Registers could be dirty after soft reset or SoundWire enumeration */
11871187
regcache_sync(cs35l56->base.regmap);
11881188

1189+
/* Set ASP1 DOUT to high-impedance when it is not transmitting audio data. */
1190+
ret = regmap_set_bits(cs35l56->base.regmap, CS35L56_ASP1_CONTROL3,
1191+
CS35L56_ASP1_DOUT_HIZ_CTRL_MASK);
1192+
if (ret)
1193+
return dev_err_probe(cs35l56->base.dev, ret, "Failed to write ASP1_CONTROL3\n");
1194+
11891195
cs35l56->base.init_done = true;
11901196
complete(&cs35l56->init_completion);
11911197

0 commit comments

Comments
 (0)