Commit 4228668e authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: Intel: SOF: merge COMETLAKE_LP and COMETLAKE_H

We already have two configurations for CometLake, and a third one
coming. On other platforms, we used a single Kconfig option, so we
should follow the same trend by merging the two cases in a backwards
compatible way.

The backwards compatibility is handled by overloading the COMETLAKE_LP
kconfig as COMETLAKE. In practice we've never seen a case where
COMETLAKE_H is not selected along with COMETLAKE_LP, so keeping one
of the two is enough.
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200617164755.18104-2-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent ed1220df
...@@ -192,8 +192,8 @@ static const struct config_entry config_table[] = { ...@@ -192,8 +192,8 @@ static const struct config_entry config_table[] = {
}, },
#endif #endif
#if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE)
/* Cometlake-LP */ /* Cometlake-LP */
#if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_LP)
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x02c8, .device = 0x02c8,
...@@ -211,9 +211,7 @@ static const struct config_entry config_table[] = { ...@@ -211,9 +211,7 @@ static const struct config_entry config_table[] = {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC,
.device = 0x02c8, .device = 0x02c8,
}, },
#endif
/* Cometlake-H */ /* Cometlake-H */
#if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_H)
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC,
.device = 0x06c8, .device = 0x06c8,
......
...@@ -492,7 +492,7 @@ config SND_SOC_INTEL_SOF_PCM512x_MACH ...@@ -492,7 +492,7 @@ config SND_SOC_INTEL_SOF_PCM512x_MACH
endif ## SND_SOC_SOF_HDA_LINK || SND_SOC_SOF_BAYTRAIL endif ## SND_SOC_SOF_HDA_LINK || SND_SOC_SOF_BAYTRAIL
if (SND_SOC_SOF_COMETLAKE_LP && SND_SOC_SOF_HDA_LINK) if (SND_SOC_SOF_COMETLAKE && SND_SOC_SOF_HDA_LINK)
config SND_SOC_INTEL_CML_LP_DA7219_MAX98357A_MACH config SND_SOC_INTEL_CML_LP_DA7219_MAX98357A_MACH
tristate "CML_LP with DA7219 and MAX98357A in I2S Mode" tristate "CML_LP with DA7219 and MAX98357A in I2S Mode"
...@@ -520,7 +520,7 @@ config SND_SOC_INTEL_SOF_CML_RT1011_RT5682_MACH ...@@ -520,7 +520,7 @@ config SND_SOC_INTEL_SOF_CML_RT1011_RT5682_MACH
Say Y if you have such a device. Say Y if you have such a device.
If unsure select "N". If unsure select "N".
endif ## SND_SOC_SOF_COMETLAKE_LP && SND_SOC_SOF_HDA_LINK endif ## SND_SOC_SOF_COMETLAKE && SND_SOC_SOF_HDA_LINK
if SND_SOC_SOF_JASPERLAKE if SND_SOC_SOF_JASPERLAKE
......
...@@ -25,8 +25,7 @@ config SND_SOC_SOF_INTEL_PCI ...@@ -25,8 +25,7 @@ config SND_SOC_SOF_INTEL_PCI
select SND_SOC_SOF_CANNONLAKE if SND_SOC_SOF_CANNONLAKE_SUPPORT select SND_SOC_SOF_CANNONLAKE if SND_SOC_SOF_CANNONLAKE_SUPPORT
select SND_SOC_SOF_COFFEELAKE if SND_SOC_SOF_COFFEELAKE_SUPPORT select SND_SOC_SOF_COFFEELAKE if SND_SOC_SOF_COFFEELAKE_SUPPORT
select SND_SOC_SOF_ICELAKE if SND_SOC_SOF_ICELAKE_SUPPORT select SND_SOC_SOF_ICELAKE if SND_SOC_SOF_ICELAKE_SUPPORT
select SND_SOC_SOF_COMETLAKE_LP if SND_SOC_SOF_COMETLAKE_LP_SUPPORT select SND_SOC_SOF_COMETLAKE if SND_SOC_SOF_COMETLAKE_SUPPORT
select SND_SOC_SOF_COMETLAKE_H if SND_SOC_SOF_COMETLAKE_H_SUPPORT
select SND_SOC_SOF_TIGERLAKE if SND_SOC_SOF_TIGERLAKE_SUPPORT select SND_SOC_SOF_TIGERLAKE if SND_SOC_SOF_TIGERLAKE_SUPPORT
select SND_SOC_SOF_ELKHARTLAKE if SND_SOC_SOF_ELKHARTLAKE_SUPPORT select SND_SOC_SOF_ELKHARTLAKE if SND_SOC_SOF_ELKHARTLAKE_SUPPORT
select SND_SOC_SOF_JASPERLAKE if SND_SOC_SOF_JASPERLAKE_SUPPORT select SND_SOC_SOF_JASPERLAKE if SND_SOC_SOF_JASPERLAKE_SUPPORT
...@@ -201,34 +200,22 @@ config SND_SOC_SOF_ICELAKE ...@@ -201,34 +200,22 @@ config SND_SOC_SOF_ICELAKE
This option is not user-selectable but automagically handled by This option is not user-selectable but automagically handled by
'select' statements at a higher level 'select' statements at a higher level
config SND_SOC_SOF_COMETLAKE_LP config SND_SOC_SOF_COMETLAKE
tristate tristate
select SND_SOC_SOF_HDA_COMMON select SND_SOC_SOF_HDA_COMMON
help help
This option is not user-selectable but automagically handled by This option is not user-selectable but automagically handled by
'select' statements at a higher level 'select' statements at a higher level
config SND_SOC_SOF_COMETLAKE_LP_SUPPORT config SND_SOC_SOF_COMETLAKE_SUPPORT
bool "SOF support for CometLake-LP" bool
help
This adds support for Sound Open Firmware for Intel(R) platforms
using the Cometlake-LP processors.
Say Y if you have such a device.
If unsure select "N".
config SND_SOC_SOF_COMETLAKE_H config SND_SOC_SOF_COMETLAKE_LP_SUPPORT
tristate bool "SOF support for CometLake"
select SND_SOC_SOF_HDA_COMMON select SND_SOC_SOF_COMETLAKE_SUPPORT
help
This option is not user-selectable but automagically handled by
'select' statements at a higher level
config SND_SOC_SOF_COMETLAKE_H_SUPPORT
bool "SOF support for CometLake-H"
help help
This adds support for Sound Open Firmware for Intel(R) platforms This adds support for Sound Open Firmware for Intel(R) platforms
using the Cometlake-H processors. using the Cometlake processors.
Say Y if you have such a device.
If unsure select "N". If unsure select "N".
config SND_SOC_SOF_TIGERLAKE_SUPPORT config SND_SOC_SOF_TIGERLAKE_SUPPORT
......
...@@ -151,9 +151,7 @@ static const struct sof_dev_desc cfl_desc = { ...@@ -151,9 +151,7 @@ static const struct sof_dev_desc cfl_desc = {
}; };
#endif #endif
#if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_LP) || \ #if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE)
IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_H)
static const struct sof_dev_desc cml_desc = { static const struct sof_dev_desc cml_desc = {
.machines = snd_soc_acpi_intel_cml_machines, .machines = snd_soc_acpi_intel_cml_machines,
.alt_machines = snd_soc_acpi_intel_cml_sdw_machines, .alt_machines = snd_soc_acpi_intel_cml_sdw_machines,
...@@ -420,12 +418,10 @@ static const struct pci_device_id sof_pci_ids[] = { ...@@ -420,12 +418,10 @@ static const struct pci_device_id sof_pci_ids[] = {
{ PCI_DEVICE(0x8086, 0x4dc8), { PCI_DEVICE(0x8086, 0x4dc8),
.driver_data = (unsigned long)&jsl_desc}, .driver_data = (unsigned long)&jsl_desc},
#endif #endif
#if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_LP) #if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE)
{ PCI_DEVICE(0x8086, 0x02c8), { PCI_DEVICE(0x8086, 0x02c8), /* CML-LP */
.driver_data = (unsigned long)&cml_desc}, .driver_data = (unsigned long)&cml_desc},
#endif { PCI_DEVICE(0x8086, 0x06c8), /* CML-H */
#if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_H)
{ PCI_DEVICE(0x8086, 0x06c8),
.driver_data = (unsigned long)&cml_desc}, .driver_data = (unsigned long)&cml_desc},
#endif #endif
#if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) #if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE)
......
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