| .. | .. |
|---|
| 1 | | -// SPDX-License-Identifier: GPL-2.0 |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 2 | 2 | /* |
|---|
| 3 | | - * soc-apci-intel-bxt-match.c - tables and support for BXT ACPI enumeration. |
|---|
| 3 | + * soc-acpi-intel-bxt-match.c - tables and support for BXT ACPI enumeration. |
|---|
| 4 | 4 | * |
|---|
| 5 | 5 | * Copyright (c) 2018, Intel Corporation. |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | */ |
|---|
| 8 | 8 | |
|---|
| 9 | +#include <linux/dmi.h> |
|---|
| 9 | 10 | #include <sound/soc-acpi.h> |
|---|
| 10 | 11 | #include <sound/soc-acpi-intel-match.h> |
|---|
| 12 | + |
|---|
| 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 | +} |
|---|
| 11 | 43 | |
|---|
| 12 | 44 | static struct snd_soc_acpi_codecs bxt_codecs = { |
|---|
| 13 | 45 | .num_codecs = 1, |
|---|
| .. | .. |
|---|
| 19 | 51 | .id = "INT343A", |
|---|
| 20 | 52 | .drv_name = "bxt_alc298s_i2s", |
|---|
| 21 | 53 | .fw_filename = "intel/dsp_fw_bxtn.bin", |
|---|
| 54 | + .sof_fw_filename = "sof-apl.ri", |
|---|
| 55 | + .sof_tplg_filename = "sof-apl-rt298.tplg", |
|---|
| 22 | 56 | }, |
|---|
| 23 | 57 | { |
|---|
| 24 | 58 | .id = "DLGS7219", |
|---|
| .. | .. |
|---|
| 26 | 60 | .fw_filename = "intel/dsp_fw_bxtn.bin", |
|---|
| 27 | 61 | .machine_quirk = snd_soc_acpi_codec_list, |
|---|
| 28 | 62 | .quirk_data = &bxt_codecs, |
|---|
| 29 | | - .sof_fw_filename = "intel/sof-apl.ri", |
|---|
| 30 | | - .sof_tplg_filename = "intel/sof-apl-da7219.tplg", |
|---|
| 31 | | - .asoc_plat_name = "0000:00:0e.0", |
|---|
| 63 | + .sof_fw_filename = "sof-apl.ri", |
|---|
| 64 | + .sof_tplg_filename = "sof-apl-da7219.tplg", |
|---|
| 32 | 65 | }, |
|---|
| 33 | 66 | { |
|---|
| 34 | 67 | .id = "104C5122", |
|---|
| 35 | | - .drv_name = "bxt-pcm512x", |
|---|
| 36 | | - .sof_fw_filename = "intel/sof-apl.ri", |
|---|
| 37 | | - .sof_tplg_filename = "intel/sof-apl-pcm512x.tplg", |
|---|
| 38 | | - .asoc_plat_name = "0000:00:0e.0", |
|---|
| 68 | + .drv_name = "sof_pcm512x", |
|---|
| 69 | + .sof_fw_filename = "sof-apl.ri", |
|---|
| 70 | + .sof_tplg_filename = "sof-apl-pcm512x.tplg", |
|---|
| 39 | 71 | }, |
|---|
| 40 | 72 | { |
|---|
| 41 | 73 | .id = "1AEC8804", |
|---|
| 42 | | - .drv_name = "bxt-wm8804", |
|---|
| 43 | | - .sof_fw_filename = "intel/sof-apl.ri", |
|---|
| 44 | | - .sof_tplg_filename = "intel/sof-apl-wm8804.tplg", |
|---|
| 45 | | - .asoc_plat_name = "0000:00:0e.0", |
|---|
| 74 | + .drv_name = "sof-wm8804", |
|---|
| 75 | + .sof_fw_filename = "sof-apl.ri", |
|---|
| 76 | + .sof_tplg_filename = "sof-apl-wm8804.tplg", |
|---|
| 46 | 77 | }, |
|---|
| 47 | 78 | { |
|---|
| 48 | 79 | .id = "INT34C3", |
|---|
| 49 | 80 | .drv_name = "bxt_tdf8532", |
|---|
| 50 | | - .sof_fw_filename = "intel/sof-apl.ri", |
|---|
| 51 | | - .sof_tplg_filename = "intel/sof-apl-tdf8532.tplg", |
|---|
| 52 | | - .asoc_plat_name = "0000:00:0e.0", |
|---|
| 81 | + .machine_quirk = apl_quirk, |
|---|
| 82 | + .sof_fw_filename = "sof-apl.ri", |
|---|
| 83 | + .sof_tplg_filename = "sof-apl-tdf8532.tplg", |
|---|
| 53 | 84 | }, |
|---|
| 54 | 85 | {}, |
|---|
| 55 | 86 | }; |
|---|