0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <sound/soc-acpi.h>
0010 #include <sound/soc-acpi-intel-match.h>
0011 #include "../skylake/skl.h"
0012
0013 static struct skl_machine_pdata icl_pdata = {
0014 .use_tplg_pcm = true,
0015 };
0016
0017 struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[] = {
0018 {
0019 .id = "INT34C2",
0020 .drv_name = "icl_rt274",
0021 .fw_filename = "intel/dsp_fw_icl.bin",
0022 .pdata = &icl_pdata,
0023 .sof_tplg_filename = "sof-icl-rt274.tplg",
0024 },
0025 {
0026 .id = "10EC5682",
0027 .drv_name = "sof_rt5682",
0028 .sof_tplg_filename = "sof-icl-rt5682.tplg",
0029 },
0030 {},
0031 };
0032 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_icl_machines);
0033
0034 static const struct snd_soc_acpi_endpoint single_endpoint = {
0035 .num = 0,
0036 .aggregated = 0,
0037 .group_position = 0,
0038 .group_id = 0,
0039 };
0040
0041 static const struct snd_soc_acpi_endpoint spk_l_endpoint = {
0042 .num = 0,
0043 .aggregated = 1,
0044 .group_position = 0,
0045 .group_id = 1,
0046 };
0047
0048 static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
0049 .num = 0,
0050 .aggregated = 1,
0051 .group_position = 1,
0052 .group_id = 1,
0053 };
0054
0055 static const struct snd_soc_acpi_adr_device rt700_0_adr[] = {
0056 {
0057 .adr = 0x000010025D070000ull,
0058 .num_endpoints = 1,
0059 .endpoints = &single_endpoint,
0060 .name_prefix = "rt700"
0061 }
0062 };
0063
0064 static const struct snd_soc_acpi_link_adr icl_rvp[] = {
0065 {
0066 .mask = BIT(0),
0067 .num_adr = ARRAY_SIZE(rt700_0_adr),
0068 .adr_d = rt700_0_adr,
0069 },
0070 {}
0071 };
0072
0073 static const struct snd_soc_acpi_adr_device rt711_0_adr[] = {
0074 {
0075 .adr = 0x000020025D071100ull,
0076 .num_endpoints = 1,
0077 .endpoints = &single_endpoint,
0078 .name_prefix = "rt711"
0079 }
0080 };
0081
0082 static const struct snd_soc_acpi_adr_device rt1308_1_adr[] = {
0083 {
0084 .adr = 0x000120025D130800ull,
0085 .num_endpoints = 1,
0086 .endpoints = &single_endpoint,
0087 .name_prefix = "rt1308-1"
0088 }
0089 };
0090
0091 static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = {
0092 {
0093 .adr = 0x000120025D130800ull,
0094 .num_endpoints = 1,
0095 .endpoints = &spk_l_endpoint,
0096 .name_prefix = "rt1308-1"
0097 }
0098 };
0099
0100 static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = {
0101 {
0102 .adr = 0x000220025D130800ull,
0103 .num_endpoints = 1,
0104 .endpoints = &spk_r_endpoint,
0105 .name_prefix = "rt1308-2"
0106 }
0107 };
0108
0109 static const struct snd_soc_acpi_adr_device rt715_3_adr[] = {
0110 {
0111 .adr = 0x000320025D071500ull,
0112 .num_endpoints = 1,
0113 .endpoints = &single_endpoint,
0114 .name_prefix = "rt715"
0115 }
0116 };
0117
0118 static const struct snd_soc_acpi_link_adr icl_3_in_1_default[] = {
0119 {
0120 .mask = BIT(0),
0121 .num_adr = ARRAY_SIZE(rt711_0_adr),
0122 .adr_d = rt711_0_adr,
0123 },
0124 {
0125 .mask = BIT(1),
0126 .num_adr = ARRAY_SIZE(rt1308_1_group1_adr),
0127 .adr_d = rt1308_1_group1_adr,
0128 },
0129 {
0130 .mask = BIT(2),
0131 .num_adr = ARRAY_SIZE(rt1308_2_group1_adr),
0132 .adr_d = rt1308_2_group1_adr,
0133 },
0134 {
0135 .mask = BIT(3),
0136 .num_adr = ARRAY_SIZE(rt715_3_adr),
0137 .adr_d = rt715_3_adr,
0138 },
0139 {}
0140 };
0141
0142 static const struct snd_soc_acpi_link_adr icl_3_in_1_mono_amp[] = {
0143 {
0144 .mask = BIT(0),
0145 .num_adr = ARRAY_SIZE(rt711_0_adr),
0146 .adr_d = rt711_0_adr,
0147 },
0148 {
0149 .mask = BIT(1),
0150 .num_adr = ARRAY_SIZE(rt1308_1_adr),
0151 .adr_d = rt1308_1_adr,
0152 },
0153 {
0154 .mask = BIT(3),
0155 .num_adr = ARRAY_SIZE(rt715_3_adr),
0156 .adr_d = rt715_3_adr,
0157 },
0158 {}
0159 };
0160
0161 struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_sdw_machines[] = {
0162 {
0163 .link_mask = 0xF,
0164 .links = icl_3_in_1_default,
0165 .drv_name = "sof_sdw",
0166 .sof_tplg_filename = "sof-icl-rt711-rt1308-rt715.tplg",
0167 },
0168 {
0169 .link_mask = 0xB,
0170 .links = icl_3_in_1_mono_amp,
0171 .drv_name = "sof_sdw",
0172 .sof_tplg_filename = "sof-icl-rt711-rt1308-rt715-mono.tplg",
0173 },
0174 {
0175 .link_mask = 0x1,
0176 .links = icl_rvp,
0177 .drv_name = "sof_sdw",
0178 .sof_tplg_filename = "sof-icl-rt700.tplg",
0179 },
0180 {},
0181 };
0182 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_icl_sdw_machines);