Skip to contentSkip to conversation

ASoC: Intel: Add Kabylake machine driver for RT5663+RT5514+MAX98927

PATCH Superseded Harsha Priya 3 participants 6 messages Jun 9, 2017 – Jun 13, 2017

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover ASoC: Intel: Add Kabylake machine driver for RT5663+RT5514+MAX98927

This patch set adds a machine driver for Kabylake platform which has RT5663, RT5514 and MAX9827 codecs. It also adds the quirk data for the platform driver to load the correct machine driver.

For this particular machine,

*  the RT5663 is a headset codec connected on SSP0
*  the RT5514 is a dmic codec connected on SSP1
*  the MAX98987 is a speaker codec connected on SSP1

Harsha Priya (3):
ASoC: Intel: Add Kabylake machine driver for RT5514, RT5663 and

    MAX98927

ASoC: Intel: Convert all sst_codecs data definition to c99 style
ASoC: Intel: Add Kabylake RT5663+RT5514+MAX98927 machine driver entry

 sound/soc/intel/Kconfig                            |  15 +
 sound/soc/intel/boards/Makefile                    |   2 +
 .../soc/intel/boards/kbl_rt5663_rt5514_max98927.c  | 640 +++++++++++++++++++++
 sound/soc/intel/skylake/skl.c                      |  37 +-
 4 files changed, 690 insertions(+), 4 deletions(-)
 create mode 100644 sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
Signature · 1 line
1.9.1
#1 lore raw

PATCH v3 1/3 ASoC: Intel: Add Kabylake machine driver for RT5514, RT5663 and MAX98927

This patch adds Kabylake I2S machine driver which uses codecs MAX98927 as speakers and RT5514 as dmic on ssp0 and RT5663 as headset on ssp1.

---
 sound/soc/intel/Kconfig                            |  15 +
 sound/soc/intel/boards/Makefile                    |   2 +
 .../soc/intel/boards/kbl_rt5663_rt5514_max98927.c  | 640 +++++++++++++++++++++
 3 files changed, 657 insertions(+)
 create mode 100644 sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
sound/soc/intel/Kconfig +15 -0
index a9c50d0..e2b2f16 100644
@@ -241,6 +241,21 @@ config SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH
 	  Say Y if you have such a device.
 	  If unsure select "N".
 
+config SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH
+        tristate "ASoC Audio driver for KBL with RT5663, RT5514 and MAX98927 in I2S Mode"
+        depends on X86_INTEL_LPSS && I2C
+        select SND_SOC_INTEL_SST
+        select SND_SOC_INTEL_SKYLAKE
+        select SND_SOC_RT5663
+        select SND_SOC_RT5514
+        select SND_SOC_MAX98927
+        select SND_SOC_HDAC_HDMI
+        help
+          This adds support for ASoC Onboard Codec I2S machine driver. This will
+          create an alsa sound card for RT5663 + RT5514 + MAX98927.
+          Say Y if you have such a device.
+          If unsure select "N".
+
 config SND_SOC_INTEL_SKYLAKE
 	tristate
 	select SND_HDA_EXT_CORE
sound/soc/intel/boards/Makefile +2 -0
index c92ebca..b3be65b 100644
@@ -13,6 +13,7 @@ snd-soc-sst-cht-bsw-max98090_ti-objs := cht_bsw_max98090_ti.o
 snd-soc-sst-byt-cht-da7213-objs := bytcht_da7213.o
 snd-soc-sst-byt-cht-nocodec-objs := bytcht_nocodec.o
 snd-soc-kbl_rt5663_max98927-objs := kbl_rt5663_max98927.o
+snd-soc-kbl_rt5663_rt5514_max98927-objs := kbl_rt5663_rt5514_max98927.o
 snd-soc-skl_rt286-objs := skl_rt286.o
 snd-skl_nau88l25_max98357a-objs := skl_nau88l25_max98357a.o
 snd-soc-skl_nau88l25_ssm4567-objs := skl_nau88l25_ssm4567.o
@@ -32,6 +33,7 @@ obj-$(CONFIG_SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH) += snd-soc-sst-cht-bsw-max9
 obj-$(CONFIG_SND_SOC_INTEL_BYT_CHT_DA7213_MACH) += snd-soc-sst-byt-cht-da7213.o
 obj-$(CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH) += snd-soc-sst-byt-cht-nocodec.o
 obj-$(CONFIG_SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH) += snd-soc-kbl_rt5663_max98927.o
