Commit dc1fad25 authored by Mark Brown's avatar Mark Brown

Merge series "ASoC: Intel: machine driver updates for 5.16" from Pierre-Louis...

Merge series "ASoC: Intel: machine driver updates for 5.16" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

One quirk for a Dell TigerLake/SoundWire device, and initial support
for platforms based on the ES8336 codec (aka ES8316). For full
functionality, an update of the codec driver will be needed.

Pierre-Louis Bossart (5):
  ASoC: Intel: soc-acpi: apl/glk/tgl: add entry for devices based on
    ES8336 codec
  ALSA: intel-dsp-config: add quirk for APL/GLK/TGL devices based on
    ES8336 codec
  ASoC: Intel: add machine driver for SOF+ES8336
  ASoC: Intel: soc-acpi: add missing quirk for TGL SDCA single amp
  ASoC: Intel: sof_sdw: add missing quirk for Dell SKU 0A45

 sound/hda/intel-dsp-config.c                  |  22 +-
 sound/soc/intel/boards/Kconfig                |  14 +
 sound/soc/intel/boards/Makefile               |   2 +
 sound/soc/intel/boards/sof_es8336.c           | 569 ++++++++++++++++++
 sound/soc/intel/boards/sof_sdw.c              |  10 +
 .../intel/common/soc-acpi-intel-bxt-match.c   |   6 +
 .../intel/common/soc-acpi-intel-glk-match.c   |   7 +-
 .../intel/common/soc-acpi-intel-tgl-match.c   |  47 ++
 8 files changed, 674 insertions(+), 3 deletions(-)
 create mode 100644 sound/soc/intel/boards/sof_es8336.c

