ASoC: Intel: sof_sdw: reorganize quirks by generation
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Mon, 8 Feb 2021 23:33:26 +0000 (17:33 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Mar 2021 13:17:29 +0000 (14:17 +0100)
[ Upstream commit 3d09cf8d0d791a41a75123e135f604d59f4aa870 ]

The quirk table is a mess, let's reorganize it by generation before
making sure that the quirks are consistent for each generation.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210208233336.59449-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/intel/boards/sof_sdw.c

index daca06d..9e2e8f5 100644 (file)
@@ -48,37 +48,14 @@ static int sof_sdw_quirk_cb(const struct dmi_system_id *id)
 }
 
 static const struct dmi_system_id sof_sdw_quirk_table[] = {
+       /* CometLake devices */
        {
                .callback = sof_sdw_quirk_cb,
                .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
-                       DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A32")
-               },
-               .driver_data = (void *)(SOF_SDW_TGL_HDMI |
-                                       SOF_RT711_JD_SRC_JD2 |
-                                       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, "0A3E")
-               },
-               .driver_data = (void *)(SOF_SDW_TGL_HDMI |
-                                       SOF_RT711_JD_SRC_JD2 |
-                                       SOF_RT715_DAI_ID_FIX),
-       },
-       {
-               .callback = sof_sdw_quirk_cb,
-               .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
-                       DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A5E")
+                       DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "CometLake Client"),
                },
-               .driver_data = (void *)(SOF_SDW_TGL_HDMI |
-                                       SOF_RT711_JD_SRC_JD2 |
-                                       SOF_RT715_DAI_ID_FIX |
-                                       SOF_SDW_FOUR_SPK),
+               .driver_data = (void *)SOF_SDW_PCH_DMIC,
        },
        {
                .callback = sof_sdw_quirk_cb,
@@ -109,7 +86,7 @@ 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"),
@@ -119,6 +96,16 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
                                        SOF_RT715_DAI_ID_FIX |
                                        SOF_SDW_FOUR_SPK),
        },
+       /* IceLake devices */
+       {
+               .callback = sof_sdw_quirk_cb,
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Ice Lake Client"),
+               },
+               .driver_data = (void *)SOF_SDW_PCH_DMIC,
+       },
+       /* TigerLake devices */
        {
                .callback = sof_sdw_quirk_cb,
                .matches = {
@@ -134,18 +121,23 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
        {
                .callback = sof_sdw_quirk_cb,
                .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "Ice Lake Client"),
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
+                       DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A3E")
                },
-               .driver_data = (void *)SOF_SDW_PCH_DMIC,
+               .driver_data = (void *)(SOF_SDW_TGL_HDMI |
+                                       SOF_RT711_JD_SRC_JD2 |
+                                       SOF_RT715_DAI_ID_FIX),
        },
        {
                .callback = sof_sdw_quirk_cb,
                .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "CometLake Client"),
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
+                       DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A5E")
                },
-               .driver_data = (void *)SOF_SDW_PCH_DMIC,
+               .driver_data = (void *)(SOF_SDW_TGL_HDMI |
+                                       SOF_RT711_JD_SRC_JD2 |
+                                       SOF_RT715_DAI_ID_FIX |
+                                       SOF_SDW_FOUR_SPK),
        },
        {
                .callback = sof_sdw_quirk_cb,
@@ -167,7 +159,18 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
                                        SOF_SDW_PCH_DMIC |
                                        SOF_SDW_FOUR_SPK),
        },
-
+       /* TigerLake-SDCA devices */
+       {
+               .callback = sof_sdw_quirk_cb,
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
+                       DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A32")
+               },
+               .driver_data = (void *)(SOF_SDW_TGL_HDMI |
+                                       SOF_RT711_JD_SRC_JD2 |
+                                       SOF_RT715_DAI_ID_FIX |
+                                       SOF_SDW_FOUR_SPK),
+       },
        {}
 };