+obj-$(CONFIG_SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH) += snd-soc-kbl_rt5663_rt5514_max98927.o
 obj-$(CONFIG_SND_SOC_INTEL_SKL_RT286_MACH) += snd-soc-skl_rt286.o
 obj-$(CONFIG_SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH) += snd-skl_nau88l25_max98357a.o
 obj-$(CONFIG_SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH) += snd-soc-skl_nau88l25_ssm4567.o
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c new file +640 -0

640 lines not on this page · raw message

Signature · 1 line
1.9.1
maintainer
#2 lore raw

Re: [PATCH v3 1/3] ASoC: Intel: Add Kabylake machine driver for RT5514, RT5663 and MAX98927

Quoted 3 lines · Harsha Priya

This patch adds Kabylake I2S machine driver which uses codecs MAX98927 as speakers and RT5514 as dmic on ssp0 and RT5663 as headset on ssp1.

This doesn't apply against current code, please check and resend.

#3 lore raw

PATCH v3 2/3 ASoC: Intel: Convert all sst_codecs data definition to c99 style

In reply to Harsha Priya

C99 style struct initialization helps in readability as well as initialization of variables not specified as NULL. This patch changes the struct data definitions in skl.c that were not in c99 style.

---
 sound/soc/intel/skylake/skl.c | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)
sound/soc/intel/skylake/skl.c +19 -4
index 4ebae85..6a79fc7 100644
@@ -876,10 +876,25 @@ static void skl_remove(struct pci_dev *pci)
 	dev_set_drvdata(&pci->dev, NULL);
 }
 
-static struct sst_codecs skl_codecs = { 1, {"NAU88L25"} };
-static struct sst_codecs kbl_codecs = { 1, {"NAU88L25"} };
-static struct sst_codecs bxt_codecs = { 1, {"MX98357A"} };
-static struct sst_codecs kbl_poppy_codecs = { 1, {"10EC5663"} };
+static struct sst_codecs skl_codecs = {
+	.num_codecs = 1,
+	.codecs = {"NAU88L25"}
+};
+
+static struct sst_codecs kbl_codecs = {
+	.num_codecs = 1,
+	.codecs = {"NAU88L25"}
+};
+
+static struct sst_codecs bxt_codecs = {
+	.num_codecs = 1,
+	.codecs = {"MX98357A"}
+};
+
+static struct sst_codecs kbl_poppy_codecs = {
+	.num_codecs = 1,
+	.codecs = {"10EC5663"}
+};
 
 static struct sst_acpi_mach sst_skl_devdata[] = {
 	{
Signature · 1 line
1.9.1
#4 lore raw

PATCH v3 3/3 ASoC: Intel: Add Kabylake RT5663+RT5514+MAX98927 machine driver entry

In reply to Harsha Priya

This patch adds Kabylake I2S machine driver which uses codecs MAX98927 as speakers and RT5514 as dmic on ssp0 and RT5663 as headset on ssp1.

---
 sound/soc/intel/skylake/skl.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
sound/soc/intel/skylake/skl.c +14 -0
index 6a79fc7..e761550 100644
@@ -896,6 +896,12 @@ static void skl_remove(struct pci_dev *pci)
 	.codecs = {"10EC5663"}
 };
 
+static struct sst_codecs kbl_5663_5514_codecs = {
+	.num_codecs = 2,
+	.codecs = {"10EC5663", "10EC5514"}
+};
+
+
 static struct sst_acpi_mach sst_skl_devdata[] = {
 	{
 		.id = "INT343A",
@@ -960,6 +966,14 @@ static void skl_remove(struct pci_dev *pci)
 	},
 	{
 		.id = "MX98927",
+		.drv_name = "kbl_r5514_5663_max",
+		.fw_filename = "intel/dsp_fw_kbl.bin",
+		.machine_quirk = sst_acpi_codec_list,
+		.quirk_data = &kbl_5663_5514_codecs,
+		.pdata = &skl_dmic_data
+	},
+	{
+		.id = "MX98927",
 		.drv_name = "kbl_rt5663_m98927",
 		.fw_filename = "intel/dsp_fw_kbl.bin",
 		.machine_quirk = sst_acpi_codec_list,
Signature · 1 line
1.9.1
Acked-by on the v3 series
#5 lore raw
In reply to Harsha Priya
Quoted 9 lines · Harsha Priya

This patch set adds a machine driver for Kabylake platform which has RT5663, RT5514 and MAX9827 codecs. It also adds the quirk data for the platform driver to load the correct machine driver.

For this particular machine,

*  the RT5663 is a headset codec connected on SSP0
*  the RT5514 is a dmic codec connected on SSP1
*  the MAX98987 is a speaker codec connected on SSP1

Looks good to me:

Signature · 1 line
~Vinod