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

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

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ 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.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-only
  2 /*
  3  * soc-acpi-intel-ptl-match.c - tables and support for PTL ACPI enumeration.
  4  *
  5  * Copyright (c) 2024, Intel Corporation.
  6  *
  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 struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_machines[] = {
 14         {},
 15 };
 16 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_ptl_machines);
 17 
 18 static const struct snd_soc_acpi_endpoint single_endpoint = {
 19         .num = 0,
 20         .aggregated = 0,
 21         .group_position = 0,
 22         .group_id = 0,
 23 };
 24 
 25 /*
 26  * RT722 is a multi-function codec, three endpoints are created for
 27  * its headset, amp and dmic functions.
 28  */
 29 static const struct snd_soc_acpi_endpoint rt722_endpoints[] = {
 30         {
 31                 .num = 0,
 32                 .aggregated = 0,
 33                 .group_position = 0,
 34                 .group_id = 0,
 35         },
 36         {
 37                 .num = 1,
 38                 .aggregated = 0,
 39                 .group_position = 0,
 40                 .group_id = 0,
 41         },
 42         {
 43                 .num = 2,
 44                 .aggregated = 0,
 45                 .group_position = 0,
 46                 .group_id = 0,
 47         },
 48 };
 49 
 50 static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = {
 51         {
 52                 .adr = 0x000030025D071101ull,
 53                 .num_endpoints = 1,
 54                 .endpoints = &single_endpoint,
 55                 .name_prefix = "rt711"
 56         }
 57 };
 58 
 59 static const struct snd_soc_acpi_adr_device rt722_0_single_adr[] = {
 60         {
 61                 .adr = 0x000030025d072201ull,
 62                 .num_endpoints = ARRAY_SIZE(rt722_endpoints),
 63                 .endpoints = rt722_endpoints,
 64                 .name_prefix = "rt722"
 65         }
 66 };
 67 
 68 static const struct snd_soc_acpi_adr_device rt722_3_single_adr[] = {
 69         {
 70                 .adr = 0x000330025d072201ull,
 71                 .num_endpoints = ARRAY_SIZE(rt722_endpoints),
 72                 .endpoints = rt722_endpoints,
 73                 .name_prefix = "rt722"
 74         }
 75 };
 76 
 77 static const struct snd_soc_acpi_link_adr ptl_rt722_only[] = {
 78         {
 79                 .mask = BIT(0),
 80                 .num_adr = ARRAY_SIZE(rt722_0_single_adr),
 81                 .adr_d = rt722_0_single_adr,
 82         },
 83         {}
 84 };
 85 
 86 static const struct snd_soc_acpi_link_adr ptl_rt722_l3[] = {
 87         {
 88                 .mask = BIT(3),
 89                 .num_adr = ARRAY_SIZE(rt722_3_single_adr),
 90                 .adr_d = rt722_3_single_adr,
 91         },
 92         {}
 93 };
 94 
 95 static const struct snd_soc_acpi_link_adr ptl_rvp[] = {
 96         {
 97                 .mask = BIT(0),
 98                 .num_adr = ARRAY_SIZE(rt711_sdca_0_adr),
 99                 .adr_d = rt711_sdca_0_adr,
100         },
101         {}
102 };
103 
104 /* this table is used when there is no I2S codec present */
105 struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[] = {
106         /* mockup tests need to be first */
107         {
108                 .link_mask = GENMASK(3, 0),
109                 .links = sdw_mockup_headset_2amps_mic,
110                 .drv_name = "sof_sdw",
111                 .sof_tplg_filename = "sof-ptl-rt711-rt1308-rt715.tplg",
112         },
113         {
114                 .link_mask = BIT(0) | BIT(1) | BIT(3),
115                 .links = sdw_mockup_headset_1amp_mic,
116                 .drv_name = "sof_sdw",
117                 .sof_tplg_filename = "sof-ptl-rt711-rt1308-mono-rt715.tplg",
118         },
119         {
120                 .link_mask = GENMASK(2, 0),
121                 .links = sdw_mockup_mic_headset_1amp,
122                 .drv_name = "sof_sdw",
123                 .sof_tplg_filename = "sof-ptl-rt715-rt711-rt1308-mono.tplg",
124         },
125         {
126                 .link_mask = BIT(0),
127                 .links = ptl_rvp,
128                 .drv_name = "sof_sdw",
129                 .sof_tplg_filename = "sof-ptl-rt711.tplg",
130         },
131         {
132                 .link_mask = BIT(0),
133                 .links = ptl_rt722_only,
134                 .drv_name = "sof_sdw",
135                 .sof_tplg_filename = "sof-ptl-rt722.tplg",
136         },
137         {
138                 .link_mask = BIT(3),
139                 .links = ptl_rt722_l3,
140                 .drv_name = "sof_sdw",
141                 .sof_tplg_filename = "sof-ptl-rt722.tplg",
142         },
143         {},
144 };
145 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_ptl_sdw_machines);
146 

~ [ 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