public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ASoC: SDCA: Initial support for Cirrus Logic CS47L47
@ 2026-02-23 15:02 Richard Fitzgerald
  2026-02-23 15:02 ` [PATCH 1/3] soundwire: intel_auxdevice: Add CS47L47 to wake_capable_list Richard Fitzgerald
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Richard Fitzgerald @ 2026-02-23 15:02 UTC (permalink / raw)
  To: broonie, vkoul; +Cc: linux-kernel, linux-sound, patches

The CS47L47 is a SDCA smart codec with UAJ (headset, jack detect) and DMIC.
This series adds the initial support for the Cirrus Logic CS47L47 codec.

The soundwire patch can be taken separately from the two ASoC patches;
there aren't any build dependencies.

Richard Fitzgerald (3):
  soundwire: intel_auxdevice: Add CS47L47 to wake_capable_list
  ASoC: soc_sdw_utils: Add device info for CS47L47
  ASoC: SDCA: Add CS47L47 to class driver

 drivers/soundwire/intel_auxdevice.c   |  1 +
 include/sound/soc_sdw_utils.h         |  2 +
 sound/soc/sdca/sdca_class.c           |  1 +
 sound/soc/sdw_utils/Makefile          |  1 +
 sound/soc/sdw_utils/soc_sdw_cs47l47.c | 80 +++++++++++++++++++++++++++
 sound/soc/sdw_utils/soc_sdw_utils.c   | 36 ++++++++++++
 6 files changed, 121 insertions(+)
 create mode 100644 sound/soc/sdw_utils/soc_sdw_cs47l47.c

-- 
2.47.3


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] soundwire: intel_auxdevice: Add CS47L47 to wake_capable_list
  2026-02-23 15:02 [PATCH 0/3] ASoC: SDCA: Initial support for Cirrus Logic CS47L47 Richard Fitzgerald
@ 2026-02-23 15:02 ` Richard Fitzgerald
  2026-02-23 15:02 ` [PATCH 2/3] ASoC: soc_sdw_utils: Add device info for CS47L47 Richard Fitzgerald
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Richard Fitzgerald @ 2026-02-23 15:02 UTC (permalink / raw)
  To: broonie, vkoul; +Cc: linux-kernel, linux-sound, patches

The Cirrus Logic CS47L47 codec can generate Jack events so add it to
the wake-capable list.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 drivers/soundwire/intel_auxdevice.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soundwire/intel_auxdevice.c b/drivers/soundwire/intel_auxdevice.c
index 8752b0e3ce74c..9b92ffdfc73b7 100644
--- a/drivers/soundwire/intel_auxdevice.c
+++ b/drivers/soundwire/intel_auxdevice.c
@@ -53,6 +53,7 @@ struct wake_capable_part {
 static struct wake_capable_part wake_capable_list[] = {
 	{0x01fa, 0x4243},
 	{0x01fa, 0x4245},
+	{0x01fa, 0x4747},
 	{0x025d, 0x5682},
 	{0x025d, 0x700},
 	{0x025d, 0x711},
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] ASoC: soc_sdw_utils: Add device info for CS47L47
  2026-02-23 15:02 [PATCH 0/3] ASoC: SDCA: Initial support for Cirrus Logic CS47L47 Richard Fitzgerald
  2026-02-23 15:02 ` [PATCH 1/3] soundwire: intel_auxdevice: Add CS47L47 to wake_capable_list Richard Fitzgerald
@ 2026-02-23 15:02 ` Richard Fitzgerald
  2026-02-23 15:02 ` [PATCH 3/3] ASoC: SDCA: Add CS47L47 to class driver Richard Fitzgerald
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Richard Fitzgerald @ 2026-02-23 15:02 UTC (permalink / raw)
  To: broonie, vkoul; +Cc: linux-kernel, linux-sound, patches

Add a device info entry for the Cirrus Logic CS47L47.

CS47L47 has UAJ (headset speaker + mic + jack detect) and DMICs.
The audio ports are similar to the CS42L45 so can be based on the
CS42L45 code.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 include/sound/soc_sdw_utils.h         |  2 +
 sound/soc/sdw_utils/Makefile          |  1 +
 sound/soc/sdw_utils/soc_sdw_cs47l47.c | 80 +++++++++++++++++++++++++++
 sound/soc/sdw_utils/soc_sdw_utils.c   | 36 ++++++++++++
 4 files changed, 119 insertions(+)
 create mode 100644 sound/soc/sdw_utils/soc_sdw_cs47l47.c

diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h
index 227347c8f0b33..98531e500cbb3 100644
--- a/include/sound/soc_sdw_utils.h
+++ b/include/sound/soc_sdw_utils.h
@@ -259,6 +259,8 @@ int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_so
 int asoc_sdw_cs42l43_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
 int asoc_sdw_cs42l45_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
 int asoc_sdw_cs42l45_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
