1#  Copyright (c) 2022 Huawei Device Co., Ltd.
2#  Licensed under the Apache License, Version 2.0 (the "License");
3#  you may not use this file except in compliance with the License.
4#  You may obtain a copy of the License at
5#
6#      http://www.apache.org/licenses/LICENSE-2.0
7#
8#  Unless required by applicable law or agreed to in writing, software
9#  distributed under the License is distributed on an "AS IS" BASIS,
10#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11#  See the License for the specific language governing permissions and
12#  limitations under the License.
13
14domain: AUDIO
15
16DEVICE_CHANGE:
17  __BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: audio output device}
18  ISOUTPUT: {type: INT32, desc: is output device}
19  STREAMID: {type: INT32, desc: stream id}
20  STREAMTYPE: {type: INT32, desc: stream type}
21  DEVICETYPE: {type: INT32, desc: device type}
22  NETWORKID: {type: STRING, desc: network id}
23  ADDRESS: {type: STRING, desc: device address}
24  DEVICE_DETAILED_CATEGORY: {type: STRING, desc: device detailed category}
25
26VOLUME_CHANGE:
27  __BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: audio input device}
28  ISOUTPUT: {type: INT32, desc: output device}
29  STREAMID: {type: INT32, desc: stream id}
30  APP_UID: {type: INT32, desc: user id}
31  APP_PID: {type: INT32, desc: process id}
32  STREAMTYPE: {type: INT32, desc: stream type}
33  VOLUME: {type: FLOAT, desc: audio volume}
34  SYSVOLUME: {type: FLOAT, desc: sys volume}
35  VOLUMEFACTOR: {type: FLOAT, desc: stream volume factor}
36  POWERVOLUMEFACTOR: {type: FLOAT, desc: power volume factor}
37
38STREAM_CHANGE:
39  __BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: capturer state change}
40  ISOUTPUT: {type: INT32, desc: output device}
41  STREAMID: {type: INT32, desc: stream id}
42  UID: {type: INT32, desc: user id}
43  PID: {type: INT32, desc: process id}
44  TRANSACTIONID: {type: UINT64, desc: transaction id}
45  STREAMTYPE: {type: INT32, desc: stream type}
46  STATE: {type: INT32, desc: audio state}
47  DEVICETYPE: {type: INT32, desc: device type}
48  NETWORKID: {type: STRING, desc: network id}
49
50STREAM_STANDBY:
51  __BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: render stream standby state change}
52  STREAMID: {type: INT32, desc: stream id}
53  STANDBY: {type: INT32, desc: standby state}
54
55HEADSET_CHANGE:
56  __BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: headset connection state}
57  ISCONNECT: {type: INT32, desc: is plugged in}
58  HASMIC: {type: INT32, desc: mic available}
59  DEVICETYPE: {type: INT32, desc: device type}
60
61BACKGROUND_SILENT_PLAYBACK:
62  __BASE: {type: STATISTIC, level: MINOR, tag: PowerStats, desc: application play silently background}
63  APP_NAME: {type: STRING, desc: application name}
64  APP_VERSION_CODE: {type: UINT32, desc: application version code}
65  TIMES: {type: UINT32, desc: how many times when this event happens}
66
67BG_SILENT_PLAYBACK:
68  __BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: report the behavior of silent background playback concerned by power consumption detection }
69  APP_NAME: {type: STRING, desc: application name}
70  APP_VERSION_CODE: {type: UINT32, desc: application version code}
71
72LOAD_CONFIG_ERROR:
73  __BASE: {type: FAULT, level: CRITICAL, desc: load configuration failed on audio policy service startup}
74  CATEGORY: {type: UINT16, desc: category of audio policy configuration in uint16}
75
76LOAD_EFFECT_ENGINE_ERROR:
77  __BASE: {type: FAULT, level: CRITICAL, desc: load effect engine failed on audio service startup}
78  ENGINE_TYPE: {type: UINT16, desc: type of audio effect engine in uint16}
79
80AUDIO_SERVICE_STARTUP_ERROR:
81  __BASE: {type: FAULT, level: CRITICAL, desc: audio service start up failed}
82  SERVICE_ID: {type: UINT8, desc: audio service id}
83  ERROR_CODE: {type: INT32, desc: error code}
84
85AUDIO_STREAM_EXHAUSTED_STATS:
86  __BASE: {type: STATISTIC, level: MINOR, desc: audio stream for playback is exhausted}
87  DUBIOUS_APP: {type: STRING, desc: dubious application name which used most resources when this error happens}
88  TIMES: {type: UINT32, desc: how many times when this error happens}
89
90AUDIO_STREAM_CREATE_ERROR_STATS:
91  __BASE: {type: STATISTIC, level: MINOR, desc: audio stream create error}
92  APP_NAME: {type: STRING, desc: application name who created audio stream error}
93  IS_PLAYBACK: {type: BOOL, desc: created stream is used for playback or capture}
94  STREAM_TYPE: {type: UINT8, desc: stream type which can be either StreamUsage in playback or SourceType in capture}
95  ERROR_CODE: {type: INT32, desc: error code}
96  TIMES: {type: UINT32, desc: how many times when this error happen}
97
98STREAM_PROPERTY_STATS:
99  __BASE: {type: STATISTIC, level: MINOR, desc: audio stream property statistic}
100  IS_PLAYBACK: {type: BOOL, desc: created stream is used for playback or capture}
101  STREAM_TYPE: {type: UINT8, desc: stream type which can be either StreamUsage in playback or SourceType in capture}
102  APP_NAME: {type: STRING, desc: Application name which is using this stream}
103  ENCODING_TYPE: {type: UINT8, desc: encoding type of this stream}
104  CHANNEL_LAYOUT: {type: UINT64, desc: channel layout of this stream}
105  DURATION: {type: UINT32, desc: duration of this stream}
106
107STREAM_UTILIZATION_STATS:
108  __BASE: {type: STATISTIC, level: MINOR, desc: audio stream utilization statistic}
109  IS_PLAYBACK: {type: BOOL, desc: created stream is used for playback or capture}
110  STREAM_TYPE: {type: UINT8, desc: stream type which can be either StreamUsage in playback or SourceType in capture}
111  PIPE_TYPE: {type: UINT8, desc: pipe type e.g. normal/lowlatency/offload/multichannel e.t.c.}
112  APP_NAME: {type: STRING, desc: Application name which is using this stream}
113  SAMPLE_RATE: {type: UINT32, desc: sample rate of this stream}
114  EFFECT_CHAIN: {type: UINT8, desc: effect chain of this stream}
115  DURATION: {type: UINT32, desc: duration of this stream}
116
117AUDIO_DEVICE_UTILIZATION_STATS:
118  __BASE: {type: STATISTIC, level: MINOR, desc: audio device utilization statistic}
119  DEVICE_TYPE: {type: UINT8, desc: audio device type}
120  IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture}
121  STREAM_TYPE: {type: UINT8, desc: stream type which can be either StreamUsage in playback or SourceType in capture}
122  DURATION: {type: UINT32, desc: duration of using this devices}
123
124BT_UTILIZATION_STATS:
125  __BASE: {type: STATISTIC, level: MINOR, desc: blue tooth device utilization statistic}
126  BT_TYPE: {type: UINT8, desc: blue tooth type}
127  IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture}
128  STREAM_TYPE: {type: UINT8, desc: stream type which can be either StreamUsage in playback or SourceType in capture}
129  DURATION: {type: UINT32, desc: duration of using this devices}
130
131PERFORMANCE_UNDER_OVERRUN_STATS:
132  __BASE: {type: STATISTIC, level: MINOR, desc: underrun or overrun statistic}
133  APP_NAME: {type: STRING, desc: Application name whose audio stream has underrun or overrun}
134  STREAM_TYPE: {type: UINT8, desc: stream type which can be either StreamUsage in playback or SourceType in capture}
135  PIPE_TYPE: {type: UINT8, desc: pipe type e.g. normal/lowlatency/offload/multichannel e.t.c.}
136  IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture}
137  TIMES: {type: UINT32, desc: how many times when this event happend}
138
139PLAYBACK_VOLUME_STATS:
140  __BASE: {type: STATISTIC, level: MINOR, desc: playback volume statistic}
141  STREAM_TYPE: {type: UINT8, desc: StreamUsage of playback stream}
142  LEVEL: {type: INT32, desc: volume level}
143  DEVICE_TYPE: {type: UINT8, desc: audio device type}
144  DURATION: {type: UINT32, desc: duration of this volume level}
145
146MUTED_CAPTURE_STATS:
147  __BASE: {type: STATISTIC, level: MINOR, desc: muted audio capture statistic}
148  STREAM_TYPE: {type: UINT8, desc: SourceType of audio capture stream}
149  DEVICE_TYPE: {type: UINT8, desc: audio device type}
150  DURATION: {type: UINT32, desc: duration of muted capture}
151
152AUDIO_ROUTE_CHANGE:
153  __BASE: {type: BEHAVIOR, level: MINOR, desc: audio route change}
154  TIMESTAMP: {type: UINT64, desc: when does this change happens}
155  REASON: {type: UINT8, desc: route change reason}
156  DEVICE_TYPE_BEFORE_CHANGE: {type: UINT8, desc: audio device type before change}
157  DEVICE_TYPE_AFTER_CHANGE: {type: UINT8, desc: audio device type after change}
158
159AUDIO_PIPE_CHANGE:
160  __BASE: {type: BEHAVIOR, level: MINOR, desc: audio pipe change}
161  APP_NAME: {type: STRING, desc: application name}
162  STREAM_TYPE: {type: UINT8, desc: stream type which can be either StreamUsage in playback or SourceType in capture}
163  IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture}
164  PIPE_TYPE_BEFORE_CHANGE: {type: UINT8, desc: pipe type e.g. normal/lowlatency/offload/multichannel e.t.c.}
165  PIPE_TYPE_AFTER_CHANGE: {type: UINT8, desc: pipe type e.g. normal/lowlatency/offload/multichannel e.t.c.}
166  REASON: {type: UINT8, desc: audio pipe change reason}
167
168AUDIO_FOCUS_MIGRATE:
169  __BASE: {type: BEHAVIOR, level: MINOR, desc: audio force migrate between loacal device and remote device}
170  DEVICE_DESC: {type: STRING, desc: device desc}
171  APP_NAME: {type: STRING, desc: application whose focus is migrated}
172  MIGRATE_DIRECTION: {type: UINT8, desc: migrate direction}
173
174SET_FORCE_USE_AUDIO_DEVICE:
175  __BASE: {type: BEHAVIOR, level: MINOR, desc: Forcibly select an audio playback device}
176  APP_NAME: {type: STRING, desc: application name who has forcibly select an audio playback device}
177  DEVICE_TYPE: {type: UINT8, desc: audio device type which is set force used}
178  IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture}
179  STREAM_TYPE: {type: UINT8, desc: stream type which can be either StreamUsage in playback or SourceType in capture}
180
181AI_VOICE_NOISE_SUPPRESSION:
182  __BASE: {type: BEHAVIOR, level: MINOR, desc: AI voice noise suppression change}
183  CURRENT_VALUE: {type: INT32, desc: current value after operation triggered}