1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!--- Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.       -->
3<!---                                                                           -->
4<!--- Redistribution and use in source and binary forms, with or without        -->
5<!--- modification, are permitted provided that the following conditions are    -->
6<!--- met:                                                                      -->
7<!---     * Redistributions of source code must retain the above copyright      -->
8<!---       notice, this list of conditions and the following disclaimer.       -->
9<!---     * Redistributions in binary form must reproduce the above             -->
10<!---       copyright notice, this list of conditions and the following         -->
11<!---       disclaimer in the documentation and/or other materials provided     -->
12<!---       with the distribution.                                              -->
13<!---     * Neither the name of The Linux Foundation nor the names of its       -->
14<!---       contributors may be used to endorse or promote products derived     -->
15<!---       from this software without specific prior written permission.       -->
16<!---                                                                           -->
17<!--- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED              -->
18<!--- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF      -->
19<!--- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT    -->
20<!--- ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS    -->
21<!--- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR    -->
22<!--- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF      -->
23<!--- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR           -->
24<!--- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,     -->
25<!--- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE      -->
26<!--- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN    -->
27<!--- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                             -->
28<sound_trigger_platform_info>
29    <param version="0x0105" /> <!-- this must be the first param -->
30<!--- Version History:                                                          -->
31<!--- 0x0101: Legacy version.                                                   -->
32<!--- 0x0102: Includes acdb_ids param with the gcs_usecase tag. This matches    -->
33<!--- the gcs_usecase with the acdb device that uses it.                        -->
34<!--- 0x0103: app_type and in_channels added to <lsm usecase> and out_channels  -->
35<!--- added to <adm_config>                                                     -->
36<!--- 0x0104: instance id support for both WDSP<CPE> and ADSP lsm usecases      -->
37<!--- 0x0105: Select <lsm_usecase> based on capture device                      -->
38
39    <common_config>
40        <param max_ape_sessions="8" />
41        <param enable_failure_detection="false" />
42        <param support_device_switch="false" />
43        <param transit_to_non_lpi_on_battery_charging="false" />
44        <param concurrent_capture="true" />
45        <param transit_to_adsp_on_playback="true" />
46        <!-- Below backend params must match with port used in mixer path file -->
47        <!-- param used to configure backend sample rate, format and channels -->
48        <param backend_port_name="TERT_TDM_TX_0" />
49        <!-- Param used to match and obtain device backend index -->
50        <param backend_dai_name="TERT_TDM_TX_0" />
51    </common_config>
52    <acdb_ids>
53        <param DEVICE_HANDSET_MIC_APE="100" />
54        <param DEVICE_HANDSET_MIC_PP_APE="135" />
55        <param DEVICE_HANDSET_DMIC_APE="149" />
56        <param DEVICE_HANDSET_DMIC_LPI_APE="179" />
57        <param DEVICE_HANDSET_TMIC_APE="157" />
58        <param DEVICE_HANDSET_TMIC_LPI_APE="180" />
59        <param DEVICE_HANDSET_QMIC_APE="137" />
60        <param DEVICE_HANDSET_QMIC_LPI_APE="181" />
61        <param DEVICE_HEADSET_MIC_APE="141" />
62        <param DEVICE_HEADSET_MIC_APE_LPI="182" />
63    </acdb_ids>
64
65    <!-- Multiple sound_model_config tags can be listed, each with unique   -->
66    <!-- vendor_uuid. The below tag represents QTI SVA engine sound model   -->
67    <!-- configuration. ISV must use their own unique vendor_uuid.          -->
68
69    <!-- QTI SVA -->
70    <sound_model_config>
71        <param vendor_uuid="68ab2d40-e860-11e3-95ef-0002a5d5c51b" />
72        <param execution_type="ADSP" />
73        <param library="libsmwrapper.so" />
74        <param max_ape_phrases="20" />
75        <param max_ape_users="10" />
76        <!-- Profile specific data which the algorithm can support -->
77        <param sample_rate="16000" />
78        <param bit_width="16" />
79        <param out_channels="1"/> <!-- Module output channels -->
80
81        <arm_ss_usecase>
82            <!-- Options are "KEYWORD_DETECTION", "USER_VERIFICATION", "CUSTOM_DETECTION"  -->
83            <param sm_detection_type= "KEYWORD_DETECTION" />
84            <param sm_id="0x2" />
85            <param module_lib="libcapiv2svacnn.so"/>
86            <param sample_rate="16000"/>
87            <param bit_wdith="16"/>
88            <param channel_count="1"/>
89        </arm_ss_usecase>
90        <arm_ss_usecase>
91            <param sm_detection_type= "USER_VERIFICATION" />
92            <param sm_id="0x4" />
93            <param module_lib="libcapiv2vop.so"/>
94            <param sample_rate="16000"/>
95            <param bit_wdith="16"/>
96            <param channel_count="1"/>
97        </arm_ss_usecase>
98        <!-- Module and param ids with which the algorithm is integrated
99            in non-graphite firmware (note these must come after gcs params)
100            Extends flexibility to have different ids based on execution type.
101            valid execution_type values: "WDSP" "ADSP" -->
102        <lsm_usecase>
103            <param capture_device="HANDSET" />
104            <!-- adm_cfg_profile should match with the one defined under adm_config -->
105            <!-- Set it to NONE if LSM directly connects to AFE -->
106            <param adm_cfg_profile="FFECNS" />
107            <!-- fluence_type: "FLUENCE_MIC", "FLUENCE_DMIC", "FLUENCE_TMIC"   -->
108            <!-- "FLUENCE_QMIC". Param value is valid when adm_cfg_profile -->
109            <!-- is FFECNS -->
110            <param fluence_type="FLUENCE_TMIC" />
111            <param execution_mode="ADSP" />
112            <param app_type="2" /> <!-- app type used in ACDB -->
113            <param in_channels="5"/> <!-- Module input channels -->
114            <param in_channels_lpi="3"/>
115            <param load_sound_model_ids="0x00012C1C, 0x0, 0x00012C14" />
116            <param unload_sound_model_ids="0x00012C1C, 0x0, 0x00012C15" />
117            <param confidence_levels_ids="0x00012C1C, 0x0, 0x00012C07" />
118            <param operation_mode_ids="0x00012C1C, 0x0, 0x00012C02" />
119            <param polling_enable_ids="0x00012C1C, 0x0, 0x00012C1B" />
120            <param custom_config_ids="0x00012C1C, 0x0, 0x00012C20" />
121            <param det_event_type_ids="0x00012C1C, 0x0, 0x00012C2C" />
122        </lsm_usecase>
123        <lsm_usecase>
124            <param capture_device="HEADSET" />
125            <param adm_cfg_profile="FFECNS" />
126            <param fluence_type="FLUENCE_MIC" />
127            <param execution_mode="ADSP" />
128            <param app_type="2" /> <!-- app type used in ACDB -->
129            <param in_channels="1"/> <!-- Module input channels -->
130            <param load_sound_model_ids="0x00012C1C, 0x0, 0x00012C14" />
131            <param unload_sound_model_ids="0x00012C1C, 0x0, 0x00012C15" />
132            <param confidence_levels_ids="0x00012C1C, 0x0, 0x00012C07" />
133            <param operation_mode_ids="0x00012C1C, 0x0, 0x00012C02" />
134            <param polling_enable_ids="0x00012C1C, 0x0, 0x00012C1B" />
135            <param custom_config_ids="0x00012C1C, 0x0, 0x00012C20" />
136            <param det_event_type_ids="0x00012C1C, 0x0, 0x00012C2C" />
137        </lsm_usecase>
138
139        <!-- format: "ADPCM_packet" or "PCM_packet" !-->
140        <!-- transfer_mode: "FTRT" or "RT" -->
141        <!--  kw_duration is in milli seconds. It is valid only for FTRT
142            transfer mode -->
143        <param capture_keyword="PCM_packet, RT, 2000" />
144        <param client_capture_read_delay="2000" />
145    </sound_model_config>
146
147    <!-- QTI Music Detection !-->
148    <sound_model_config>
149        <param vendor_uuid="876c1b46-9d4d-40cc-a4fd-4d5ec7a80e47" />
150        <param execution_type="ADSP" />
151        <param library="libsmwrapper.so" />
152        <param max_ape_phrases="1" />
153        <param max_ape_users="1" />
154        <!-- Profile specific data which the algorithm can support -->
155        <param sample_rate="16000" />
156        <param bit_width="16" />
157        <param out_channels="1"/> <!-- Module output channels -->
158        <!-- Module and param ids with which the algorithm is integrated
159            in non-graphite firmware (note these must come after gcs params)
160            Extends flexibility to have different ids based on execution type.
161            valid execution_type values: only "ADSP" -->
162        <lsm_usecase>
163            <param capture_device="HANDSET" />
164            <!-- adm_cfg_profile should match with the one defined under adm_config -->
165            <!-- Set it to NONE if LSM directly connects to AFE -->
166            <param adm_cfg_profile="NONE" />
167            <!-- fluence_type: "FLUENCE_MIC", "FLUENCE_DMIC", "FLUENCE_TMIC"   -->
168            <!-- "FLUENCE_QMIC". Param value is valid when adm_cfg_profile -->
169            <!-- is FFECNS -->
170            <param fluence_type="NONE" />
171            <param execution_mode="ADSP" />
172            <param app_type="4" /> <!-- app type for MD used in ACDB -->
173            <param in_channels="1"/> <!-- Module input channels -->
174            <param load_sound_model_ids="0x00012C22, 0x0, 0x00012C14" />
175            <param unload_sound_model_ids="0x00012C22, 0x0, 0x00012C15" />
176            <param confidence_levels_ids="0x00012C22, 0x0, 0x00012C07" />
177            <param det_event_type_ids="0x00012C22, 0x0, 0x00012C2C" />
178            <param custom_config_ids="0x00012C22, 0x0, 0x00012C30" />
179        </lsm_usecase>
180        <lsm_usecase>
181            <param capture_device="HEADSET" />
182            <param adm_cfg_profile="NONE" />
183            <param fluence_type="NONE" />
184            <param execution_mode="ADSP" />
185            <param app_type="4" /> <!-- app type for MD used in ACDB -->
186            <param in_channels="1"/> <!-- Module input channels -->
187            <param load_sound_model_ids="0x00012C22, 0x0, 0x00012C14" />
188            <param unload_sound_model_ids="0x00012C22, 0x0, 0x00012C15" />
189            <param confidence_levels_ids="0x00012C22, 0x0, 0x00012C07" />
190            <param det_event_type_ids="0x00012C22, 0x0, 0x00012C2C" />
191            <param custom_config_ids="0x00012C22, 0x0, 0x00012C30" />
192        </lsm_usecase>
193
194        <!-- format: "ADPCM_packet" or "PCM_packet" !-->
195        <!-- transfer_mode: "FTRT" or "RT" -->
196        <!--  kw_duration is in milli seconds. It is valid only for FTRT
197            transfer mode -->
198        <param capture_keyword="PCM_packet, FTRT, 1500" />
199        <param client_capture_read_delay="2000" />
200    </sound_model_config>
201
202    <!-- Google Hotword -->
203    <sound_model_config>
204        <param vendor_uuid="7038ddc8-30f2-11e6-b0ac-40a8f03d3f15" />
205        <param execution_type="ADSP" />
206        <param library="none" />
207        <param max_ape_phrases="1" />
208        <param max_ape_users="1" />
209        <!-- Profile specific data which the algorithm can support -->
210        <param sample_rate="16000" />
211        <param bit_width="16" />
212        <param out_channels="1"/> <!-- Module output channels -->
213        <lsm_usecase>
214            <param capture_device="HANDSET" />
215            <!-- adm_cfg_profile should match with the one defined under adm_config -->
216            <!-- Set it to NONE if LSM directly connects to AFE -->
217            <param adm_cfg_profile="FLUENCE" />
218            <!-- fluence_type: "FLUENCE_MIC", "FLUENCE_DMIC", "FLUENCE_TMIC"   -->
219            <!-- "FLUENCE_QMIC". Param value is valid when adm_cfg_profile -->
220            <!-- is FFECNS -->
221            <param fluence_type="FLUENCE_DMIC" />
222            <param execution_mode="ADSP" />
223            <param app_type="3" /> <!-- app type used in ACDB -->
224            <param in_channels="2"/> <!-- Module input channels -->
225            <param load_sound_model_ids="0x18000001, 0x0, 0x00012C14" />
226            <param unload_sound_model_ids="0x18000001, 0x0, 0x00012C15" />
227            <param confidence_levels_ids="0x18000001, 0x0, 0x00012C07" />
228            <param operation_mode_ids="0x18000001, 0x0, 0x00012C02" />
229            <param polling_enable_ids="0x18000001, 0x0, 0x00012C1B" />
230            <param custom_config_ids="0x18000001, 0x0, 0x00012C20" />
231        </lsm_usecase>
232        <lsm_usecase>
233            <param capture_device="HEADSET" />
234            <param adm_cfg_profile="NONE" />
235            <param fluence_type="NONE" />
236            <param execution_mode="ADSP" />
237            <param app_type="3" /> <!-- app type used in ACDB -->
238            <param in_channels="1"/> <!-- Module input channels -->
239            <param load_sound_model_ids="0x18000001, 0x0, 0x00012C14" />
240            <param unload_sound_model_ids="0x18000001, 0x0, 0x00012C15" />
241            <param confidence_levels_ids="0x18000001, 0x0, 0x00012C07" />
242            <param operation_mode_ids="0x18000001, 0x0, 0x00012C02" />
243            <param polling_enable_ids="0x18000001, 0x0, 0x00012C1B" />
244            <param custom_config_ids="0x18000001, 0x0, 0x00012C20" />
245        </lsm_usecase>
246
247        <!-- format: "ADPCM_packet" or "PCM_packet" !-->
248        <!-- transfer_mode: "FTRT" or "RT" -->
249        <!--  kw_duration is in milli seconds. It is valid only for FTRT
250            transfer mode -->
251        <param capture_keyword="PCM_raw, FTRT, 2000" />
252        <param client_capture_read_delay="2000" />
253    </sound_model_config>
254
255    <!-- Google Music Detection -->
256    <sound_model_config>
257        <param vendor_uuid="9f6ad62a-1f0b-11e7-87c5-40a8f03d3f15" />
258        <param execution_type="ADSP" />
259        <param library="none" />
260        <param max_ape_phrases="1" />
261        <param max_ape_users="1" />
262        <!-- Profile specific data which the algorithm can support -->
263        <param sample_rate="16000" />
264        <param bit_width="16" />
265        <param out_channels="1"/> <!-- Module output channels -->
266        <lsm_usecase>
267            <param capture_device="HANDSET" />
268            <!-- adm_cfg_profile should match with the one defined under adm_config -->
269            <!-- Set it to NONE if LSM directly connects to AFE -->
270            <param adm_cfg_profile="FLUENCE" />
271            <!-- fluence_type: "FLUENCE_MIC", "FLUENCE_DMIC", "FLUENCE_TMIC"   -->
272            <!-- "FLUENCE_QMIC". Param value is valid when adm_cfg_profile -->
273            <!-- is FFECNS -->
274            <param fluence_type="FLUENCE_DMIC" />
275            <param execution_mode="ADSP" />
276            <param app_type="4" /> <!-- app type used in ACDB -->
277            <param in_channels="2"/> <!-- Module input channels -->
278            <param load_sound_model_ids="0x18100000, 0x0, 0x00012C14" />
279            <param unload_sound_model_ids="0x18100000, 0x0, 0x00012C15" />
280            <param confidence_levels_ids="0x18100000, 0x0, 0x00012C07" />
281            <param operation_mode_ids="0x18100000, 0x0, 0x00012C02" />
282            <param polling_enable_ids="0x18100000, 0x0, 0x00012C1B" />
283            <param custom_config_ids="0x18100000, 0x0, 0x00012C20" />
284        </lsm_usecase>
285        <lsm_usecase>
286            <param capture_device="HEADSET" />
287            <param adm_cfg_profile="NONE" />
288            <param fluence_type="NONE" />
289            <param execution_mode="ADSP" />
290            <param app_type="3" /> <!-- app type used in ACDB -->
291            <param in_channels="2"/> <!-- Module input channels -->
292            <param load_sound_model_ids="0x18100000, 0x0, 0x00012C14" />
293            <param unload_sound_model_ids="0x18100000, 0x0, 0x00012C15" />
294            <param confidence_levels_ids="0x18100000, 0x0, 0x00012C07" />
295            <param operation_mode_ids="0x18100000, 0x0, 0x00012C02" />
296            <param polling_enable_ids="0x18100000, 0x0, 0x00012C1B" />
297            <param custom_config_ids="0x18100000, 0x0, 0x00012C20" />
298        </lsm_usecase>
299
300        <!-- format: "ADPCM_packet" or "PCM_packet" !-->
301        <!-- transfer_mode: "FTRT" or "RT" -->
302        <!--  kw_duration is in milli seconds. It is valid only for FTRT
303            transfer mode -->
304        <param capture_keyword="PCM_raw, FTRT, 5000" />
305        <param client_capture_read_delay="2000" />
306    </sound_model_config>
307
308    <!-- Multiple adm_config tags can be listed, each with unique profile name. -->
309    <!-- app_type to match corresponding value from ACDB -->
310    <adm_config>
311        <param adm_cfg_profile="FFECNS" />
312        <param app_type="69947" />
313        <param sample_rate="16000" />
314        <param bit_width="16" />
315        <param out_channels="5"/>
316    </adm_config>
317
318    <adm_config>
319        <param adm_cfg_profile="FLUENCE" />
320        <param app_type="69944" />
321        <param sample_rate="16000" />
322        <param bit_width="16" />
323    </adm_config>
324</sound_trigger_platform_info>
325