From: Vlad Karpovich <vkarpovi@opensource.cirrus.com>
To: James Schulman <james.schulman@cirrus.com>,
David Rhodes <david.rhodes@cirrus.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>, Rob Herring <robh+dt@kernel.org>
Cc: <alsa-devel@alsa-project.org>, <patches@opensource.cirrus.com>,
<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
<RicardoRivera-Matosricardo.rivera-matos@cirrus.com>,
Vlad Karpovich <vkarpovi@opensource.cirrus.com>
Subject: [PATCH 7/7] ASoC: cs35l45: Add AMP Enable Switch control
Date: Mon, 28 Aug 2023 12:05:25 -0500 [thread overview]
Message-ID: <20230828170525.335671-7-vkarpovi@opensource.cirrus.com> (raw)
In-Reply-To: <20230828170525.335671-1-vkarpovi@opensource.cirrus.com>
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>
---
sound/soc/codecs/cs35l45.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/cs35l45.c b/sound/soc/codecs/cs35l45.c
index 6c8f179b9c1c..ddbf26f2e73a 100644
--- a/sound/soc/codecs/cs35l45.c
+++ b/sound/soc/codecs/cs35l45.c
@@ -417,6 +417,8 @@ static const struct snd_kcontrol_new cs35l45_dsp_muxes[] = {
static const struct snd_kcontrol_new cs35l45_dac_muxes[] = {
SOC_DAPM_ENUM("DACPCM Source", cs35l45_dacpcm_enums[0]),
};
+static const struct snd_kcontrol_new amp_en_ctl =
+ SOC_DAPM_SINGLE("Switch", SND_SOC_NOPM, 0, 1, 0);
static const struct snd_soc_dapm_widget cs35l45_dapm_widgets[] = {
SND_SOC_DAPM_SPK("DSP1 Preload", NULL),
@@ -479,6 +481,8 @@ static const struct snd_soc_dapm_widget cs35l45_dapm_widgets[] = {
SND_SOC_DAPM_MUX("DACPCM Source", SND_SOC_NOPM, 0, 0, &cs35l45_dac_muxes[0]),
+ SND_SOC_DAPM_SWITCH("AMP Enable", SND_SOC_NOPM, 0, 0, &_en_ctl),
+
SND_SOC_DAPM_OUT_DRV("AMP", SND_SOC_NOPM, 0, 0, NULL, 0),
SND_SOC_DAPM_OUTPUT("SPK"),
@@ -586,7 +590,8 @@ static const struct snd_soc_dapm_route cs35l45_dapm_routes[] = {
CS35L45_DAC_MUX_ROUTE("DACPCM"),
- { "SPK", NULL, "AMP"},
+ { "AMP Enable", "Switch", "AMP" },
+ { "SPK", NULL, "AMP Enable"},
};
static const char * const amplifier_mode_texts[] = {"SPK", "RCV"};
--
2.25.1
next prev parent reply other threads:[~2023-08-28 17:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-28 17:05 [PATCH 1/7] ASoC: cs35l45: Add support for Chip ID 0x35A460 Vlad Karpovich
2023-08-28 17:05 ` [PATCH 2/7] ASoC: cs35l45: Fix "Dead assigment" warning Vlad Karpovich
2023-08-29 10:04 ` Charles Keepax
2023-08-28 17:05 ` [PATCH 3/7] ASoC: cs35l45: Checks index of cs35l45_irqs[] Vlad Karpovich
2023-08-29 10:07 ` Charles Keepax
2023-08-29 18:17 ` Vlad Karpovich
2023-08-28 17:05 ` [PATCH 4/7] ASoC: cs35l45: Analog PCM Volume and Amplifier Mode controls Vlad Karpovich
2023-08-28 19:39 ` Mark Brown
2023-08-30 15:55 ` Vlad Karpovich
2023-08-28 17:05 ` [PATCH 5/7] ASoC: cs35l45: Rename DACPCM1 Source control Vlad Karpovich
2023-08-29 10:08 ` Charles Keepax
2023-08-28 17:05 ` [PATCH 6/7] ASoC: cs35l45: Connect DSP to the monitoring signals Vlad Karpovich
2023-08-29 10:11 ` Charles Keepax
2023-08-28 17:05 ` Vlad Karpovich [this message]
2023-08-29 10:13 ` [PATCH 7/7] ASoC: cs35l45: Add AMP Enable Switch control Charles Keepax
2023-08-29 10:04 ` [PATCH 1/7] ASoC: cs35l45: Add support for Chip ID 0x35A460 Charles Keepax
2023-08-29 19:12 ` (subset) " Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230828170525.335671-7-vkarpovi@opensource.cirrus.com \
--to=vkarpovi@opensource.cirrus.com \
--cc=RicardoRivera-Matosricardo.rivera-matos@cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=david.rhodes@cirrus.com \
--cc=devicetree@vger.kernel.org \
--cc=james.schulman@cirrus.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=rf@opensource.cirrus.com \
--cc=robh+dt@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®