[RFC,6/8] ASoC: Intel: avs: Update PCI ID list

Message ID 20230628205135.517241-7-amadeuszx.slawinski@linux.intel.com
State New
Headers
Series PCI: Define Intel PCI IDs and use them in drivers |

Commit Message

Amadeusz Sławiński June 28, 2023, 8:51 p.m. UTC
  Use PCI device IDs from pci_ids.h header. Adjust AVS_MACH_ENTRY macro,
so device id can be provided in short form.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
 sound/soc/intel/avs/board_selection.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
  

Comments

Andy Shevchenko June 28, 2023, 2:51 p.m. UTC | #1
On Wed, Jun 28, 2023 at 10:51:33PM +0200, Amadeusz Sławiński wrote:
> Use PCI device IDs from pci_ids.h header. Adjust AVS_MACH_ENTRY macro,

AVS_MACH_ENTRY()

> so device id can be provided in short form.

ID

...

>  #define AVS_MACH_ENTRY(_id, _mach) \
> -	{ .id = (_id), .machs = (_mach), }
> +	{ .id = PCI_DEVICE_ID_INTEL_HDA_##_id, .machs = (_mach), }

I would duplicate HDA in all entries below in order to be compatible with
PCI_DEVICE_DATA() (logically, so if I grep for one, I grep exactly for
everything after PCI_DEVICE_ID_INTEL_ prefix and these won't show up.
  

Patch

diff --git a/sound/soc/intel/avs/board_selection.c b/sound/soc/intel/avs/board_selection.c
index 60f8fb0bff95..b2d17124c978 100644
--- a/sound/soc/intel/avs/board_selection.c
+++ b/sound/soc/intel/avs/board_selection.c
@@ -263,14 +263,14 @@  struct avs_acpi_boards {
 };
 
 #define AVS_MACH_ENTRY(_id, _mach) \
-	{ .id = (_id), .machs = (_mach), }
+	{ .id = PCI_DEVICE_ID_INTEL_HDA_##_id, .machs = (_mach), }
 
 /* supported I2S boards per platform */
 static const struct avs_acpi_boards i2s_boards[] = {
-	AVS_MACH_ENTRY(0x9d70, avs_skl_i2s_machines), /* SKL */
-	AVS_MACH_ENTRY(0x9d71, avs_kbl_i2s_machines), /* KBL */
-	AVS_MACH_ENTRY(0x5a98, avs_apl_i2s_machines), /* APL */
-	AVS_MACH_ENTRY(0x3198, avs_gml_i2s_machines), /* GML */
+	AVS_MACH_ENTRY(SKL_LP,	avs_skl_i2s_machines),
+	AVS_MACH_ENTRY(KBL_LP,	avs_kbl_i2s_machines),
+	AVS_MACH_ENTRY(APL,	avs_apl_i2s_machines),
+	AVS_MACH_ENTRY(GML,	avs_gml_i2s_machines),
 	{},
 };