~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/soc/intel/common/soc-acpi-intel-sdw-mockup-match.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

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

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php