Skip to content

Commit 782e6c5

Browse files
rfvirgilbroonie
authored andcommitted
ASoC: cs35l56: Fix default SDW TX mixer registers
Patch the SDW TX mixer registers to silicon defaults. CS35L56 is designed for SDCA and a generic SDCA driver would know nothing about these chip-specific registers. So the firmware sets up the SDW TX mixer registers to whatever audio is relevant on a specific system. This means that the driver cannot assume the initial values of these registers. But Linux has ALSA controls to configure routing, so the registers can be patched to silicon default and the ALSA controls used to select what audio to feed back to the host capture path. Backport note: This won't apply to kernels older than v6.6. Signed-off-by: Richard Fitzgerald <[email protected]> Fixes: e496112 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56") Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 72a77d7 commit 782e6c5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

sound/soc/codecs/cs35l56-shared.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212
#include "cs35l56.h"
1313

1414
static const struct reg_sequence cs35l56_patch[] = {
15+
/*
16+
* Firmware can change these to non-defaults to satisfy SDCA.
17+
* Ensure that they are at known defaults.
18+
*/
19+
{ CS35L56_SWIRE_DP3_CH1_INPUT, 0x00000018 },
20+
{ CS35L56_SWIRE_DP3_CH2_INPUT, 0x00000019 },
21+
{ CS35L56_SWIRE_DP3_CH3_INPUT, 0x00000029 },
22+
{ CS35L56_SWIRE_DP3_CH4_INPUT, 0x00000028 },
23+
1524
/* These are not reset by a soft-reset, so patch to defaults. */
1625
{ CS35L56_MAIN_RENDER_USER_MUTE, 0x00000000 },
1726
{ CS35L56_MAIN_RENDER_USER_VOLUME, 0x00000000 },

0 commit comments

Comments
 (0)