Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 3 | * soc-acpi-intel-bxt-match.c - tables and support for BXT ACPI enumeration. |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 4 | * |
| 5 | * Copyright (c) 2018, Intel Corporation. |
| 6 | * |
| 7 | */ |
| 8 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 9 | #include <linux/dmi.h> |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 10 | #include <sound/soc-acpi.h> |
| 11 | #include <sound/soc-acpi-intel-match.h> |
| 12 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 13 | enum { |
| 14 | APL_RVP, |
| 15 | }; |
| 16 | |
| 17 | static const struct dmi_system_id apl_table[] = { |
| 18 | { |
| 19 | .matches = { |
| 20 | DMI_MATCH(DMI_SYS_VENDOR, "Intel Corp."), |
| 21 | DMI_MATCH(DMI_BOARD_NAME, "Apollolake RVP1A"), |
| 22 | }, |
| 23 | .driver_data = (void *)(APL_RVP), |
| 24 | }, |
| 25 | {} |
| 26 | }; |
| 27 | |
| 28 | static struct snd_soc_acpi_mach *apl_quirk(void *arg) |
| 29 | { |
| 30 | struct snd_soc_acpi_mach *mach = arg; |
| 31 | const struct dmi_system_id *dmi_id; |
| 32 | unsigned long apl_machine_id; |
| 33 | |
| 34 | dmi_id = dmi_first_match(apl_table); |
| 35 | if (dmi_id) { |
| 36 | apl_machine_id = (unsigned long)dmi_id->driver_data; |
| 37 | if (apl_machine_id == APL_RVP) |
| 38 | return NULL; |
| 39 | } |
| 40 | |
| 41 | return mach; |
| 42 | } |
| 43 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 44 | static struct snd_soc_acpi_codecs bxt_codecs = { |
| 45 | .num_codecs = 1, |
| 46 | .codecs = {"MX98357A"} |
| 47 | }; |
| 48 | |
| 49 | struct snd_soc_acpi_mach snd_soc_acpi_intel_bxt_machines[] = { |
| 50 | { |
| 51 | .id = "INT343A", |
| 52 | .drv_name = "bxt_alc298s_i2s", |
| 53 | .fw_filename = "intel/dsp_fw_bxtn.bin", |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 54 | .sof_fw_filename = "sof-apl.ri", |
| 55 | .sof_tplg_filename = "sof-apl-rt298.tplg", |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 56 | }, |
| 57 | { |
| 58 | .id = "DLGS7219", |
| 59 | .drv_name = "bxt_da7219_max98357a", |
| 60 | .fw_filename = "intel/dsp_fw_bxtn.bin", |
| 61 | .machine_quirk = snd_soc_acpi_codec_list, |
| 62 | .quirk_data = &bxt_codecs, |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 63 | .sof_fw_filename = "sof-apl.ri", |
| 64 | .sof_tplg_filename = "sof-apl-da7219.tplg", |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 65 | }, |
| 66 | { |
| 67 | .id = "104C5122", |
| 68 | .drv_name = "bxt-pcm512x", |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 69 | .sof_fw_filename = "sof-apl.ri", |
| 70 | .sof_tplg_filename = "sof-apl-pcm512x.tplg", |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 71 | }, |
| 72 | { |
| 73 | .id = "1AEC8804", |
| 74 | .drv_name = "bxt-wm8804", |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 75 | .sof_fw_filename = "sof-apl.ri", |
| 76 | .sof_tplg_filename = "sof-apl-wm8804.tplg", |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 77 | }, |
| 78 | { |
| 79 | .id = "INT34C3", |
| 80 | .drv_name = "bxt_tdf8532", |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 81 | .machine_quirk = apl_quirk, |
| 82 | .sof_fw_filename = "sof-apl.ri", |
| 83 | .sof_tplg_filename = "sof-apl-tdf8532.tplg", |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 84 | }, |
| 85 | {}, |
| 86 | }; |
| 87 | EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_bxt_machines); |
| 88 | |
| 89 | MODULE_LICENSE("GPL v2"); |
| 90 | MODULE_DESCRIPTION("Intel Common ACPI Match module"); |