+int asoc_sdw_cs47l47_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
+int asoc_sdw_cs47l47_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
 int asoc_sdw_cs_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
 int asoc_sdw_maxim_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
 /* TI */
diff --git a/sound/soc/sdw_utils/Makefile b/sound/soc/sdw_utils/Makefile
index e8bd5ffb1a6ad..a8d091fd374b6 100644
--- a/sound/soc/sdw_utils/Makefile
+++ b/sound/soc/sdw_utils/Makefile
@@ -6,6 +6,7 @@ snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o \
 		       soc_sdw_bridge_cs35l56.o 			\
 		       soc_sdw_cs42l42.o soc_sdw_cs42l43.o 		\
 		       soc_sdw_cs42l45.o				\
+		       soc_sdw_cs47l47.o				\
 		       soc_sdw_cs_amp.o					\
 		       soc_sdw_maxim.o \
 		       soc_sdw_ti_amp.o
diff --git a/sound/soc/sdw_utils/soc_sdw_cs47l47.c b/sound/soc/sdw_utils/soc_sdw_cs47l47.c
new file mode 100644
index 0000000000000..259ecf1e0a71a
--- /dev/null
+++ b/sound/soc/sdw_utils/soc_sdw_cs47l47.c
@@ -0,0 +1,80 @@
+// SPDX-License-Identifier: GPL-2.0-only
+// Based on sof_sdw_cs42l45.c
+// This file incorporates work covered by the following copyright notice:
+// Copyright (c) 2023 Intel Corporation
+// Copyright (c) 2024 Advanced Micro Devices, Inc.
+
+/*
+ *  soc_sdw_cs47l47 - Helpers to handle CS47L47 from generic machine driver
+ */
+#include <linux/device.h>
+#include <linux/errno.h>
+#include <sound/jack.h>
+#include <sound/soc.h>
+#include <sound/soc-card.h>
+#include <sound/soc-component.h>
+#include <sound/soc-dai.h>
+#include <sound/soc_sdw_utils.h>
+
+static struct snd_soc_jack_pin soc_jack_pins[] = {
+	{
+		.pin    = "cs47l47 OT 43 Headphone",
+		.mask   = SND_JACK_HEADPHONE,
+	},
+	{
+		.pin    = "cs47l47 OT 45 Headset",
+		.mask   = SND_JACK_HEADPHONE,
+	},
+	{
+		.pin    = "cs47l47 IT 31 Microphone",
+		.mask   = SND_JACK_MICROPHONE,
+	},
+	{
+		.pin    = "cs47l47 IT 33 Headset",
+		.mask   = SND_JACK_MICROPHONE,
+	},
+};
+
+int asoc_sdw_cs47l47_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai)
+{
+	struct snd_soc_card *card = rtd->card;
+	struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component;
+	struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
+	struct snd_soc_jack *jack = &ctx->sdw_headset;
+	int ret;
+
+	card->components = devm_kasprintf(card->dev, GFP_KERNEL, "%s hs:cs47l47",
+					  card->components);
+	if (!card->components)
+		return -ENOMEM;
+
+	ret = snd_soc_card_jack_new_pins(card, "Jack", SND_JACK_MECHANICAL |
+					 SND_JACK_HEADSET | SND_JACK_LINEOUT, jack,
+					 soc_jack_pins, ARRAY_SIZE(soc_jack_pins));
+	if (ret) {
+		dev_err(card->dev, "Failed to create jack: %d\n", ret);
+		return ret;
+	}
+
+	ret = snd_soc_component_set_jack(component, jack, NULL);
+	if (ret) {
+		dev_err(card->dev, "Failed to register jack: %d\n", ret);
+		return ret;
+	}
+
+	return 0;
+}
+EXPORT_SYMBOL_NS(asoc_sdw_cs47l47_hs_rtd_init, "SND_SOC_SDW_UTILS");
+
+int asoc_sdw_cs47l47_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai)
+{
+	struct snd_soc_card *card = rtd->card;
+
+	card->components = devm_kasprintf(card->dev, GFP_KERNEL, "%s mic:cs47l47-dmic",
+					  card->components);
+	if (!card->components)
+		return -ENOMEM;
+
+	return 0;
+}
+EXPORT_SYMBOL_NS(asoc_sdw_cs47l47_dmic_rtd_init, "SND_SOC_SDW_UTILS");
diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/soc_sdw_utils.c
index 0e67d9f34cba3..eeeb91dded9da 100644
--- a/sound/soc/sdw_utils/soc_sdw_utils.c
+++ b/sound/soc/sdw_utils/soc_sdw_utils.c
@@ -759,6 +759,42 @@ struct asoc_sdw_codec_info codec_info_list[] = {
 		},
 		.aux_num = 1,
 	},
