1 // SPDX-License-Identifier: GPL-2.0-only 1 // SPDX-License-Identifier: GPL-2.0-only 2 // 2 // 3 // soc-acpi-intel-sdw-mockup-match.c - tables 3 // soc-acpi-intel-sdw-mockup-match.c - tables and support for SoundWire 4 // mockup device ACPI enumeration. 4 // mockup device ACPI enumeration. 5 // 5 // 6 // Copyright (c) 2021, Intel Corporation. 6 // Copyright (c) 2021, Intel Corporation. 7 // 7 // 8 8 9 #include <sound/soc-acpi.h> 9 #include <sound/soc-acpi.h> 10 #include <sound/soc-acpi-intel-match.h> 10 #include <sound/soc-acpi-intel-match.h> 11 #include "soc-acpi-intel-sdw-mockup-match.h" 11 #include "soc-acpi-intel-sdw-mockup-match.h" 12 12 13 static const struct snd_soc_acpi_endpoint sdw_ 13 static const struct snd_soc_acpi_endpoint sdw_mockup_single_endpoint = { 14 .num = 0, 14 .num = 0, 15 .aggregated = 0, 15 .aggregated = 0, 16 .group_position = 0, 16 .group_position = 0, 17 .group_id = 0, 17 .group_id = 0, 18 }; 18 }; 19 19 20 static const struct snd_soc_acpi_endpoint sdw_ 20 static const struct snd_soc_acpi_endpoint sdw_mockup_l_endpoint = { 21 .num = 0, 21 .num = 0, 22 .aggregated = 1, 22 .aggregated = 1, 23 .group_position = 0, 23 .group_position = 0, 24 .group_id = 1, 24 .group_id = 1, 25 }; 25 }; 26 26 27 static const struct snd_soc_acpi_endpoint sdw_ 27 static const struct snd_soc_acpi_endpoint sdw_mockup_r_endpoint = { 28 .num = 0, 28 .num = 0, 29 .aggregated = 1, 29 .aggregated = 1, 30 .group_position = 1, 30 .group_position = 1, 31 .group_id = 1, 31 .group_id = 1, 32 }; 32 }; 33 33 34 static const struct snd_soc_acpi_adr_device sd 34 static const struct snd_soc_acpi_adr_device sdw_mockup_headset_0_adr[] = { 35 { 35 { 36 .adr = 0x0000000105AA5500ull, 36 .adr = 0x0000000105AA5500ull, 37 .num_endpoints = 1, 37 .num_endpoints = 1, 38 .endpoints = &sdw_mockup_singl 38 .endpoints = &sdw_mockup_single_endpoint, 39 .name_prefix = "sdw_mockup_hea 39 .name_prefix = "sdw_mockup_headset0" 40 } 40 } 41 }; 41 }; 42 42 43 static const struct snd_soc_acpi_adr_device sd 43 static const struct snd_soc_acpi_adr_device sdw_mockup_headset_1_adr[] = { 44 { 44 { 45 .adr = 0x0001000105AA5500ull, 45 .adr = 0x0001000105AA5500ull, 46 .num_endpoints = 1, 46 .num_endpoints = 1, 47 .endpoints = &sdw_mockup_singl 47 .endpoints = &sdw_mockup_single_endpoint, 48 .name_prefix = "sdw_mockup_hea 48 .name_prefix = "sdw_mockup_headset1" 49 } 49 } 50 }; 50 }; 51 51 52 static const struct snd_soc_acpi_adr_device sd 52 static const struct snd_soc_acpi_adr_device sdw_mockup_amp_1_adr[] = { 53 { 53 { 54 .adr = 0x000100010555AA00ull, 54 .adr = 0x000100010555AA00ull, 55 .num_endpoints = 1, 55 .num_endpoints = 1, 56 .endpoints = &sdw_mockup_singl 56 .endpoints = &sdw_mockup_single_endpoint, 57 .name_prefix = "sdw_mockup_amp 57 .name_prefix = "sdw_mockup_amp1" 58 } 58 } 59 }; 59 }; 60 60 61 static const struct snd_soc_acpi_adr_device sd 61 static const struct snd_soc_acpi_adr_device sdw_mockup_amp_2_adr[] = { 62 { 62 { 63 .adr = 0x000200010555AA00ull, 63 .adr = 0x000200010555AA00ull, 64 .num_endpoints = 1, 64 .num_endpoints = 1, 65 .endpoints = &sdw_mockup_singl 65 .endpoints = &sdw_mockup_single_endpoint, 66 .name_prefix = "sdw_mockup_amp 66 .name_prefix = "sdw_mockup_amp2" 67 } 67 } 68 }; 68 }; 69 69 70 static const struct snd_soc_acpi_adr_device sd 70 static const struct snd_soc_acpi_adr_device sdw_mockup_mic_0_adr[] = { 71 { 71 { 72 .adr = 0x0000000105555500ull, 72 .adr = 0x0000000105555500ull, 73 .num_endpoints = 1, 73 .num_endpoints = 1, 74 .endpoints = &sdw_mockup_singl 74 .endpoints = &sdw_mockup_single_endpoint, 75 .name_prefix = "sdw_mockup_mic 75 .name_prefix = "sdw_mockup_mic0" 76 } 76 } 77 }; 77 }; 78 78 79 static const struct snd_soc_acpi_adr_device sd 79 static const struct snd_soc_acpi_adr_device sdw_mockup_mic_3_adr[] = { 80 { 80 { 81 .adr = 0x0003000105555500ull, 81 .adr = 0x0003000105555500ull, 82 .num_endpoints = 1, 82 .num_endpoints = 1, 83 .endpoints = &sdw_mockup_singl 83 .endpoints = &sdw_mockup_single_endpoint, 84 .name_prefix = "sdw_mockup_mic 84 .name_prefix = "sdw_mockup_mic3" 85 } 85 } 86 }; 86 }; 87 87 88 static const struct snd_soc_acpi_adr_device sd 88 static const struct snd_soc_acpi_adr_device sdw_mockup_amp_1_group1_adr[] = { 89 { 89 { 90 .adr = 0x000100010555AA00ull, 90 .adr = 0x000100010555AA00ull, 91 .num_endpoints = 1, 91 .num_endpoints = 1, 92 .endpoints = &sdw_mockup_l_end 92 .endpoints = &sdw_mockup_l_endpoint, 93 .name_prefix = "sdw_mockup_amp 93 .name_prefix = "sdw_mockup_amp1_l" 94 } 94 } 95 }; 95 }; 96 96 97 static const struct snd_soc_acpi_adr_device sd 97 static const struct snd_soc_acpi_adr_device sdw_mockup_amp_2_group1_adr[] = { 98 { 98 { 99 .adr = 0x000200010555AA00ull, 99 .adr = 0x000200010555AA00ull, 100 .num_endpoints = 1, 100 .num_endpoints = 1, 101 .endpoints = &sdw_mockup_r_end 101 .endpoints = &sdw_mockup_r_endpoint, 102 .name_prefix = "sdw_mockup_amp 102 .name_prefix = "sdw_mockup_amp2_r" 103 } 103 } 104 }; 104 }; 105 105 106 const struct snd_soc_acpi_link_adr sdw_mockup_ 106 const struct snd_soc_acpi_link_adr sdw_mockup_headset_1amp_mic[] = { 107 { 107 { 108 .mask = BIT(0), 108 .mask = BIT(0), 109 .num_adr = ARRAY_SIZE(sdw_mock 109 .num_adr = ARRAY_SIZE(sdw_mockup_headset_0_adr), 110 .adr_d = sdw_mockup_headset_0_ 110 .adr_d = sdw_mockup_headset_0_adr, 111 }, 111 }, 112 { 112 { 113 .mask = BIT(1), 113 .mask = BIT(1), 114 .num_adr = ARRAY_SIZE(sdw_mock 114 .num_adr = ARRAY_SIZE(sdw_mockup_amp_1_adr), 115 .adr_d = sdw_mockup_amp_1_adr, 115 .adr_d = sdw_mockup_amp_1_adr, 116 }, 116 }, 117 { 117 { 118 .mask = BIT(3), 118 .mask = BIT(3), 119 .num_adr = ARRAY_SIZE(sdw_mock 119 .num_adr = ARRAY_SIZE(sdw_mockup_mic_3_adr), 120 .adr_d = sdw_mockup_mic_3_adr, 120 .adr_d = sdw_mockup_mic_3_adr, 121 }, 121 }, 122 {} 122 {} 123 }; 123 }; 124 124 125 const struct snd_soc_acpi_link_adr sdw_mockup_ 125 const struct snd_soc_acpi_link_adr sdw_mockup_headset_2amps_mic[] = { 126 { 126 { 127 .mask = BIT(0), 127 .mask = BIT(0), 128 .num_adr = ARRAY_SIZE(sdw_mock 128 .num_adr = ARRAY_SIZE(sdw_mockup_headset_0_adr), 129 .adr_d = sdw_mockup_headset_0_ 129 .adr_d = sdw_mockup_headset_0_adr, 130 }, 130 }, 131 { 131 { 132 .mask = BIT(1), 132 .mask = BIT(1), 133 .num_adr = ARRAY_SIZE(sdw_mock 133 .num_adr = ARRAY_SIZE(sdw_mockup_amp_1_group1_adr), 134 .adr_d = sdw_mockup_amp_1_grou 134 .adr_d = sdw_mockup_amp_1_group1_adr, 135 }, 135 }, 136 { 136 { 137 .mask = BIT(2), 137 .mask = BIT(2), 138 .num_adr = ARRAY_SIZE(sdw_mock 138 .num_adr = ARRAY_SIZE(sdw_mockup_amp_2_group1_adr), 139 .adr_d = sdw_mockup_amp_2_grou 139 .adr_d = sdw_mockup_amp_2_group1_adr, 140 }, 140 }, 141 { 141 { 142 .mask = BIT(3), 142 .mask = BIT(3), 143 .num_adr = ARRAY_SIZE(sdw_mock 143 .num_adr = ARRAY_SIZE(sdw_mockup_mic_3_adr), 144 .adr_d = sdw_mockup_mic_3_adr, 144 .adr_d = sdw_mockup_mic_3_adr, 145 }, 145 }, 146 {} 146 {} 147 }; 147 }; 148 148 149 const struct snd_soc_acpi_link_adr sdw_mockup_ 149 const struct snd_soc_acpi_link_adr sdw_mockup_mic_headset_1amp[] = { 150 { 150 { 151 .mask = BIT(1), 151 .mask = BIT(1), 152 .num_adr = ARRAY_SIZE(sdw_mock 152 .num_adr = ARRAY_SIZE(sdw_mockup_headset_1_adr), 153 .adr_d = sdw_mockup_headset_1_ 153 .adr_d = sdw_mockup_headset_1_adr, 154 }, 154 }, 155 { 155 { 156 .mask = BIT(2), 156 .mask = BIT(2), 157 .num_adr = ARRAY_SIZE(sdw_mock 157 .num_adr = ARRAY_SIZE(sdw_mockup_amp_2_adr), 158 .adr_d = sdw_mockup_amp_2_adr, 158 .adr_d = sdw_mockup_amp_2_adr, 159 }, 159 }, 160 { 160 { 161 .mask = BIT(0), 161 .mask = BIT(0), 162 .num_adr = ARRAY_SIZE(sdw_mock 162 .num_adr = ARRAY_SIZE(sdw_mockup_mic_0_adr), 163 .adr_d = sdw_mockup_mic_0_adr, 163 .adr_d = sdw_mockup_mic_0_adr, 164 }, 164 }, 165 {} 165 {} 166 }; 166 }; 167 167
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.