diff options
author | Vlad Karpovich <vkarpovi@opensource.cirrus.com> | 2023-08-31 11:20:40 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-09-11 01:30:03 +0100 |
commit | 18050443b9fc4e809c077fbf0967349410e86117 (patch) | |
tree | 23db84e9206cc44e0ffa23130e21262a97fa518b /sound/soc/codecs/cs35l45-tables.c | |
parent | 44f37b6ce041c838cb2f49f08998c41f1ab3b08c (diff) | |
download | linux-18050443b9fc4e809c077fbf0967349410e86117.tar.gz linux-18050443b9fc4e809c077fbf0967349410e86117.tar.bz2 linux-18050443b9fc4e809c077fbf0967349410e86117.zip |
ASoC: cs35l45: Analog PCM Volume and Amplifier Mode controls
Adds "Analog PCM Volume" control with supported values
0 = 10dB,1 = 13dB,2 = 16dB and 3 = 19dB.
The amplifier can operate either in Speaker Mode or Receiver Mode
as configured by the user. Speaker Mode has four gain options
to support maximum amplifier output amplitude for loud
speaker application. Receiver Mode has further optimized
noise performance while maintaining sufficient output to support
phone receiver application. While configured in Receiver Mode,
the analog PCM Volume control is disabled and
the analog gain is fixed to 1dB.
Signed-off-by: Vlad Karpovich <vkarpovi@opensource.cirrus.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230831162042.471801-2-vkarpovi@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/cs35l45-tables.c')
-rw-r--r-- | sound/soc/codecs/cs35l45-tables.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/cs35l45-tables.c b/sound/soc/codecs/cs35l45-tables.c index 621af1785979..e1cebb9e4dc6 100644 --- a/sound/soc/codecs/cs35l45-tables.c +++ b/sound/soc/codecs/cs35l45-tables.c @@ -91,6 +91,7 @@ static const struct reg_default cs35l45_defaults[] = { { CS35L45_DSP1RX7_INPUT, 0x0000003A }, { CS35L45_DSP1RX8_INPUT, 0x00000028 }, { CS35L45_AMP_PCM_CONTROL, 0x00100000 }, + { CS35L45_AMP_GAIN, 0x00002300 }, { CS35L45_IRQ1_CFG, 0x00000000 }, { CS35L45_IRQ1_MASK_1, 0xBFEFFFBF }, { CS35L45_IRQ1_MASK_2, 0xFFFFFFFF }, @@ -156,7 +157,9 @@ static bool cs35l45_readable_reg(struct device *dev, unsigned int reg) case CS35L45_DSP1RX6_INPUT: case CS35L45_DSP1RX7_INPUT: case CS35L45_DSP1RX8_INPUT: + case CS35L45_HVLV_CONFIG: case CS35L45_AMP_PCM_CONTROL: + case CS35L45_AMP_GAIN: case CS35L45_AMP_PCM_HPF_TST: case CS35L45_IRQ1_CFG: case CS35L45_IRQ1_STATUS: |