+	{
+		.part_id = 0x4747,
+		.name_prefix = "cs47l47",
+		.dais = {
+			{
+				.direction = {true, false},
+				.codec_name = "snd_soc_sdca.UAJ.1",
+				.dai_name = "IT 41",
+				.dai_type = SOC_SDW_DAI_TYPE_JACK,
+				.dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
+				.rtd_init = asoc_sdw_cs47l47_hs_rtd_init,
+			},
+			{
+				.direction = {false, true},
+				.codec_name = "snd_soc_sdca.SmartMic.0",
+				.dai_name = "OT 113",
+				.dai_type = SOC_SDW_DAI_TYPE_MIC,
+				.dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID},
+				.rtd_init = asoc_sdw_cs47l47_dmic_rtd_init,
+			},
+			{
+				.direction = {false, true},
+				.codec_name = "snd_soc_sdca.UAJ.1",
+				.dai_name = "OT 36",
+				.dai_type = SOC_SDW_DAI_TYPE_JACK,
+				.dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_JACK_IN_DAI_ID},
+			},
+		},
+		.dai_num = 3,
+		.auxs = {
+			{
+				.codec_name = "snd_soc_sdca.HID.2",
+			},
+		},
+		.aux_num = 1,
+	},
 	{
 		.part_id = 0xaaaa, /* generic codec mockup */
 		.name_prefix = "sdw_mockup_mmulti-function",
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] ASoC: SDCA: Add CS47L47 to class driver
  2026-02-23 15:02 [PATCH 0/3] ASoC: SDCA: Initial support for Cirrus Logic CS47L47 Richard Fitzgerald
  2026-02-23 15:02 ` [PATCH 1/3] soundwire: intel_auxdevice: Add CS47L47 to wake_capable_list Richard Fitzgerald
  2026-02-23 15:02 ` [PATCH 2/3] ASoC: soc_sdw_utils: Add device info for CS47L47 Richard Fitzgerald
@ 2026-02-23 15:02 ` Richard Fitzgerald
  2026-02-24 11:01 ` [PATCH 0/3] ASoC: SDCA: Initial support for Cirrus Logic CS47L47 Pierre-Louis Bossart
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Richard Fitzgerald @ 2026-02-23 15:02 UTC (permalink / raw)
  To: broonie, vkoul; +Cc: linux-kernel, linux-sound, patches

Add the SoundWire ID for CS47L47 to the class driver.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 sound/soc/sdca/sdca_class.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/sdca/sdca_class.c b/sound/soc/sdca/sdca_class.c
index 918b638acb577..55c33ff63ca21 100644
--- a/sound/soc/sdca/sdca_class.c
+++ b/sound/soc/sdca/sdca_class.c
@@ -317,6 +317,7 @@ static const struct dev_pm_ops class_pm_ops = {
 
 static const struct sdw_device_id class_sdw_id[] = {
 	SDW_SLAVE_ENTRY(0x01FA, 0x4245, 0),
+	SDW_SLAVE_ENTRY(0x01FA, 0x4747, 0),
 	{}
 };
 MODULE_DEVICE_TABLE(sdw, class_sdw_id);
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/3] ASoC: SDCA: Initial support for Cirrus Logic CS47L47
  2026-02-23 15:02 [PATCH 0/3] ASoC: SDCA: Initial support for Cirrus Logic CS47L47 Richard Fitzgerald
                   ` (2 preceding siblings ...)
  2026-02-23 15:02 ` [PATCH 3/3] ASoC: SDCA: Add CS47L47 to class driver Richard Fitzgerald
