1 | // SPDX-License-Identifier: GPL-2.0-only |
2 | /* |
3 | * soc-acpi-intel-cnl-match.c - tables and support for CNL ACPI enumeration. |
4 | * |
5 | * Copyright (c) 2018, Intel Corporation. |
6 | * |
7 | */ |
8 | |
9 | #include <sound/soc-acpi.h> |
10 | #include <sound/soc-acpi-intel-match.h> |
11 | #include "../skylake/skl.h" |
12 | #include "soc-acpi-intel-sdw-mockup-match.h" |
13 | |
14 | static const struct snd_soc_acpi_codecs essx_83x6 = { |
15 | .num_codecs = 3, |
16 | .codecs = { "ESSX8316" , "ESSX8326" , "ESSX8336" }, |
17 | }; |
18 | |
19 | static struct skl_machine_pdata cnl_pdata = { |
20 | .use_tplg_pcm = true, |
21 | }; |
22 | |
23 | struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_machines[] = { |
24 | { |
25 | .id = "INT34C2" , |
26 | .drv_name = "cnl_rt274" , |
27 | .fw_filename = "intel/dsp_fw_cnl.bin" , |
28 | .pdata = &cnl_pdata, |
29 | .sof_tplg_filename = "sof-cnl-rt274.tplg" , |
30 | }, |
31 | { |
32 | .comp_ids = &essx_83x6, |
33 | .drv_name = "sof-essx8336" , |
34 | /* cnl and cml are identical */ |
35 | .sof_tplg_filename = "sof-cml-es8336" , /* the tplg suffix is added at run time */ |
36 | .tplg_quirk_mask = SND_SOC_ACPI_TPLG_INTEL_SSP_NUMBER | |
37 | SND_SOC_ACPI_TPLG_INTEL_SSP_MSB | |
38 | SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER, |
39 | }, |
40 | {}, |
41 | }; |
42 | EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cnl_machines); |
43 | |
44 | static const struct snd_soc_acpi_endpoint single_endpoint = { |
45 | .num = 0, |
46 | .aggregated = 0, |
47 | .group_position = 0, |
48 | .group_id = 0, |
49 | }; |
50 | |
51 | static const struct snd_soc_acpi_adr_device rt5682_2_adr[] = { |
52 | { |
53 | .adr = 0x000220025D568200ull, |
54 | .num_endpoints = 1, |
55 | .endpoints = &single_endpoint, |
56 | .name_prefix = "rt5682" |
57 | } |
58 | }; |
59 | |
60 | static const struct snd_soc_acpi_link_adr up_extreme_rt5682_2[] = { |
61 | { |
62 | .mask = BIT(2), |
63 | .num_adr = ARRAY_SIZE(rt5682_2_adr), |
64 | .adr_d = rt5682_2_adr, |
65 | }, |
66 | {} |
67 | }; |
68 | |
69 | struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_sdw_machines[] = { |
70 | { |
71 | .link_mask = BIT(2), |
72 | .links = up_extreme_rt5682_2, |
73 | .drv_name = "sof_sdw" , |
74 | .sof_tplg_filename = "sof-cnl-rt5682-sdw2.tplg" |
75 | }, |
76 | { |
77 | .link_mask = GENMASK(3, 0), |
78 | .links = sdw_mockup_headset_2amps_mic, |
79 | .drv_name = "sof_sdw" , |
80 | .sof_tplg_filename = "sof-cml-rt711-rt1308-rt715.tplg" , |
81 | }, |
82 | { |
83 | .link_mask = BIT(0) | BIT(1) | BIT(3), |
84 | .links = sdw_mockup_headset_1amp_mic, |
85 | .drv_name = "sof_sdw" , |
86 | .sof_tplg_filename = "sof-cml-rt711-rt1308-mono-rt715.tplg" , |
87 | }, |
88 | {} |
89 | }; |
90 | EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cnl_sdw_machines); |
91 | |