acp-config.c (b6a5f4f05592e79cad076767c8eac2aaf04fc61e) | acp-config.c (f487201343312faa697ac40124085a834e0e26d8) |
---|---|
1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2// 3// This file is provided under a dual BSD/GPLv2 license. When using or 4// redistributing this file, you may do so under either license. 5// 6// Copyright(c) 2021 Advanced Micro Devices, Inc. 7// 8// Authors: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> --- 21 unchanged lines hidden (view full) --- 30 .matches = { 31 DMI_MATCH(DMI_SYS_VENDOR, "AMD"), 32 DMI_MATCH(DMI_PRODUCT_NAME, "Majolica-CZN"), 33 }, 34 }, 35 {} 36 }, 37 }, | 1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2// 3// This file is provided under a dual BSD/GPLv2 license. When using or 4// redistributing this file, you may do so under either license. 5// 6// Copyright(c) 2021 Advanced Micro Devices, Inc. 7// 8// Authors: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> --- 21 unchanged lines hidden (view full) --- 30 .matches = { 31 DMI_MATCH(DMI_SYS_VENDOR, "AMD"), 32 DMI_MATCH(DMI_PRODUCT_NAME, "Majolica-CZN"), 33 }, 34 }, 35 {} 36 }, 37 }, |
38 { 39 .flags = FLAG_AMD_SOF, 40 .device = ACP_PCI_DEV_ID, 41 .dmi_table = (const struct dmi_system_id []) { 42 { 43 .matches = { 44 DMI_MATCH(DMI_SYS_VENDOR, "Google"), 45 }, 46 }, 47 {} 48 }, 49 }, |
|
38}; 39 40int snd_amd_acp_find_config(struct pci_dev *pci) 41{ 42 const struct config_entry *table = config_table; 43 u16 device = pci->device; 44 int i; 45 | 50}; 51 52int snd_amd_acp_find_config(struct pci_dev *pci) 53{ 54 const struct config_entry *table = config_table; 55 u16 device = pci->device; 56 int i; 57 |
58 /* Do not enable FLAGS on older platforms with Rev id zero */ 59 if (!pci->revision) 60 return 0; 61 |
|
46 for (i = 0; i < ARRAY_SIZE(config_table); i++, table++) { 47 if (table->device != device) 48 continue; 49 if (table->dmi_table && !dmi_check_system(table->dmi_table)) 50 continue; 51 acp_quirk_data = table->flags; 52 return table->flags; 53 } 54 55 return 0; 56} 57EXPORT_SYMBOL(snd_amd_acp_find_config); 58 | 62 for (i = 0; i < ARRAY_SIZE(config_table); i++, table++) { 63 if (table->device != device) 64 continue; 65 if (table->dmi_table && !dmi_check_system(table->dmi_table)) 66 continue; 67 acp_quirk_data = table->flags; 68 return table->flags; 69 } 70 71 return 0; 72} 73EXPORT_SYMBOL(snd_amd_acp_find_config); 74 |
75static struct snd_soc_acpi_codecs amp_rt1019 = { 76 .num_codecs = 1, 77 .codecs = {"10EC1019"} 78}; 79 80static struct snd_soc_acpi_codecs amp_max = { 81 .num_codecs = 1, 82 .codecs = {"MX98360A"} 83}; 84 |
|
59struct snd_soc_acpi_mach snd_soc_acpi_amd_sof_machines[] = { 60 { | 85struct snd_soc_acpi_mach snd_soc_acpi_amd_sof_machines[] = { 86 { |
87 .id = "10EC5682", 88 .drv_name = "rt5682-rt1019", 89 .pdata = (void *)&acp_quirk_data, 90 .machine_quirk = snd_soc_acpi_codec_list, 91 .quirk_data = &_rt1019, 92 .fw_filename = "sof-rn.ri", 93 .sof_tplg_filename = "sof-acp.tplg", 94 }, 95 { 96 .id = "10EC5682", 97 .drv_name = "rt5682-max", 98 .pdata = (void *)&acp_quirk_data, 99 .machine_quirk = snd_soc_acpi_codec_list, 100 .quirk_data = &_max, 101 .fw_filename = "sof-rn.ri", 102 .sof_tplg_filename = "sof-acp.tplg", 103 }, 104 { 105 .id = "RTL5682", 106 .drv_name = "rt5682s-max", 107 .pdata = (void *)&acp_quirk_data, 108 .machine_quirk = snd_soc_acpi_codec_list, 109 .quirk_data = &_max, 110 .fw_filename = "sof-rn.ri", 111 .sof_tplg_filename = "sof-acp.tplg", 112 }, 113 { |
|
61 .id = "AMDI1019", 62 .drv_name = "renoir-dsp", 63 .pdata = (void *)&acp_quirk_data, 64 .fw_filename = "sof-rn.ri", 65 .sof_tplg_filename = "sof-acp.tplg", 66 }, 67 {}, 68}; 69EXPORT_SYMBOL(snd_soc_acpi_amd_sof_machines); 70 71MODULE_LICENSE("Dual BSD/GPL"); | 114 .id = "AMDI1019", 115 .drv_name = "renoir-dsp", 116 .pdata = (void *)&acp_quirk_data, 117 .fw_filename = "sof-rn.ri", 118 .sof_tplg_filename = "sof-acp.tplg", 119 }, 120 {}, 121}; 122EXPORT_SYMBOL(snd_soc_acpi_amd_sof_machines); 123 124MODULE_LICENSE("Dual BSD/GPL"); |