--
2.25.1
parents 6d0c1f78 64ba6d2c
......@@ -31,6 +31,7 @@ struct config_entry {
u16 device;
u8 acpi_hid[ACPI_ID_LEN];
const struct dmi_system_id *dmi_table;
u8 codec_hid[ACPI_ID_LEN];
};
/*
......@@ -56,7 +57,7 @@ static const struct config_entry config_table[] = {
/*
* Apollolake (Broxton-P)
* the legacy HDAudio driver is used except on Up Squared (SOF) and
* Chromebooks (SST)
* Chromebooks (SST), as well as devices based on the ES8336 codec
*/
#if IS_ENABLED(CONFIG_SND_SOC_SOF_APOLLOLAKE)
{
......@@ -73,6 +74,11 @@ static const struct config_entry config_table[] = {
{}
}
},
{
.flags = FLAG_SOF,
.device = 0x5a98,
.codec_hid = "ESSX8336",
},
#endif
#if IS_ENABLED(CONFIG_SND_SOC_INTEL_APL)
{
......@@ -137,7 +143,7 @@ static const struct config_entry config_table[] = {
/*
* Geminilake uses legacy HDAudio driver except for Google
* Chromebooks
* Chromebooks and devices based on the ES8336 codec
*/
/* Geminilake */
#if IS_ENABLED(CONFIG_SND_SOC_SOF_GEMINILAKE)
......@@ -154,6 +160,11 @@ static const struct config_entry config_table[] = {
{}
}
},
{
.flags = FLAG_SOF,
.device = 0x3198,
.codec_hid = "ESSX8336",
},
#endif
/*
......@@ -311,6 +322,11 @@ static const struct config_entry config_table[] = {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x43c8,
},
{
.flags = FLAG_SOF,
.device = 0xa0c8,
.codec_hid = "ESSX8336",
},
#endif
/* Elkhart Lake */
......@@ -354,6 +370,8 @@ static const struct config_entry *snd_intel_dsp_find_config
continue;
if (table->dmi_table && !dmi_check_system(table->dmi_table))
continue;
if (table->codec_hid[0] && !acpi_dev_present(table->codec_hid, NULL, -1))
continue;
return table;
}
return NULL;
......
......@@ -512,6 +512,20 @@ config SND_SOC_INTEL_SOF_PCM512x_MACH
Say Y or m if you have such a device.
If unsure select "N".
config SND_SOC_INTEL_SOF_ES8336_MACH
tristate "SOF with ES8336 codec 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_ES8316
select SND_SOC_DMIC
select SND_SOC_INTEL_HDA_DSP_COMMON
help
This adds support for ASoC machine driver for SOF platforms
with es8336 codec.
Say Y if you have such a device.
If unsure select "N".
endif ## SND_SOC_SOF_HDA_LINK || SND_SOC_SOF_BAYTRAIL
if (SND_SOC_SOF_COMETLAKE && SND_SOC_SOF_HDA_LINK)
......
......@@ -21,6 +21,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 sof_realtek_common.o
snd-soc-sof_cs42l42-objs := sof_cs42l42.o
snd-soc-sof_es8336-objs := sof_es8336.o
snd-soc-cml_rt1011_rt5682-objs := cml_rt1011_rt5682.o
snd-soc-kbl_da7219_max98357a-objs := kbl_da7219_max98357a.o
snd-soc-kbl_da7219_max98927-objs := kbl_da7219_max98927.o
......@@ -42,6 +43,7 @@ snd-soc-sof-sdw-objs += sof_sdw.o \
sof_sdw_dmic.o sof_sdw_hdmi.o
obj-$(CONFIG_SND_SOC_INTEL_SOF_RT5682_MACH) += snd-soc-sof_rt5682.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_HASWELL_MACH) += snd-soc-sst-haswell.o
obj-$(CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_COMMON) += snd-soc-sst-bxt-da7219_max98357a.o
obj-$(CONFIG_SND_SOC_INTEL_BXT_RT298_MACH) += snd-soc-sst-bxt-rt298.o
......
This diff is collapsed.
......@@ -213,6 +213,16 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
SOF_RT715_DAI_ID_FIX |
SOF_SDW_FOUR_SPK),
},
{
.callback = sof_sdw_quirk_cb,
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A45")
},
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
RT711_JD2 |
SOF_RT715_DAI_ID_FIX),
},
/* AlderLake devices */
{
.callback = sof_sdw_quirk_cb,
......
......@@ -82,6 +82,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_bxt_machines[] = {
.sof_fw_filename = "sof-apl.ri",
.sof_tplg_filename = "sof-apl-tdf8532.tplg",
},
{
.id = "ESSX8336",
.drv_name = "sof-essx8336",
.sof_fw_filename = "sof-apl.ri",
.sof_tplg_filename = "sof-apl-es8336.tplg",
},
{},
};
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_bxt_machines);
......@@ -49,7 +49,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_glk_machines[] = {
.sof_fw_filename = "sof-glk.ri",
.sof_tplg_filename = "sof-glk-cs42l42.tplg",
},
{
.id = "ESSX8336",
.drv_name = "sof-essx8336",
.sof_fw_filename = "sof-glk.ri",
.sof_tplg_filename = "sof-glk-es8336.tplg",
},
{},
};
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_glk_machines);
......@@ -156,6 +156,15 @@ static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {
}
};
static const struct snd_soc_acpi_adr_device rt1316_1_single_adr[] = {
{
.adr = 0x000131025D131601ull,
.num_endpoints = 1,
.endpoints = &single_endpoint,
.name_prefix = "rt1316-1"
}
};
static const struct snd_soc_acpi_adr_device rt1316_1_group1_adr[] = {
{
.adr = 0x000131025D131601ull, /* unique ID is set for some reason */
......@@ -320,6 +329,25 @@ static const struct snd_soc_acpi_link_adr tgl_3_in_1_sdca[] = {
{}
};
static const struct snd_soc_acpi_link_adr tgl_3_in_1_sdca_mono[] = {
{
.mask = BIT(0),
.num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
.adr_d = rt711_sdca_0_adr,
},
{
.mask = BIT(1),
.num_adr = ARRAY_SIZE(rt1316_1_single_adr),
.adr_d = rt1316_1_single_adr,
},
{
.mask = BIT(3),
.num_adr = ARRAY_SIZE(rt714_3_adr),
.adr_d = rt714_3_adr,
},
{}
};
static const struct snd_soc_acpi_codecs tgl_max98373_amp = {
.num_codecs = 1,
.codecs = {"MX98373"}
......@@ -355,6 +383,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = {
.sof_fw_filename = "sof-tgl.ri",
.sof_tplg_filename = "sof-tgl-rt1011-rt5682.tplg",
},
{
.id = "ESSX8336",
.drv_name = "sof-essx8336",
.sof_fw_filename = "sof-tgl.ri",
.sof_tplg_filename = "sof-tgl-es8336.tplg",
},
{},
};
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_tgl_machines);
......@@ -412,6 +446,19 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[] = {
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-tgl-rt711-rt1316-rt714.tplg",
},
{
/*
* link_mask should be 0xB, but all links are enabled by BIOS.
* This entry will be selected if there is no rt1316 amplifier exposed
* on link2 since it will fail to match the above entry.
*/
.link_mask = 0xF, /* 4 active links required */
.links = tgl_3_in_1_sdca_mono,
.drv_name = "sof_sdw",
.sof_tplg_filename = "sof-tgl-rt711-l0-rt1316-l1-mono-rt714-l3.tplg",
},
{
.link_mask = 0x3, /* rt711 on link 0 and 1 rt1308 on link 1 */
.links = tgl_hp,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment