Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: cs35l45: Add AMP Enable Switch control

The "AMP Enable Switch" is useful in systems with multiple
amplifiers connected to the same audio bus
but not all of them are needed for all use cases.

Signed-off-by: Vlad Karpovich <vkarpovi@opensource.cirrus.com>
Acked-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230831162042.471801-4-vkarpovi@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Vlad Karpovich and committed by
Mark Brown
c3c9b17d 3fecf69a

+6 -1
+6 -1
sound/soc/codecs/cs35l45.c
··· 417 417 static const struct snd_kcontrol_new cs35l45_dac_muxes[] = { 418 418 SOC_DAPM_ENUM("DACPCM Source", cs35l45_dacpcm_enums[0]), 419 419 }; 420 + static const struct snd_kcontrol_new amp_en_ctl = 421 + SOC_DAPM_SINGLE("Switch", SND_SOC_NOPM, 0, 1, 0); 420 422 421 423 static const struct snd_soc_dapm_widget cs35l45_dapm_widgets[] = { 422 424 SND_SOC_DAPM_SPK("DSP1 Preload", NULL), ··· 480 478 SND_SOC_DAPM_MUX("DSP_RX8 Source", SND_SOC_NOPM, 0, 0, &cs35l45_dsp_muxes[7]), 481 479 482 480 SND_SOC_DAPM_MUX("DACPCM Source", SND_SOC_NOPM, 0, 0, &cs35l45_dac_muxes[0]), 481 + 482 + SND_SOC_DAPM_SWITCH("AMP Enable", SND_SOC_NOPM, 0, 0, &amp_en_ctl), 483 483 484 484 SND_SOC_DAPM_OUT_DRV("AMP", SND_SOC_NOPM, 0, 0, NULL, 0), 485 485 ··· 590 586 591 587 CS35L45_DAC_MUX_ROUTE("DACPCM"), 592 588 593 - { "SPK", NULL, "AMP"}, 589 + { "AMP Enable", "Switch", "AMP" }, 590 + { "SPK", NULL, "AMP Enable"}, 594 591 }; 595 592 596 593 static const char * const amplifier_mode_texts[] = {"SPK", "RCV"};