Commit 0cd0a7c2 authored by Amadeusz Sławiński's avatar Amadeusz Sławiński Committed by Takashi Iwai

ALSA: intel-dsp-config: Convert to PCI device IDs defines

Use PCI device IDs from pci_ids.h header. Also simplify comments for
Alder Lake and Raptor Lake platforms, as new IDs make it clear what
revision is in use.
Acked-by: default avatarMark Brown <broonie@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # for Intel Tangier ID
Reviewed-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: default avatarAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230717114511.484999-10-amadeuszx.slawinski@linux.intel.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 76e3a424
...@@ -50,7 +50,7 @@ static const struct config_entry config_table[] = { ...@@ -50,7 +50,7 @@ static const struct config_entry config_table[] = {
#if IS_ENABLED(CONFIG_SND_SOC_SOF_MERRIFIELD) #if IS_ENABLED(CONFIG_SND_SOC_SOF_MERRIFIELD)
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x119a, .device = PCI_DEVICE_ID_INTEL_SST_TNG,
}, },
#endif #endif
/* /*
...@@ -61,7 +61,7 @@ static const struct config_entry config_table[] = { ...@@ -61,7 +61,7 @@ static const struct config_entry config_table[] = {
#if IS_ENABLED(CONFIG_SND_SOC_SOF_APOLLOLAKE) #if IS_ENABLED(CONFIG_SND_SOC_SOF_APOLLOLAKE)
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x5a98, .device = PCI_DEVICE_ID_INTEL_HDA_APL,
.dmi_table = (const struct dmi_system_id []) { .dmi_table = (const struct dmi_system_id []) {
{ {
.ident = "Up Squared", .ident = "Up Squared",
...@@ -75,14 +75,14 @@ static const struct config_entry config_table[] = { ...@@ -75,14 +75,14 @@ static const struct config_entry config_table[] = {
}, },
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x5a98, .device = PCI_DEVICE_ID_INTEL_HDA_APL,
.codec_hid = &essx_83x6, .codec_hid = &essx_83x6,
}, },
#endif #endif
#if IS_ENABLED(CONFIG_SND_SOC_INTEL_APL) #if IS_ENABLED(CONFIG_SND_SOC_INTEL_APL)
{ {
.flags = FLAG_SST, .flags = FLAG_SST,
.device = 0x5a98, .device = PCI_DEVICE_ID_INTEL_HDA_APL,
.dmi_table = (const struct dmi_system_id []) { .dmi_table = (const struct dmi_system_id []) {
{ {
.ident = "Google Chromebooks", .ident = "Google Chromebooks",
...@@ -103,7 +103,7 @@ static const struct config_entry config_table[] = { ...@@ -103,7 +103,7 @@ static const struct config_entry config_table[] = {
#if IS_ENABLED(CONFIG_SND_SOC_INTEL_SKL) #if IS_ENABLED(CONFIG_SND_SOC_INTEL_SKL)
{ {
.flags = FLAG_SST, .flags = FLAG_SST,
.device = 0x9d70, .device = PCI_DEVICE_ID_INTEL_HDA_SKL_LP,
.dmi_table = (const struct dmi_system_id []) { .dmi_table = (const struct dmi_system_id []) {
{ {
.ident = "Google Chromebooks", .ident = "Google Chromebooks",
...@@ -116,14 +116,14 @@ static const struct config_entry config_table[] = { ...@@ -116,14 +116,14 @@ static const struct config_entry config_table[] = {
}, },
{ {
.flags = FLAG_SST | FLAG_SST_ONLY_IF_DMIC, .flags = FLAG_SST | FLAG_SST_ONLY_IF_DMIC,
.device = 0x9d70, .device = PCI_DEVICE_ID_INTEL_HDA_SKL_LP,
}, },
#endif #endif
/* Kabylake-LP */ /* Kabylake-LP */
#if IS_ENABLED(CONFIG_SND_SOC_INTEL_KBL) #if IS_ENABLED(CONFIG_SND_SOC_INTEL_KBL)
{ {
.flags = FLAG_SST, .flags = FLAG_SST,
.device = 0x9d71, .device = PCI_DEVICE_ID_INTEL_HDA_KBL_LP,
.dmi_table = (const struct dmi_system_id []) { .dmi_table = (const struct dmi_system_id []) {
{ {
.ident = "Google Chromebooks", .ident = "Google Chromebooks",
...@@ -136,7 +136,7 @@ static const struct config_entry config_table[] = { ...@@ -136,7 +136,7 @@ static const struct config_entry config_table[] = {
}, },
{ {
.flags = FLAG_SST | FLAG_SST_ONLY_IF_DMIC, .flags = FLAG_SST | FLAG_SST_ONLY_IF_DMIC,
.device = 0x9d71, .device = PCI_DEVICE_ID_INTEL_HDA_KBL_LP,
}, },
#endif #endif
...@@ -148,7 +148,7 @@ static const struct config_entry config_table[] = { ...@@ -148,7 +148,7 @@ static const struct config_entry config_table[] = {
#if IS_ENABLED(CONFIG_SND_SOC_SOF_GEMINILAKE) #if IS_ENABLED(CONFIG_SND_SOC_SOF_GEMINILAKE)
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x3198, .device = PCI_DEVICE_ID_INTEL_HDA_GML,
.dmi_table = (const struct dmi_system_id []) { .dmi_table = (const struct dmi_system_id []) {
{ {
.ident = "Google Chromebooks", .ident = "Google Chromebooks",
...@@ -161,7 +161,7 @@ static const struct config_entry config_table[] = { ...@@ -161,7 +161,7 @@ static const struct config_entry config_table[] = {
}, },
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x3198, .device = PCI_DEVICE_ID_INTEL_HDA_GML,
.codec_hid = &essx_83x6, .codec_hid = &essx_83x6,
}, },
#endif #endif
...@@ -181,7 +181,7 @@ static const struct config_entry config_table[] = { ...@@ -181,7 +181,7 @@ static const struct config_entry config_table[] = {
#if IS_ENABLED(CONFIG_SND_SOC_SOF_CANNONLAKE) #if IS_ENABLED(CONFIG_SND_SOC_SOF_CANNONLAKE)
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x9dc8, .device = PCI_DEVICE_ID_INTEL_HDA_CNL_LP,
.dmi_table = (const struct dmi_system_id []) { .dmi_table = (const struct dmi_system_id []) {
{ {
.ident = "Google Chromebooks", .ident = "Google Chromebooks",
...@@ -200,12 +200,12 @@ static const struct config_entry config_table[] = { ...@@ -200,12 +200,12 @@ static const struct config_entry config_table[] = {
}, },
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x09dc8, .device = PCI_DEVICE_ID_INTEL_HDA_CNL_LP,
.codec_hid = &essx_83x6, .codec_hid = &essx_83x6,
}, },
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x9dc8, .device = PCI_DEVICE_ID_INTEL_HDA_CNL_LP,
}, },
#endif #endif
...@@ -213,7 +213,7 @@ static const struct config_entry config_table[] = { ...@@ -213,7 +213,7 @@ static const struct config_entry config_table[] = {
#if IS_ENABLED(CONFIG_SND_SOC_SOF_COFFEELAKE) #if IS_ENABLED(CONFIG_SND_SOC_SOF_COFFEELAKE)
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0xa348, .device = PCI_DEVICE_ID_INTEL_HDA_CNL_H,
.dmi_table = (const struct dmi_system_id []) { .dmi_table = (const struct dmi_system_id []) {
{ {
.ident = "Google Chromebooks", .ident = "Google Chromebooks",
...@@ -226,7 +226,7 @@ static const struct config_entry config_table[] = { ...@@ -226,7 +226,7 @@ static const struct config_entry config_table[] = {
}, },
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0xa348, .device = PCI_DEVICE_ID_INTEL_HDA_CNL_H,
}, },
#endif #endif
...@@ -234,7 +234,7 @@ static const struct config_entry config_table[] = { ...@@ -234,7 +234,7 @@ static const struct config_entry config_table[] = {
/* Cometlake-LP */ /* Cometlake-LP */
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x02c8, .device = PCI_DEVICE_ID_INTEL_HDA_CML_LP,
.dmi_table = (const struct dmi_system_id []) { .dmi_table = (const struct dmi_system_id []) {
{ {
.ident = "Google Chromebooks", .ident = "Google Chromebooks",
...@@ -260,17 +260,17 @@ static const struct config_entry config_table[] = { ...@@ -260,17 +260,17 @@ static const struct config_entry config_table[] = {
}, },
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x02c8, .device = PCI_DEVICE_ID_INTEL_HDA_CML_LP,
.codec_hid = &essx_83x6, .codec_hid = &essx_83x6,
}, },
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x02c8, .device = PCI_DEVICE_ID_INTEL_HDA_CML_LP,
}, },
/* Cometlake-H */ /* Cometlake-H */
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x06c8, .device = PCI_DEVICE_ID_INTEL_HDA_CML_H,
.dmi_table = (const struct dmi_system_id []) { .dmi_table = (const struct dmi_system_id []) {
{ {
.matches = { .matches = {
...@@ -289,12 +289,12 @@ static const struct config_entry config_table[] = { ...@@ -289,12 +289,12 @@ static const struct config_entry config_table[] = {
}, },
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x06c8, .device = PCI_DEVICE_ID_INTEL_HDA_CML_H,
.codec_hid = &essx_83x6, .codec_hid = &essx_83x6,
}, },
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x06c8, .device = PCI_DEVICE_ID_INTEL_HDA_CML_H,
}, },
#endif #endif
...@@ -302,7 +302,7 @@ static const struct config_entry config_table[] = { ...@@ -302,7 +302,7 @@ static const struct config_entry config_table[] = {
#if IS_ENABLED(CONFIG_SND_SOC_SOF_ICELAKE) #if IS_ENABLED(CONFIG_SND_SOC_SOF_ICELAKE)
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x34c8, .device = PCI_DEVICE_ID_INTEL_HDA_ICL_LP,
.dmi_table = (const struct dmi_system_id []) { .dmi_table = (const struct dmi_system_id []) {
{ {
.ident = "Google Chromebooks", .ident = "Google Chromebooks",
...@@ -315,12 +315,12 @@ static const struct config_entry config_table[] = { ...@@ -315,12 +315,12 @@ static const struct config_entry config_table[] = {
}, },
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x34c8, .device = PCI_DEVICE_ID_INTEL_HDA_ICL_LP,
.codec_hid = &essx_83x6, .codec_hid = &essx_83x6,
}, },
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x34c8, .device = PCI_DEVICE_ID_INTEL_HDA_ICL_LP,
}, },
#endif #endif
...@@ -328,7 +328,7 @@ static const struct config_entry config_table[] = { ...@@ -328,7 +328,7 @@ static const struct config_entry config_table[] = {
#if IS_ENABLED(CONFIG_SND_SOC_SOF_JASPERLAKE) #if IS_ENABLED(CONFIG_SND_SOC_SOF_JASPERLAKE)
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x4dc8, .device = PCI_DEVICE_ID_INTEL_HDA_JSL_N,
.dmi_table = (const struct dmi_system_id []) { .dmi_table = (const struct dmi_system_id []) {
{ {
.ident = "Google Chromebooks", .ident = "Google Chromebooks",
...@@ -341,12 +341,12 @@ static const struct config_entry config_table[] = { ...@@ -341,12 +341,12 @@ static const struct config_entry config_table[] = {
}, },
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x4dc8, .device = PCI_DEVICE_ID_INTEL_HDA_JSL_N,
.codec_hid = &essx_83x6, .codec_hid = &essx_83x6,
}, },
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC,
.device = 0x4dc8, .device = PCI_DEVICE_ID_INTEL_HDA_JSL_N,
}, },
#endif #endif
...@@ -354,7 +354,7 @@ static const struct config_entry config_table[] = { ...@@ -354,7 +354,7 @@ static const struct config_entry config_table[] = {
#if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) #if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE)
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0xa0c8, .device = PCI_DEVICE_ID_INTEL_HDA_TGL_LP,
.dmi_table = (const struct dmi_system_id []) { .dmi_table = (const struct dmi_system_id []) {
{ {
.ident = "Google Chromebooks", .ident = "Google Chromebooks",
...@@ -373,16 +373,16 @@ static const struct config_entry config_table[] = { ...@@ -373,16 +373,16 @@ static const struct config_entry config_table[] = {
}, },
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0xa0c8, .device = PCI_DEVICE_ID_INTEL_HDA_TGL_LP,
.codec_hid = &essx_83x6, .codec_hid = &essx_83x6,
}, },
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0xa0c8, .device = PCI_DEVICE_ID_INTEL_HDA_TGL_LP,
}, },
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x43c8, .device = PCI_DEVICE_ID_INTEL_HDA_TGL_H,
}, },
#endif #endif
...@@ -390,78 +390,69 @@ static const struct config_entry config_table[] = { ...@@ -390,78 +390,69 @@ static const struct config_entry config_table[] = {
#if IS_ENABLED(CONFIG_SND_SOC_SOF_ELKHARTLAKE) #if IS_ENABLED(CONFIG_SND_SOC_SOF_ELKHARTLAKE)
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC,
.device = 0x4b55, .device = PCI_DEVICE_ID_INTEL_HDA_EHL_0,
}, },
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC,
.device = 0x4b58, .device = PCI_DEVICE_ID_INTEL_HDA_EHL_3,
}, },
#endif #endif
/* Alder Lake */ /* Alder Lake / Raptor Lake */
#if IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE) #if IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE)
/* Alderlake-S */
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x7ad0, .device = PCI_DEVICE_ID_INTEL_HDA_ADL_S,
}, },
/* RaptorLake-S */
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x7a50, .device = PCI_DEVICE_ID_INTEL_HDA_RPL_S,
}, },
/* Alderlake-P */
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x51c8, .device = PCI_DEVICE_ID_INTEL_HDA_ADL_P,
.codec_hid = &essx_83x6, .codec_hid = &essx_83x6,
}, },
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x51c8, .device = PCI_DEVICE_ID_INTEL_HDA_ADL_P,
}, },
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x51cd, .device = PCI_DEVICE_ID_INTEL_HDA_ADL_PX,
}, },
/* Alderlake-PS */
{ {
.flags = FLAG_SOF, .flags = FLAG_SOF,
.device = 0x51c9, .device = PCI_DEVICE_ID_INTEL_HDA_ADL_PS,
.codec_hid = &essx_83x6, .codec_hid = &essx_83x6,
}, },
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x51c9, .device = PCI_DEVICE_ID_INTEL_HDA_ADL_PS,
}, },
/* Alderlake-M */
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x51cc, .device = PCI_DEVICE_ID_INTEL_HDA_ADL_M,
}, },
/* Alderlake-N */
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x54c8, .device = PCI_DEVICE_ID_INTEL_HDA_ADL_N,
}, },
/* RaptorLake-P */
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x51ca, .device = PCI_DEVICE_ID_INTEL_HDA_RPL_P_0,
}, },
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x51cb, .device = PCI_DEVICE_ID_INTEL_HDA_RPL_P_1,
}, },
/* RaptorLake-M */
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x51ce, .device = PCI_DEVICE_ID_INTEL_HDA_RPL_M,
}, },
/* RaptorLake-PX */
{ {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE, .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x51cf, .device = PCI_DEVICE_ID_INTEL_HDA_RPL_PX,
}, },
#endif #endif
...@@ -542,7 +533,7 @@ int snd_intel_dsp_driver_probe(struct pci_dev *pci) ...@@ -542,7 +533,7 @@ int snd_intel_dsp_driver_probe(struct pci_dev *pci)
const struct config_entry *cfg; const struct config_entry *cfg;
/* Intel vendor only */ /* Intel vendor only */
if (pci->vendor != 0x8086) if (pci->vendor != PCI_VENDOR_ID_INTEL)
return SND_INTEL_DSP_DRIVER_ANY; return SND_INTEL_DSP_DRIVER_ANY;
/* /*
...@@ -550,12 +541,12 @@ int snd_intel_dsp_driver_probe(struct pci_dev *pci) ...@@ -550,12 +541,12 @@ int snd_intel_dsp_driver_probe(struct pci_dev *pci)
* for HDMI/DP support, ignore kernel parameter * for HDMI/DP support, ignore kernel parameter
*/ */
switch (pci->device) { switch (pci->device) {
case 0x160c: /* Broadwell */ case PCI_DEVICE_ID_INTEL_HDA_BDW:
case 0x0a0c: /* Haswell */ case PCI_DEVICE_ID_INTEL_HDA_HSW_0:
case 0x0c0c: case PCI_DEVICE_ID_INTEL_HDA_HSW_2:
case 0x0d0c: case PCI_DEVICE_ID_INTEL_HDA_HSW_3:
case 0x0f04: /* Baytrail */ case PCI_DEVICE_ID_INTEL_HDA_BYT:
case 0x2284: /* Braswell */ case PCI_DEVICE_ID_INTEL_HDA_BSW:
return SND_INTEL_DSP_DRIVER_ANY; return SND_INTEL_DSP_DRIVER_ANY;
} }
......
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