History

ASoC: cs35l41: Add ASP TX3/4 source to register patch

The mixer controls for ASP TX3/4 are set to values that are not included in their enumeration control. This will cause spurious event notifications when the controls are first changed, as the register value changes whilst the actual visible enumeration value does not. Use the register patch to set them to a known value, zero, which equates to zero fill, thereby avoiding the spurious notifications.

Charles Keepax committed 4 years ago

Commit 46b0d051 parent 11d7a121 file · +8 −2Browse files

Unified · Split

sound/soc/codecs/cs35l41-lib.c+8−2
@@ -37,8 +37,8 @@ static const struct reg_default cs35l41_reg[] = { · 36 unmodified lines
37 { CS35L41_DAC_PCM1_SRC, 0x00000008 },37 { CS35L41_DAC_PCM1_SRC, 0x00000008 },
38 { CS35L41_ASP_TX1_SRC, 0x00000018 },38 { CS35L41_ASP_TX1_SRC, 0x00000018 },
39 { CS35L41_ASP_TX2_SRC, 0x00000019 },39 { CS35L41_ASP_TX2_SRC, 0x00000019 },
40 { CS35L41_ASP_TX3_SRC, 0x00000020 },40 { CS35L41_ASP_TX3_SRC, 0x00000000 },
41 { CS35L41_ASP_TX4_SRC, 0x00000021 },41 { CS35L41_ASP_TX4_SRC, 0x00000000 },
42 { CS35L41_DSP1_RX1_SRC, 0x00000008 },42 { CS35L41_DSP1_RX1_SRC, 0x00000008 },
43 { CS35L41_DSP1_RX2_SRC, 0x00000009 },43 { CS35L41_DSP1_RX2_SRC, 0x00000009 },
44 { CS35L41_DSP1_RX3_SRC, 0x00000018 },44 { CS35L41_DSP1_RX3_SRC, 0x00000018 },
@@ -644,6 +644,8 @@ static const struct reg_sequence cs35l41_reva0_errata_patch[] = { · 599 unmodified lines
644 { CS35L41_DSP1_XM_ACCEL_PL0_PRI, 0x00000000 },644 { CS35L41_DSP1_XM_ACCEL_PL0_PRI, 0x00000000 },
645 { CS35L41_PWR_CTRL2, 0x00000000 },645 { CS35L41_PWR_CTRL2, 0x00000000 },
646 { CS35L41_AMP_GAIN_CTRL, 0x00000000 },646 { CS35L41_AMP_GAIN_CTRL, 0x00000000 },
647 { CS35L41_ASP_TX3_SRC, 0x00000000 },
648 { CS35L41_ASP_TX4_SRC, 0x00000000 },
647};649};
648 650
649static const struct reg_sequence cs35l41_revb0_errata_patch[] = {651static const struct reg_sequence cs35l41_revb0_errata_patch[] = {
@@ -655,6 +657,8 @@ static const struct reg_sequence cs35l41_revb0_errata_patch[] = { · 5 unmodified lines
655 { CS35L41_DSP1_XM_ACCEL_PL0_PRI, 0x00000000 },657 { CS35L41_DSP1_XM_ACCEL_PL0_PRI, 0x00000000 },
656 { CS35L41_PWR_CTRL2, 0x00000000 },658 { CS35L41_PWR_CTRL2, 0x00000000 },
657 { CS35L41_AMP_GAIN_CTRL, 0x00000000 },659 { CS35L41_AMP_GAIN_CTRL, 0x00000000 },
660 { CS35L41_ASP_TX3_SRC, 0x00000000 },
661 { CS35L41_ASP_TX4_SRC, 0x00000000 },
658};662};
659 663
660static const struct reg_sequence cs35l41_revb2_errata_patch[] = {664static const struct reg_sequence cs35l41_revb2_errata_patch[] = {
@@ -666,6 +670,8 @@ static const struct reg_sequence cs35l41_revb2_errata_patch[] = { · 5 unmodified lines
666 { CS35L41_DSP1_XM_ACCEL_PL0_PRI, 0x00000000 },670 { CS35L41_DSP1_XM_ACCEL_PL0_PRI, 0x00000000 },
667 { CS35L41_PWR_CTRL2, 0x00000000 },671 { CS35L41_PWR_CTRL2, 0x00000000 },
668 { CS35L41_AMP_GAIN_CTRL, 0x00000000 },672 { CS35L41_AMP_GAIN_CTRL, 0x00000000 },
673 { CS35L41_ASP_TX3_SRC, 0x00000000 },
674 { CS35L41_ASP_TX4_SRC, 0x00000000 },
669};675};
670 676
671static const struct reg_sequence cs35l41_fs_errata_patch[] = {677static const struct reg_sequence cs35l41_fs_errata_patch[] = {