Skip to contentSkip to conversation

ASoC: Add Intel machine driver support for CS35L56 on SSP

PATCH In review Richard Fitzgerald 2 participants 4 messages Mar 4, 2025 – Mar 24, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover ASoC: Add Intel machine driver support for CS35L56 on SSP

This adds support to the Intel machine drivers for CS35L56 codecs on Intel SSP port using TDM. Also adds the match entries for this on Tigerlake systems.

Richard Fitzgerald (2):
ASoC: Intel: Add sof_cs35l56 driver for CS35L56 on SSP2.
ASoC: Intel: tgl-match: Add CS35L56 on SSP2 for CDB35L56-FOUR board

 MAINTAINERS                                   |   1 +
 include/sound/soc-acpi-intel-ssp-common.h     |   2 +
 sound/soc/intel/boards/Kconfig                |  15 ++
 sound/soc/intel/boards/Makefile               |   2 +
 sound/soc/intel/boards/sof_cs35l56.c          | 254 ++++++++++++++++++
 .../intel/common/soc-acpi-intel-ssp-common.c  |   1 +
 .../intel/common/soc-acpi-intel-tgl-match.c   |   5 +
 7 files changed, 280 insertions(+)
 create mode 100644 sound/soc/intel/boards/sof_cs35l56.c
Signature · 1 line
2.39.5
#1 lore raw

PATCH 1/2 ASoC: Intel: Add sof_cs35l56 driver for CS35L56 on SSP2.

Adds a SOF machine driver for CS35L56 using TDM over SSP2.

This sets up an audio configuration of:

48kHz, DSP_A, 8 TDM slots of 16-bits.
SSP2 Playback (2 ch) -> slot 0 and 1, shared by all CS35L56. SSP2 Capture (8ch) <- Two slots per CS35L56.

This gives stereo playback to all amps, and 8-channel capture for feedback of 2 channels per amp for 4x amps.

The amps on the CDB35L56-FOUR board can be controlled either over I2C or SPI, and this affects the device name of the instantiated codec drivers. The intantiated DAIs are auto-detected by looking for a struct snd_soc_dai_link_component list that matches the codec DAIs present in the system.

---
 MAINTAINERS                          |   1 +
 sound/soc/intel/boards/Kconfig       |  15 ++
 sound/soc/intel/boards/Makefile      |   2 +
 sound/soc/intel/boards/sof_cs35l56.c | 254 +++++++++++++++++++++++++++
 4 files changed, 272 insertions(+)
 create mode 100644 sound/soc/intel/boards/sof_cs35l56.c
MAINTAINERS +1 -0
index 68aa12e44973..4ef5b22e0c3d 100644
@@ -5537,6 +5537,7 @@ F:	sound/pci/hda/cs*
 F:	sound/pci/hda/hda_component*
 F:	sound/pci/hda/hda_cs_dsp_ctl.*
 F:	sound/soc/codecs/cs*
+F:	sound/soc/intel/boards/sof_cs35l56.c
 
 CIRRUS LOGIC HAPTIC DRIVERS
 M:	James Ogletree <[email protected]>
sound/soc/intel/boards/Kconfig +15 -0
index 9b80b19bb8d0..4954bc67a45a 100644
@@ -346,6 +346,21 @@ config SND_SOC_INTEL_SOF_RT5682_MACH
 	   Say Y if you have such a device.
 	   If unsure select "N".
 
+config SND_SOC_INTEL_SOF_CS35L56_MACH
+	tristate "SOF with cs35l56 codec on SSP"
+	depends on I2C || SPI_MASTER
+	depends on ACPI
+	depends on (MFD_INTEL_LPSS || COMPILE_TEST)
+	select SND_SOC_CS35L56_I2C if I2C
+	select SND_SOC_CS35L56_SPI if SPI_MASTER
+	select SND_SOC_INTEL_HDA_DSP_COMMON
+	select SND_SOC_INTEL_SOF_BOARD_HELPERS
+	help
+	   This adds support for ASoC machine driver for SOF platforms
+	   with cs35l56 Smart Amp on SSP port.
+	   Say Y if you have such a device.
+	   If unsure select "N".
+
 config SND_SOC_INTEL_SOF_CS42L42_MACH
 	tristate "SOF with cs42l42 codec in I2S Mode"
 	depends on I2C && ACPI
sound/soc/intel/boards/Makefile +2 -0
index fcd517d6c279..861805ebc342 100644
@@ -17,6 +17,7 @@ snd-soc-sst-byt-cht-da7213-y := bytcht_da7213.o
 snd-soc-sst-byt-cht-es8316-y := bytcht_es8316.o
 snd-soc-sst-byt-cht-nocodec-y := bytcht_nocodec.o
 snd-soc-sof_rt5682-y := sof_rt5682.o
+snd-soc-sof_cs35l56-y := sof_cs35l56.o
 snd-soc-sof_cs42l42-y := sof_cs42l42.o
 snd-soc-sof_es8336-y := sof_es8336.o
 snd-soc-sof_nau8825-y := sof_nau8825.o
@@ -27,6 +28,7 @@ snd-soc-sof-ssp-amp-y := sof_ssp_amp.o
 snd-soc-sof-sdw-y += sof_sdw.o				\
 			sof_sdw_hdmi.o
 obj-$(CONFIG_SND_SOC_INTEL_SOF_RT5682_MACH) += snd-soc-sof_rt5682.o
+obj-$(CONFIG_SND_SOC_INTEL_SOF_CS35L56_MACH) += snd-soc-sof_cs35l56.o
 obj-$(CONFIG_SND_SOC_INTEL_SOF_CS42L42_MACH) += snd-soc-sof_cs42l42.o
 obj-$(CONFIG_SND_SOC_INTEL_SOF_ES8336_MACH) += snd-soc-sof_es8336.o
 obj-$(CONFIG_SND_SOC_INTEL_SOF_NAU8825_MACH) += snd-soc-sof_nau8825.o
sound/soc/intel/boards/sof_cs35l56.c new file +254 -0

254 lines not on this page · raw message

Signature · 1 line
2.39.5
#2 lore raw

PATCH 2/2 ASoC: Intel: tgl-match: Add CS35L56 on SSP2 for CDB35L56-FOUR board

In reply to Richard Fitzgerald

This adds a match for CS35L56 on SSP2, as used on the Cirrus Logic CDB35L56-FOUR board, and also adds an entry in ssp-common for the CS35L56.

The intended host is an Aaeon UpXtreme i11 (TGL). This board does not have NHLT so the SSP and topology are hardcoded.

---
 include/sound/soc-acpi-intel-ssp-common.h          | 2 ++
 sound/soc/intel/common/soc-acpi-intel-ssp-common.c | 1 +
 sound/soc/intel/common/soc-acpi-intel-tgl-match.c  | 5 +++++
 3 files changed, 8 insertions(+)
include/sound/soc-acpi-intel-ssp-common.h +2 -0
index b4597c8dac78..0865be3daf32 100644
@@ -9,6 +9,7 @@
 /* Cirrus Logic */
 #define CS35L41_ACPI_HID	"CSC3541"
 #define CS42L42_ACPI_HID	"10134242"
+#define CS35L56_ACPI_HID	"CSC355C"
 
 /* Dialog */
 #define DA7219_ACPI_HID		"DLGS7219"
@@ -53,6 +54,7 @@ enum snd_soc_acpi_intel_codec {
 
 	/* speaker amplifier */
 	CODEC_CS35L41,
+	CODEC_CS35L56,
 	CODEC_MAX98357A,
 	CODEC_MAX98360A,
 	CODEC_MAX98373,
sound/soc/intel/common/soc-acpi-intel-ssp-common.c +1 -0
index f56f4bfa5187..120ed129ca3f 100644
@@ -48,6 +48,7 @@ static const struct codec_map codecs[] = {
 static const struct codec_map amps[] = {
 	/* Cirrus Logic */
 	CODEC_MAP_ENTRY("CS35L41", "cs35l41", CS35L41_ACPI_HID, CODEC_CS35L41),
+	CODEC_MAP_ENTRY("CS35L56", "cs35l56", CS35L56_ACPI_HID, CODEC_CS35L56),
 
 	/* Maxim */
 	CODEC_MAP_ENTRY("MAX98357A", "max98357a", MAX_98357A_ACPI_HID, CODEC_MAX98357A),
sound/soc/intel/common/soc-acpi-intel-tgl-match.c +5 -0
index b77aafb0bfb6..fe99e77c21b5 100644
@@ -532,6 +532,11 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = {
 		.quirk_data = &tgl_lt6911_hdmi,
 		.sof_tplg_filename = "sof-tgl-rt1308-ssp2-hdmi-ssp15.tplg"
 	},
+	{
+		.id = CS35L56_ACPI_HID,
+		.drv_name = "tgl_cs35l56_ssp2_def",
+		.sof_tplg_filename = "sof-tgl-cs35l56-ssp2.tplg",
+	},
 	{},
 };
 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_tgl_machines);
Signature · 1 line
2.39.5
#3 lore raw
In reply to Richard Fitzgerald
Quoted 7 lines · Richard Fitzgerald

This adds support to the Intel machine drivers for CS35L56 codecs on Intel SSP port using TDM. Also adds the match entries for this on Tigerlake systems.

Richard Fitzgerald (2):
ASoC: Intel: Add sof_cs35l56 driver for CS35L56 on SSP2.
ASoC: Intel: tgl-match: Add CS35L56 on SSP2 for CDB35L56-FOUR board

It'd be worth explaining why sof_ssp_amp.c is not good enough?

It's been used for CS35L41, what's different with the L56 that would require a new machine driver?

Quoted 10 lines
 MAINTAINERS                                   |   1 +
 include/sound/soc-acpi-intel-ssp-common.h     |   2 +
 sound/soc/intel/boards/Kconfig                |  15 ++
 sound/soc/intel/boards/Makefile               |   2 +
 sound/soc/intel/boards/sof_cs35l56.c          | 254 ++++++++++++++++++
 .../intel/common/soc-acpi-intel-ssp-common.c  |   1 +
 .../intel/common/soc-acpi-intel-tgl-match.c   |   5 +
 7 files changed, 280 insertions(+)
 create mode 100644 sound/soc/intel/boards/sof_cs35l56.c