Skip to contentSkip to conversation

ASoC: Intel: boards: Add CML_RT1015 m/c driver

PATCH In review Keith Tzneg 2 participants 2 messages Oct 24, 2020 – Oct 26, 2020

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

PATCH v3 1/1 ASoC: Intel: boards: Add CML_RT1015 m/c driver

From: Keith Tzeng <[email protected]>

Machine driver to enable RT5682 on SSP0, DMIC, HDMI and RT1015 AMP on
SSP1: Enabled 4 CH TDM playback with 24 bit data.

---
 sound/soc/intel/boards/Kconfig                    |  15 +
 sound/soc/intel/boards/Makefile                   |   2 +
 sound/soc/intel/boards/cml_rt1015_rt5682.c        | 570 ++++++++++++++++++++++
 sound/soc/intel/common/soc-acpi-intel-cnl-match.c |   7 +
 4 files changed, 594 insertions(+)
 create mode 100644 sound/soc/intel/boards/cml_rt1015_rt5682.c
sound/soc/intel/boards/Kconfig +15 -0
index c10c378..f674c56 100644
@@ -496,6 +496,21 @@ config SND_SOC_INTEL_SOF_CML_RT1011_RT5682_MACH
 	  Say Y if you have such a device.
 	  If unsure select "N".
 
+config SND_SOC_INTEL_SOF_CML_RT1015_RT5682_MACH
+        tristate "CML with RT1015 and RT5682 in I2S Mode"
+        depends on I2C && ACPI && GPIOLIB
+        depends on MFD_INTEL_LPSS || COMPILE_TEST
+        depends on SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC
+        select SND_SOC_RT1015
+        select SND_SOC_RT5682_I2C
+        select SND_SOC_DMIC
+        select SND_SOC_HDAC_HDMI
+        help
+          This adds support for ASoC machine driver for SOF platform with
+          RT1015 + RT5682 I2S codec.
+          Say Y if you have such a device.
+          If unsure select "N".
+
 endif ## SND_SOC_SOF_COMETLAKE && SND_SOC_SOF_HDA_LINK
 
 if SND_SOC_SOF_JASPERLAKE
sound/soc/intel/boards/Makefile +2 -0
index a58e4d2..73131cc 100644
@@ -20,6 +20,7 @@ snd-soc-sst-byt-cht-es8316-objs := bytcht_es8316.o
 snd-soc-sst-byt-cht-nocodec-objs := bytcht_nocodec.o
 snd-soc-sof_rt5682-objs := sof_rt5682.o hda_dsp_common.o sof_maxim_common.o
 snd-soc-cml_rt1011_rt5682-objs := cml_rt1011_rt5682.o hda_dsp_common.o
+snd-soc-cml_rt1015_rt5682-objs := cml_rt1015_rt5682.o
 snd-soc-kbl_da7219_max98357a-objs := kbl_da7219_max98357a.o
 snd-soc-kbl_da7219_max98927-objs := kbl_da7219_max98927.o
 snd-soc-kbl_rt5663_max98927-objs := kbl_rt5663_max98927.o
@@ -60,6 +61,7 @@ obj-$(CONFIG_SND_SOC_INTEL_BYT_CHT_DA7213_MACH) += snd-soc-sst-byt-cht-da7213.o
 obj-$(CONFIG_SND_SOC_INTEL_BYT_CHT_ES8316_MACH) += snd-soc-sst-byt-cht-es8316.o
 obj-$(CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH) += snd-soc-sst-byt-cht-nocodec.o
 obj-$(CONFIG_SND_SOC_INTEL_SOF_CML_RT1011_RT5682_MACH) += snd-soc-cml_rt1011_rt5682.o
+obj-$(CONFIG_SND_SOC_INTEL_SOF_CML_RT1015_RT5682_MACH) += cml_rt1015_rt5682.o
 obj-$(CONFIG_SND_SOC_INTEL_KBL_DA7219_MAX98357A_MACH) += snd-soc-kbl_da7219_max98357a.o
 obj-$(CONFIG_SND_SOC_INTEL_KBL_DA7219_MAX98927_MACH) += snd-soc-kbl_da7219_max98927.o
 obj-$(CONFIG_SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH) += snd-soc-kbl_rt5663_max98927.o
sound/soc/intel/boards/cml_rt1015_rt5682.c new file +570 -0

570 lines not on this page · raw message

sound/soc/intel/common/soc-acpi-intel-cnl-match.c +7 -0
index b80f032a..4f99da8 100644
@@ -23,6 +23,13 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_machines[] = {
 		.sof_fw_filename = "sof-cnl.ri",
 		.sof_tplg_filename = "sof-cnl-rt274.tplg",
 	},
+	{
+		.id = "10EC1015",
+		.drv_name = "cml_rt1015_rt5682",
+		.quirk_data = &cml_codecs,
+		.sof_fw_filename = "sof-cnl.ri",
+		.sof_tplg_filename = "sof-cml-rt1015-rt5682.tplg",
+	},
 	{},
 };
 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cnl_machines);
Signature · 1 line
2.7.4
#1 lore raw
Quoted 4 lines · Keith Tzneg

From: Keith Tzeng <[email protected]>

Machine driver to enable RT5682 on SSP0, DMIC, HDMI and RT1015 AMP on
SSP1: Enabled 4 CH TDM playback with 24 bit data.

Same comment for the third time: there is no reason to add an entire machine driver just to replace one amplifier by another.

let's use an existing machine driver and use a quirk (DMI or table_id) to select the relevant amp for that device.