diff options
Diffstat (limited to 'sound/soc/intel/common')
| -rw-r--r-- | sound/soc/intel/common/soc-acpi-intel-adl-match.c | 24 | ||||
| -rw-r--r-- | sound/soc/intel/common/soc-acpi-intel-bxt-match.c | 8 | ||||
| -rw-r--r-- | sound/soc/intel/common/soc-acpi-intel-byt-match.c | 68 | ||||
| -rw-r--r-- | sound/soc/intel/common/soc-acpi-intel-cht-match.c | 69 | ||||
| -rw-r--r-- | sound/soc/intel/common/soc-acpi-intel-cml-match.c | 8 | ||||
| -rw-r--r-- | sound/soc/intel/common/soc-acpi-intel-glk-match.c | 17 | ||||
| -rw-r--r-- | sound/soc/intel/common/soc-acpi-intel-jsl-match.c | 27 | ||||
| -rw-r--r-- | sound/soc/intel/common/soc-acpi-intel-kbl-match.c | 12 | ||||
| -rw-r--r-- | sound/soc/intel/common/soc-acpi-intel-skl-match.c | 2 | ||||
| -rw-r--r-- | sound/soc/intel/common/soc-acpi-intel-tgl-match.c | 60 | ||||
| -rw-r--r-- | sound/soc/intel/common/soc-intel-quirks.h | 51 | 
11 files changed, 181 insertions, 165 deletions
| diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c index a0f6a69c7038..06f503452aa5 100644 --- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c @@ -280,9 +280,19 @@ static const struct snd_soc_acpi_codecs adl_max98357a_amp = {  	.codecs = {"MX98357A"}  }; +static const struct snd_soc_acpi_codecs adl_max98360a_amp = { +	.num_codecs = 1, +	.codecs = {"MX98360A"} +}; + +static const struct snd_soc_acpi_codecs adl_rt5682_rt5682s_hp = { +	.num_codecs = 2, +	.codecs = {"10EC5682", "RTL5682"}, +}; +  struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {  	{ -		.id = "10EC5682", +		.comp_ids = &adl_rt5682_rt5682s_hp,  		.drv_name = "adl_mx98373_rt5682",  		.machine_quirk = snd_soc_acpi_codec_list,  		.quirk_data = &adl_max98373_amp, @@ -290,13 +300,21 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {  		.sof_tplg_filename = "sof-adl-max98373-rt5682.tplg",  	},  	{ -		.id = "10EC5682", -		.drv_name = "adl_mx98357a_rt5682", +		.comp_ids = &adl_rt5682_rt5682s_hp, +		.drv_name = "adl_mx98357_rt5682",  		.machine_quirk = snd_soc_acpi_codec_list,  		.quirk_data = &adl_max98357a_amp,  		.sof_fw_filename = "sof-adl.ri",  		.sof_tplg_filename = "sof-adl-max98357a-rt5682.tplg",  	}, +	{ +		.comp_ids = &adl_rt5682_rt5682s_hp, +		.drv_name = "adl_mx98360_rt5682", +		.machine_quirk = snd_soc_acpi_codec_list, +		.quirk_data = &adl_max98360a_amp, +		.sof_fw_filename = "sof-adl.ri", +		.sof_tplg_filename = "sof-adl-max98360a-rt5682.tplg", +	},  	{},  };  EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_adl_machines); diff --git a/sound/soc/intel/common/soc-acpi-intel-bxt-match.c b/sound/soc/intel/common/soc-acpi-intel-bxt-match.c index 576407b5daf2..342d34052204 100644 --- a/sound/soc/intel/common/soc-acpi-intel-bxt-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-bxt-match.c @@ -41,7 +41,7 @@ static struct snd_soc_acpi_mach *apl_quirk(void *arg)  	return mach;  } -static struct snd_soc_acpi_codecs bxt_codecs = { +static const struct snd_soc_acpi_codecs bxt_codecs = {  	.num_codecs = 1,  	.codecs = {"MX98357A"}  }; @@ -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); diff --git a/sound/soc/intel/common/soc-acpi-intel-byt-match.c b/sound/soc/intel/common/soc-acpi-intel-byt-match.c index 510a5f38b7f1..142000991813 100644 --- a/sound/soc/intel/common/soc-acpi-intel-byt-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-byt-match.c @@ -120,9 +120,29 @@ static struct snd_soc_acpi_mach *byt_quirk(void *arg)  	}  } +static const struct snd_soc_acpi_codecs rt5640_comp_ids = { +	.num_codecs = 3, +	.codecs = { "10EC5640", "10EC5642", "INTCCFFD"}, +}; + +static const struct snd_soc_acpi_codecs wm5102_comp_ids = { +	.num_codecs = 2, +	.codecs = { "WM510204", "WM510205"}, +}; + +static const struct snd_soc_acpi_codecs da7213_comp_ids = { +	.num_codecs = 2, +	.codecs = { "DGLS7212", "DGLS7213"}, +}; + +static const struct snd_soc_acpi_codecs rt5645_comp_ids = { +	.num_codecs = 2, +	.codecs = { "10EC5645", "10EC5648"}, +}; +  struct snd_soc_acpi_mach  snd_soc_acpi_intel_baytrail_machines[] = {  	{ -		.id = "10EC5640", +		.comp_ids = &rt5640_comp_ids,  		.drv_name = "bytcr_rt5640",  		.fw_filename = "intel/fw_sst_0f28.bin",  		.board = "bytcr_rt5640", @@ -131,22 +151,6 @@ struct snd_soc_acpi_mach  snd_soc_acpi_intel_baytrail_machines[] = {  		.sof_tplg_filename = "sof-byt-rt5640.tplg",  	},  	{ -		.id = "10EC5642", -		.drv_name = "bytcr_rt5640", -		.fw_filename = "intel/fw_sst_0f28.bin", -		.board = "bytcr_rt5640", -		.sof_fw_filename = "sof-byt.ri", -		.sof_tplg_filename = "sof-byt-rt5640.tplg", -	}, -	{ -		.id = "INTCCFFD", -		.drv_name = "bytcr_rt5640", -		.fw_filename = "intel/fw_sst_0f28.bin", -		.board = "bytcr_rt5640", -		.sof_fw_filename = "sof-byt.ri", -		.sof_tplg_filename = "sof-byt-rt5640.tplg", -	}, -	{  		.id = "10EC5651",  		.drv_name = "bytcr_rt5651",  		.fw_filename = "intel/fw_sst_0f28.bin", @@ -155,7 +159,7 @@ struct snd_soc_acpi_mach  snd_soc_acpi_intel_baytrail_machines[] = {  		.sof_tplg_filename = "sof-byt-rt5651.tplg",  	},  	{ -		.id = "WM510204", +		.comp_ids = &wm5102_comp_ids,  		.drv_name = "bytcr_wm5102",  		.fw_filename = "intel/fw_sst_0f28.bin",  		.board = "bytcr_wm5102", @@ -163,23 +167,7 @@ struct snd_soc_acpi_mach  snd_soc_acpi_intel_baytrail_machines[] = {  		.sof_tplg_filename = "sof-byt-wm5102.tplg",  	},  	{ -		.id = "WM510205", -		.drv_name = "bytcr_wm5102", -		.fw_filename = "intel/fw_sst_0f28.bin", -		.board = "bytcr_wm5102", -		.sof_fw_filename = "sof-byt.ri", -		.sof_tplg_filename = "sof-byt-wm5102.tplg", -	}, -	{ -		.id = "DLGS7212", -		.drv_name = "bytcht_da7213", -		.fw_filename = "intel/fw_sst_0f28.bin", -		.board = "bytcht_da7213", -		.sof_fw_filename = "sof-byt.ri", -		.sof_tplg_filename = "sof-byt-da7213.tplg", -	}, -	{ -		.id = "DLGS7213", +		.comp_ids = &da7213_comp_ids,  		.drv_name = "bytcht_da7213",  		.fw_filename = "intel/fw_sst_0f28.bin",  		.board = "bytcht_da7213", @@ -202,15 +190,7 @@ struct snd_soc_acpi_mach  snd_soc_acpi_intel_baytrail_machines[] = {  	},  	/* some Baytrail platforms rely on RT5645, use CHT machine driver */  	{ -		.id = "10EC5645", -		.drv_name = "cht-bsw-rt5645", -		.fw_filename = "intel/fw_sst_0f28.bin", -		.board = "cht-bsw", -		.sof_fw_filename = "sof-byt.ri", -		.sof_tplg_filename = "sof-byt-rt5645.tplg", -	}, -	{ -		.id = "10EC5648", +		.comp_ids = &rt5645_comp_ids,  		.drv_name = "cht-bsw-rt5645",  		.fw_filename = "intel/fw_sst_0f28.bin",  		.board = "cht-bsw", diff --git a/sound/soc/intel/common/soc-acpi-intel-cht-match.c b/sound/soc/intel/common/soc-acpi-intel-cht-match.c index 227424236fd5..c60a5e8e7bc9 100644 --- a/sound/soc/intel/common/soc-acpi-intel-cht-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-cht-match.c @@ -51,18 +51,31 @@ static struct snd_soc_acpi_mach *cht_quirk(void *arg)  		return mach;  } +static const struct snd_soc_acpi_codecs rt5640_comp_ids = { +	.num_codecs = 2, +	.codecs = { "10EC5640", "10EC3276" }, +}; + +static const struct snd_soc_acpi_codecs rt5670_comp_ids = { +	.num_codecs = 2, +	.codecs = { "10EC5670", "10EC5672" }, +}; + +static const struct snd_soc_acpi_codecs rt5645_comp_ids = { +	.num_codecs = 3, +	.codecs = { "10EC5645", "10EC5650", "10EC3270" }, +}; + +static const struct snd_soc_acpi_codecs da7213_comp_ids = { +	.num_codecs = 2, +	.codecs = { "DGLS7212", "DGLS7213"}, + +}; +  /* Cherryview-based platforms: CherryTrail and Braswell */  struct snd_soc_acpi_mach  snd_soc_acpi_intel_cherrytrail_machines[] = {  	{ -		.id = "10EC5670", -		.drv_name = "cht-bsw-rt5672", -		.fw_filename = "intel/fw_sst_22a8.bin", -		.board = "cht-bsw", -		.sof_fw_filename = "sof-cht.ri", -		.sof_tplg_filename = "sof-cht-rt5670.tplg", -	}, -	{ -		.id = "10EC5672", +		.comp_ids = &rt5670_comp_ids,  		.drv_name = "cht-bsw-rt5672",  		.fw_filename = "intel/fw_sst_22a8.bin",  		.board = "cht-bsw", @@ -70,23 +83,7 @@ struct snd_soc_acpi_mach  snd_soc_acpi_intel_cherrytrail_machines[] = {  		.sof_tplg_filename = "sof-cht-rt5670.tplg",  	},  	{ -		.id = "10EC5645", -		.drv_name = "cht-bsw-rt5645", -		.fw_filename = "intel/fw_sst_22a8.bin", -		.board = "cht-bsw", -		.sof_fw_filename = "sof-cht.ri", -		.sof_tplg_filename = "sof-cht-rt5645.tplg", -	}, -	{ -		.id = "10EC5650", -		.drv_name = "cht-bsw-rt5645", -		.fw_filename = "intel/fw_sst_22a8.bin", -		.board = "cht-bsw", -		.sof_fw_filename = "sof-cht.ri", -		.sof_tplg_filename = "sof-cht-rt5645.tplg", -	}, -	{ -		.id = "10EC3270", +		.comp_ids = &rt5645_comp_ids,  		.drv_name = "cht-bsw-rt5645",  		.fw_filename = "intel/fw_sst_22a8.bin",  		.board = "cht-bsw", @@ -110,15 +107,7 @@ struct snd_soc_acpi_mach  snd_soc_acpi_intel_cherrytrail_machines[] = {  		.sof_tplg_filename = "sof-cht-nau8824.tplg",  	},  	{ -		.id = "DLGS7212", -		.drv_name = "bytcht_da7213", -		.fw_filename = "intel/fw_sst_22a8.bin", -		.board = "bytcht_da7213", -		.sof_fw_filename = "sof-cht.ri", -		.sof_tplg_filename = "sof-cht-da7213.tplg", -	}, -	{ -		.id = "DLGS7213", +		.comp_ids = &da7213_comp_ids,  		.drv_name = "bytcht_da7213",  		.fw_filename = "intel/fw_sst_22a8.bin",  		.board = "bytcht_da7213", @@ -135,7 +124,7 @@ struct snd_soc_acpi_mach  snd_soc_acpi_intel_cherrytrail_machines[] = {  	},  	/* some CHT-T platforms rely on RT5640, use Baytrail machine driver */  	{ -		.id = "10EC5640", +		.comp_ids = &rt5640_comp_ids,  		.drv_name = "bytcr_rt5640",  		.fw_filename = "intel/fw_sst_22a8.bin",  		.board = "bytcr_rt5640", @@ -144,14 +133,6 @@ struct snd_soc_acpi_mach  snd_soc_acpi_intel_cherrytrail_machines[] = {  		.sof_tplg_filename = "sof-cht-rt5640.tplg",  	},  	{ -		.id = "10EC3276", -		.drv_name = "bytcr_rt5640", -		.fw_filename = "intel/fw_sst_22a8.bin", -		.board = "bytcr_rt5640", -		.sof_fw_filename = "sof-cht.ri", -		.sof_tplg_filename = "sof-cht-rt5640.tplg", -	}, -	{  		.id = "10EC5682",  		.drv_name = "sof_rt5682",  		.sof_fw_filename = "sof-cht.ri", diff --git a/sound/soc/intel/common/soc-acpi-intel-cml-match.c b/sound/soc/intel/common/soc-acpi-intel-cml-match.c index b591c6fd13fd..b4eb0c97edf1 100644 --- a/sound/soc/intel/common/soc-acpi-intel-cml-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-cml-match.c @@ -9,22 +9,22 @@  #include <sound/soc-acpi.h>  #include <sound/soc-acpi-intel-match.h> -static struct snd_soc_acpi_codecs rt1011_spk_codecs = { +static const struct snd_soc_acpi_codecs rt1011_spk_codecs = {  	.num_codecs = 1,  	.codecs = {"10EC1011"}  }; -static struct snd_soc_acpi_codecs rt1015_spk_codecs = { +static const struct snd_soc_acpi_codecs rt1015_spk_codecs = {  	.num_codecs = 1,  	.codecs = {"10EC1015"}  }; -static struct snd_soc_acpi_codecs max98357a_spk_codecs = { +static const struct snd_soc_acpi_codecs max98357a_spk_codecs = {  	.num_codecs = 1,  	.codecs = {"MX98357A"}  }; -static struct snd_soc_acpi_codecs max98390_spk_codecs = { +static const struct snd_soc_acpi_codecs max98390_spk_codecs = {  	.num_codecs = 1,  	.codecs = {"MX98390"}  }; diff --git a/sound/soc/intel/common/soc-acpi-intel-glk-match.c b/sound/soc/intel/common/soc-acpi-intel-glk-match.c index da1e151190b4..8492b7e2a945 100644 --- a/sound/soc/intel/common/soc-acpi-intel-glk-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-glk-match.c @@ -9,7 +9,7 @@  #include <sound/soc-acpi.h>  #include <sound/soc-acpi-intel-match.h> -static struct snd_soc_acpi_codecs glk_codecs = { +static const struct snd_soc_acpi_codecs glk_codecs = {  	.num_codecs = 1,  	.codecs = {"MX98357A"}  }; @@ -41,6 +41,14 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_glk_machines[] = {  		.sof_tplg_filename = "sof-glk-rt5682.tplg",  	},  	{ +		.id = "RTL5682", +		.drv_name = "glk_rt5682_max98357a", +		.machine_quirk = snd_soc_acpi_codec_list, +		.quirk_data = &glk_codecs, +		.sof_fw_filename = "sof-glk.ri", +		.sof_tplg_filename = "sof-glk-rt5682.tplg", +	}, +	{  		.id = "10134242",  		.drv_name = "glk_cs4242_mx98357a",  		.fw_filename = "intel/dsp_fw_glk.bin", @@ -49,7 +57,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); diff --git a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c index 69ff7286d357..278ec196da7b 100644 --- a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c @@ -9,26 +9,31 @@  #include <sound/soc-acpi.h>  #include <sound/soc-acpi-intel-match.h> -static struct snd_soc_acpi_codecs jsl_7219_98373_codecs = { +static const struct snd_soc_acpi_codecs jsl_7219_98373_codecs = {  	.num_codecs = 1,  	.codecs = {"MX98373"}  }; -static struct snd_soc_acpi_codecs rt1015_spk = { +static const struct snd_soc_acpi_codecs rt1015_spk = {  	.num_codecs = 1,  	.codecs = {"10EC1015"}  }; -static struct snd_soc_acpi_codecs rt1015p_spk = { +static const struct snd_soc_acpi_codecs rt1015p_spk = {  	.num_codecs = 1,  	.codecs = {"RTL1015"}  }; -static struct snd_soc_acpi_codecs mx98360a_spk = { +static const struct snd_soc_acpi_codecs mx98360a_spk = {  	.num_codecs = 1,  	.codecs = {"MX98360A"}  }; +static const struct snd_soc_acpi_codecs rt5682_rt5682s_hp = { +	.num_codecs = 2, +	.codecs = {"10EC5682", "RTL5682"}, +}; +  /*   * When adding new entry to the snd_soc_acpi_intel_jsl_machines array,   * use .quirk_data member to distinguish different machine driver, @@ -50,7 +55,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {  		.sof_tplg_filename = "sof-jsl-da7219-mx98360a.tplg",  	},  	{ -		.id = "10EC5682", +		.comp_ids = &rt5682_rt5682s_hp,  		.drv_name = "jsl_rt5682_rt1015",  		.sof_fw_filename = "sof-jsl.ri",  		.machine_quirk = snd_soc_acpi_codec_list, @@ -58,7 +63,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {  		.sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg",  	},  	{ -		.id = "10EC5682", +		.comp_ids = &rt5682_rt5682s_hp,  		.drv_name = "jsl_rt5682_rt1015p",  		.sof_fw_filename = "sof-jsl.ri",  		.machine_quirk = snd_soc_acpi_codec_list, @@ -66,8 +71,8 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {  		.sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg",  	},  	{ -		.id = "10EC5682", -		.drv_name = "jsl_rt5682_mx98360a", +		.comp_ids = &rt5682_rt5682s_hp, +		.drv_name = "jsl_rt5682_mx98360",  		.sof_fw_filename = "sof-jsl.ri",  		.machine_quirk = snd_soc_acpi_codec_list,  		.quirk_data = &mx98360a_spk, @@ -81,6 +86,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {  		.quirk_data = &mx98360a_spk,  		.sof_tplg_filename = "sof-jsl-cs42l42-mx98360a.tplg",  	}, +	{ +		.id = "ESSX8336", +		.drv_name = "sof-essx8336", +		.sof_fw_filename = "sof-jsl.ri", +		.sof_tplg_filename = "sof-jsl-es8336.tplg", +	},  	{},  };  EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_jsl_machines); diff --git a/sound/soc/intel/common/soc-acpi-intel-kbl-match.c b/sound/soc/intel/common/soc-acpi-intel-kbl-match.c index 741bf2f9e081..4e817f559d38 100644 --- a/sound/soc/intel/common/soc-acpi-intel-kbl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-kbl-match.c @@ -12,32 +12,32 @@  static struct skl_machine_pdata skl_dmic_data; -static struct snd_soc_acpi_codecs kbl_codecs = { +static const struct snd_soc_acpi_codecs kbl_codecs = {  	.num_codecs = 1,  	.codecs = {"10508825"}  }; -static struct snd_soc_acpi_codecs kbl_poppy_codecs = { +static const struct snd_soc_acpi_codecs kbl_poppy_codecs = {  	.num_codecs = 1,  	.codecs = {"10EC5663"}  }; -static struct snd_soc_acpi_codecs kbl_5663_5514_codecs = { +static const struct snd_soc_acpi_codecs kbl_5663_5514_codecs = {  	.num_codecs = 2,  	.codecs = {"10EC5663", "10EC5514"}  }; -static struct snd_soc_acpi_codecs kbl_7219_98357_codecs = { +static const struct snd_soc_acpi_codecs kbl_7219_98357_codecs = {  	.num_codecs = 1,  	.codecs = {"MX98357A"}  }; -static struct snd_soc_acpi_codecs kbl_7219_98927_codecs = { +static const struct snd_soc_acpi_codecs kbl_7219_98927_codecs = {  	.num_codecs = 1,  	.codecs = {"MX98927"}  }; -static struct snd_soc_acpi_codecs kbl_7219_98373_codecs = { +static const struct snd_soc_acpi_codecs kbl_7219_98373_codecs = {  	.num_codecs = 1,  	.codecs = {"MX98373"}  }; diff --git a/sound/soc/intel/common/soc-acpi-intel-skl-match.c b/sound/soc/intel/common/soc-acpi-intel-skl-match.c index 961df8d6b5e4..75302e956742 100644 --- a/sound/soc/intel/common/soc-acpi-intel-skl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-skl-match.c @@ -12,7 +12,7 @@  static struct skl_machine_pdata skl_dmic_data; -static struct snd_soc_acpi_codecs skl_codecs = { +static const struct snd_soc_acpi_codecs skl_codecs = {  	.num_codecs = 1,  	.codecs = {"10508825"}  }; diff --git a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c b/sound/soc/intel/common/soc-acpi-intel-tgl-match.c index 785d5f5f8a9c..da31bb3cca17 100644 --- a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-tgl-match.c @@ -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"} @@ -330,17 +358,22 @@ static const struct snd_soc_acpi_codecs tgl_rt1011_amp = {  	.codecs = {"10EC1011"}  }; +static const struct snd_soc_acpi_codecs tgl_rt5682_rt5682s_hp = { +	.num_codecs = 2, +	.codecs = {"10EC5682", "RTL5682"}, +}; +  struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = {  	{ -		.id = "10EC5682", -		.drv_name = "tgl_mx98357a_rt5682", +		.comp_ids = &tgl_rt5682_rt5682s_hp, +		.drv_name = "tgl_mx98357_rt5682",  		.machine_quirk = snd_soc_acpi_codec_list,  		.quirk_data = &tgl_codecs,  		.sof_fw_filename = "sof-tgl.ri",  		.sof_tplg_filename = "sof-tgl-max98357a-rt5682.tplg",  	},  	{ -		.id = "10EC5682", +		.comp_ids = &tgl_rt5682_rt5682s_hp,  		.drv_name = "tgl_mx98373_rt5682",  		.machine_quirk = snd_soc_acpi_codec_list,  		.quirk_data = &tgl_max98373_amp, @@ -348,13 +381,19 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = {  		.sof_tplg_filename = "sof-tgl-max98373-rt5682.tplg",  	},  	{ -		.id = "10EC5682", +		.comp_ids = &tgl_rt5682_rt5682s_hp,  		.drv_name = "tgl_rt1011_rt5682",  		.machine_quirk = snd_soc_acpi_codec_list,  		.quirk_data = &tgl_rt1011_amp,  		.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); @@ -413,6 +452,19 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[] = {  		.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,  		.drv_name = "sof_sdw", diff --git a/sound/soc/intel/common/soc-intel-quirks.h b/sound/soc/intel/common/soc-intel-quirks.h index a93987ab7f4d..de4e550c5b34 100644 --- a/sound/soc/intel/common/soc-intel-quirks.h +++ b/sound/soc/intel/common/soc-intel-quirks.h @@ -9,34 +9,13 @@  #ifndef _SND_SOC_INTEL_QUIRKS_H  #define _SND_SOC_INTEL_QUIRKS_H +#include <linux/platform_data/x86/soc.h> +  #if IS_ENABLED(CONFIG_X86)  #include <linux/dmi.h> -#include <asm/cpu_device_id.h> -#include <asm/intel-family.h>  #include <asm/iosf_mbi.h> -#define SOC_INTEL_IS_CPU(soc, type)				\ -static inline bool soc_intel_is_##soc(void)			\ -{								\ -	static const struct x86_cpu_id soc##_cpu_ids[] = {	\ -		X86_MATCH_INTEL_FAM6_MODEL(type, NULL),		\ -		{}						\ -	};							\ -	const struct x86_cpu_id *id;				\ -								\ -	id = x86_match_cpu(soc##_cpu_ids);			\ -	if (id)							\ -		return true;					\ -	return false;						\ -} - -SOC_INTEL_IS_CPU(byt, ATOM_SILVERMONT); -SOC_INTEL_IS_CPU(cht, ATOM_AIRMONT); -SOC_INTEL_IS_CPU(apl, ATOM_GOLDMONT); -SOC_INTEL_IS_CPU(glk, ATOM_GOLDMONT_PLUS); -SOC_INTEL_IS_CPU(cml, KABYLAKE_L); -  static inline bool soc_intel_is_byt_cr(struct platform_device *pdev)  {  	/* @@ -114,30 +93,6 @@ static inline bool soc_intel_is_byt_cr(struct platform_device *pdev)  	return false;  } -static inline bool soc_intel_is_byt(void) -{ -	return false; -} - -static inline bool soc_intel_is_cht(void) -{ -	return false; -} - -static inline bool soc_intel_is_apl(void) -{ -	return false; -} - -static inline bool soc_intel_is_glk(void) -{ -	return false; -} - -static inline bool soc_intel_is_cml(void) -{ -	return false; -}  #endif - #endif /* _SND_SOC_INTEL_QUIRKS_H */ +#endif /* _SND_SOC_INTEL_QUIRKS_H */ |