@ 2026-02-24 11:01 ` Pierre-Louis Bossart
  2026-02-25  7:58 ` (subset) " Vinod Koul
  2026-02-25 19:06 ` Mark Brown
  5 siblings, 0 replies; 7+ messages in thread
From: Pierre-Louis Bossart @ 2026-02-24 11:01 UTC (permalink / raw)
  To: Richard Fitzgerald, broonie, vkoul; +Cc: linux-kernel, linux-sound, patches

On 2/23/26 16:02, Richard Fitzgerald wrote:
> The CS47L47 is a SDCA smart codec with UAJ (headset, jack detect) and DMIC.
> This series adds the initial support for the Cirrus Logic CS47L47 codec.
> 
> The soundwire patch can be taken separately from the two ASoC patches;
> there aren't any build dependencies.
> 
> Richard Fitzgerald (3):
>   soundwire: intel_auxdevice: Add CS47L47 to wake_capable_list
>   ASoC: soc_sdw_utils: Add device info for CS47L47
>   ASoC: SDCA: Add CS47L47 to class driver

LGTM

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>

> 
>  drivers/soundwire/intel_auxdevice.c   |  1 +
>  include/sound/soc_sdw_utils.h         |  2 +
>  sound/soc/sdca/sdca_class.c           |  1 +
>  sound/soc/sdw_utils/Makefile          |  1 +
>  sound/soc/sdw_utils/soc_sdw_cs47l47.c | 80 +++++++++++++++++++++++++++
>  sound/soc/sdw_utils/soc_sdw_utils.c   | 36 ++++++++++++
>  6 files changed, 121 insertions(+)
>  create mode 100644 sound/soc/sdw_utils/soc_sdw_cs47l47.c
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: (subset) [PATCH 0/3] ASoC: SDCA: Initial support for Cirrus Logic CS47L47
  2026-02-23 15:02 [PATCH 0/3] ASoC: SDCA: Initial support for Cirrus Logic CS47L47 Richard Fitzgerald
                   ` (3 preceding siblings ...)
  2026-02-24 11:01 ` [PATCH 0/3] ASoC: SDCA: Initial support for Cirrus Logic CS47L47 Pierre-Louis Bossart
@ 2026-02-25  7:58 ` Vinod Koul
  2026-02-25 19:06 ` Mark Brown
  5 siblings, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2026-02-25  7:58 UTC (permalink / raw)
  To: broonie, Richard Fitzgerald; +Cc: linux-kernel, linux-sound, patches


On Mon, 23 Feb 2026 15:02:53 +0000, Richard Fitzgerald wrote:
> The CS47L47 is a SDCA smart codec with UAJ (headset, jack detect) and DMIC.
> This series adds the initial support for the Cirrus Logic CS47L47 codec.
> 
> The soundwire patch can be taken separately from the two ASoC patches;
> there aren't any build dependencies.
> 
> Richard Fitzgerald (3):
>   soundwire: intel_auxdevice: Add CS47L47 to wake_capable_list
>   ASoC: soc_sdw_utils: Add device info for CS47L47
>   ASoC: SDCA: Add CS47L47 to class driver
> 
> [...]

Applied, thanks!

[1/3] soundwire: intel_auxdevice: Add CS47L47 to wake_capable_list
      commit: 4b8fc2b17272d4379f3c80cee2d6d8b7d998fa8f

Best regards,
-- 
~Vinod



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: (subset) [PATCH 0/3] ASoC: SDCA: Initial support for Cirrus Logic CS47L47
  2026-02-23 15:02 [PATCH 0/3] ASoC: SDCA: Initial support for Cirrus Logic CS47L47 Richard Fitzgerald
                   ` (4 preceding siblings ...)
  2026-02-25  7:58 ` (subset) " Vinod Koul
@ 2026-02-25 19:06 ` Mark Brown
  5 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2026-02-25 19:06 UTC (permalink / raw)
  To: vkoul, Richard Fitzgerald; +Cc: linux-kernel, linux-sound, patches

On Mon, 23 Feb 2026 15:02:53 +0000, Richard Fitzgerald wrote:
> The CS47L47 is a SDCA smart codec with UAJ (headset, jack detect) and DMIC.
> This series adds the initial support for the Cirrus Logic CS47L47 codec.
> 
> The soundwire patch can be taken separately from the two ASoC patches;
> there aren't any build dependencies.
> 
> Richard Fitzgerald (3):
>   soundwire: intel_auxdevice: Add CS47L47 to wake_capable_list
>   ASoC: soc_sdw_utils: Add device info for CS47L47
>   ASoC: SDCA: Add CS47L47 to class driver
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[2/3] ASoC: soc_sdw_utils: Add device info for CS47L47
      commit: 80930d81c4b0753ba2ca750708e4d2fcc0627dc8
[3/3] ASoC: SDCA: Add CS47L47 to class driver
      commit: ada32396f90951e12465224c04742607ca56a982

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-02-25 19:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-23 15:02 [PATCH 0/3] ASoC: SDCA: Initial support for Cirrus Logic CS47L47 Richard Fitzgerald
2026-02-23 15:02 ` [PATCH 1/3] soundwire: intel_auxdevice: Add CS47L47 to wake_capable_list Richard Fitzgerald
2026-02-23 15:02 ` [PATCH 2/3] ASoC: soc_sdw_utils: Add device info for CS47L47 Richard Fitzgerald
2026-02-23 15:02 ` [PATCH 3/3] ASoC: SDCA: Add CS47L47 to class driver Richard Fitzgerald
2026-02-24 11:01 ` [PATCH 0/3] ASoC: SDCA: Initial support for Cirrus Logic CS47L47 Pierre-Louis Bossart
2026-02-25  7:58 ` (subset) " Vinod Koul
2026-02-25 19:06 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox