Skip to contentSkip to conversation

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

PATCH Superseded Harsha Priya 2 participants 5 messages Jun 6, 2017 – Jun 7, 2017

Subsystems (3)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

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 (2):
ASoC: Intel: Add Kabylake machine driver for RT5514, RT5663 and

    MAX98927

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

 .../soc/intel/boards/kbl_rt5663_rt5514_max98927.c  | 640 +++++++++++++++++++++
 sound/soc/intel/skylake/skl.c                      |  29 +-
 2 files changed, 665 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 1/2 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
#2 lore raw

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

sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c line 229

Quoted 4 lines · Harsha Priya
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c new file +3 -0
+static unsigned int rates[] = {
+	48000,
+};

Add const.

sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c line 235

Quoted 5 lines
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c new file +5 -0
+static struct snd_pcm_hw_constraint_list constraints_rates = {
+	.count = ARRAY_SIZE(rates),
+	.list  = rates,
+	.mask = 0,
+};

Here, too.

... and a few other similar codes (channels, channels_dmic, and the corresponding hw_constraints), too.

thanks,

Takashi

#3 lore raw

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

In reply to Harsha Priya

Adds Kabylake rt5663_rt5514_max machine driver entry into machine table

---
 sound/soc/intel/skylake/skl.c | 37 +++++++++++++++++++++++++++++++++----
 1 file changed, 33 insertions(+), 4 deletions(-)
sound/soc/intel/skylake/skl.c +33 -4
index 4ebae85..e761550 100644
@@ -876,10 +876,31 @@ 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_codecs kbl_5663_5514_codecs = {
+	.num_codecs = 2,
+	.codecs = {"10EC5663", "10EC5514"}
+};
+
 
 static struct sst_acpi_mach sst_skl_devdata[] = {
 	{
@@ -945,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
#4 lore raw

Re: [PATCH 2/2] ASoC: Intel: Add Kabylake RT5663+RT5514+MAX98927 machine driver entry

Quoted 2 lines · Harsha Priya

Adds Kabylake rt5663_rt5514_max machine driver entry into machine table

Try to split this to two: one for a preparation patch to convert to C99 init style and another to add the new entry.

Takashi

Quoted 64 lines
---
 sound/soc/intel/skylake/skl.c | 37 +++++++++++++++++++++++++++++++++----
 1 file changed, 33 insertions(+), 4 deletions(-)
sound/soc/intel/skylake/skl.c +33 -4
index 4ebae85..e761550 100644
@@ -876,10 +876,31 @@ 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_codecs kbl_5663_5514_codecs = {
+	.num_codecs = 2,
+	.codecs = {"10EC5663", "10EC5514"}
+};
+
 
 static struct sst_acpi_mach sst_skl_devdata[] = {
 	{
@@ -945,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