Commit f70abd75 authored by Bard liao's avatar Bard liao Committed by Mark Brown

ASoC: Intel: add sof-rt5682 machine driver

The machine driver is a generic machine driver for SOF with rt5682
codec. it currently supports BYT/CHT/ICL/CML. Depending on the SOC
hdmi/speaker and DMIC support are added dynamically.

Only add information related to SOF since the machine driver was
only tested with SOF.
Signed-off-by: default avatarSathya Prakash M R <sathya.prakash.m.r@intel.com>
Signed-off-by: default avatarBard liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6dd5055f
...@@ -383,4 +383,20 @@ config SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH ...@@ -383,4 +383,20 @@ config SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH
endif ## SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC || SND_SOC_SOF_HDA_AUDIO_CODEC endif ## SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC || SND_SOC_SOF_HDA_AUDIO_CODEC
if SND_SOC_SOF_HDA_COMMON || SND_SOC_SOF_BAYTRAIL
config SND_SOC_INTEL_SOF_RT5682_MACH
tristate "SOF with rt5682 codec in I2S Mode"
depends on I2C && ACPI
depends on (SND_SOC_SOF_HDA_COMMON && MFD_INTEL_LPSS) ||\
(SND_SOC_SOF_BAYTRAIL && X86_INTEL_LPSS)
select SND_SOC_RT5682
select SND_SOC_DMIC
select SND_SOC_HDAC_HDMI if SND_SOC_SOF_HDA_COMMON
help
This adds support for ASoC machine driver for SOF platforms
with rt5682 codec.
Say Y if you have such a device.
If unsure select "N".
endif ## SND_SOC_SOF_HDA_COMMON || SND_SOC_SOF_BAYTRAIL
endif ## SND_SOC_INTEL_MACH endif ## SND_SOC_INTEL_MACH
...@@ -16,6 +16,7 @@ snd-soc-sst-cht-bsw-nau8824-objs := cht_bsw_nau8824.o ...@@ -16,6 +16,7 @@ snd-soc-sst-cht-bsw-nau8824-objs := cht_bsw_nau8824.o
snd-soc-sst-byt-cht-da7213-objs := bytcht_da7213.o snd-soc-sst-byt-cht-da7213-objs := bytcht_da7213.o
snd-soc-sst-byt-cht-es8316-objs := bytcht_es8316.o snd-soc-sst-byt-cht-es8316-objs := bytcht_es8316.o
snd-soc-sst-byt-cht-nocodec-objs := bytcht_nocodec.o snd-soc-sst-byt-cht-nocodec-objs := bytcht_nocodec.o
snd-soc-sof_rt5682-objs := sof_rt5682.o
snd-soc-kbl_da7219_max98357a-objs := kbl_da7219_max98357a.o snd-soc-kbl_da7219_max98357a-objs := kbl_da7219_max98357a.o
snd-soc-kbl_da7219_max98927-objs := kbl_da7219_max98927.o snd-soc-kbl_da7219_max98927-objs := kbl_da7219_max98927.o
snd-soc-kbl_rt5663_max98927-objs := kbl_rt5663_max98927.o snd-soc-kbl_rt5663_max98927-objs := kbl_rt5663_max98927.o
...@@ -26,6 +27,7 @@ snd-soc-skl_hda_dsp-objs := skl_hda_dsp_generic.o skl_hda_dsp_common.o ...@@ -26,6 +27,7 @@ snd-soc-skl_hda_dsp-objs := skl_hda_dsp_generic.o skl_hda_dsp_common.o
snd-skl_nau88l25_max98357a-objs := skl_nau88l25_max98357a.o snd-skl_nau88l25_max98357a-objs := skl_nau88l25_max98357a.o
snd-soc-skl_nau88l25_ssm4567-objs := skl_nau88l25_ssm4567.o snd-soc-skl_nau88l25_ssm4567-objs := skl_nau88l25_ssm4567.o
obj-$(CONFIG_SND_SOC_INTEL_SOF_RT5682_MACH) += snd-soc-sof_rt5682.o
obj-$(CONFIG_SND_SOC_INTEL_HASWELL_MACH) += snd-soc-sst-haswell.o obj-$(CONFIG_SND_SOC_INTEL_HASWELL_MACH) += snd-soc-sst-haswell.o
obj-$(CONFIG_SND_SOC_INTEL_BYT_RT5640_MACH) += snd-soc-sst-byt-rt5640-mach.o obj-$(CONFIG_SND_SOC_INTEL_BYT_RT5640_MACH) += snd-soc-sst-byt-rt5640-mach.o
obj-$(CONFIG_SND_SOC_INTEL_BYT_MAX98090_MACH) += snd-soc-sst-byt-max98090-mach.o obj-$(CONFIG_SND_SOC_INTEL_BYT_MAX98090_MACH) += snd-soc-sst-byt-max98090-mach.o
......
This diff is collapsed.
...@@ -185,6 +185,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = { ...@@ -185,6 +185,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
.sof_fw_filename = "sof-byt.ri", .sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt-es8316.tplg", .sof_tplg_filename = "sof-byt-es8316.tplg",
}, },
{
.id = "10EC5682",
.drv_name = "sof_rt5682",
.sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt-rt5682.tplg",
},
/* some Baytrail platforms rely on RT5645, use CHT machine driver */ /* some Baytrail platforms rely on RT5645, use CHT machine driver */
{ {
.id = "10EC5645", .id = "10EC5645",
......
...@@ -160,6 +160,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = { ...@@ -160,6 +160,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[] = {
.sof_fw_filename = "sof-cht.ri", .sof_fw_filename = "sof-cht.ri",
.sof_tplg_filename = "sof-cht-rt5640.tplg", .sof_tplg_filename = "sof-cht-rt5640.tplg",
}, },
{
.id = "10EC5682",
.drv_name = "sof_rt5682",
.sof_fw_filename = "sof-cht.ri",
.sof_tplg_filename = "sof-cht-rt5682.tplg",
},
/* some CHT-T platforms rely on RT5651, use Baytrail machine driver */ /* some CHT-T platforms rely on RT5651, use Baytrail machine driver */
{ {
.id = "10EC5651", .id = "10EC5651",
......
...@@ -14,6 +14,11 @@ static struct skl_machine_pdata cnl_pdata = { ...@@ -14,6 +14,11 @@ static struct skl_machine_pdata cnl_pdata = {
.use_tplg_pcm = true, .use_tplg_pcm = true,
}; };
static struct snd_soc_acpi_codecs cml_codecs = {
.num_codecs = 1,
.codecs = {"10EC5682"}
};
struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_machines[] = { struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_machines[] = {
{ {
.id = "INT34C2", .id = "INT34C2",
...@@ -23,6 +28,20 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_machines[] = { ...@@ -23,6 +28,20 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_machines[] = {
.sof_fw_filename = "sof-cnl.ri", .sof_fw_filename = "sof-cnl.ri",
.sof_tplg_filename = "sof-cnl-rt274.tplg", .sof_tplg_filename = "sof-cnl-rt274.tplg",
}, },
{
.id = "10EC5682",
.drv_name = "sof_rt5682",
.sof_fw_filename = "sof-cnl.ri",
.sof_tplg_filename = "sof-cml-rt5682.tplg",
},
{
.id = "MX98357A",
.drv_name = "sof_rt5682",
.quirk_data = &cml_codecs,
.sof_fw_filename = "sof-cnl.ri",
.sof_tplg_filename = "sof-cml-rt5682-max98357a.tplg",
},
{}, {},
}; };
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cnl_machines); EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cnl_machines);
......
...@@ -23,6 +23,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[] = { ...@@ -23,6 +23,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[] = {
.sof_fw_filename = "sof-icl.ri", .sof_fw_filename = "sof-icl.ri",
.sof_tplg_filename = "sof-icl-rt274.tplg", .sof_tplg_filename = "sof-icl-rt274.tplg",
}, },
{
.id = "10EC5682",
.drv_name = "sof_rt5682",
.sof_fw_filename = "sof-icl.ri",
.sof_tplg_filename = "sof-icl-rt5682.tplg",
},
{}, {},
}; };
EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_icl_machines); EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_icl_machines);
......
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