From ca800ec52ec8f7c93729534792fb7ee5707091ff Mon Sep 17 00:00:00 2001 From: huchang Date: Mon, 8 Apr 2024 21:15:09 +0800 Subject: [PATCH 1/3] add event in yaml Signed-off-by: huchang Change-Id: I16c51d882b1f279b5dd49c349c4f7141a401eb2f --- hisysevent.yaml | 109 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/hisysevent.yaml b/hisysevent.yaml index 324b83dc3..e769d7695 100644 --- a/hisysevent.yaml +++ b/hisysevent.yaml @@ -19,6 +19,8 @@ DEVICE_CHANGE: STREAMID: {type: INT32, desc: stream id} STREAMTYPE: {type: INT32, desc: stream type} DEVICETYPE: {type: INT32, desc: device type} + ADDRESS: {type: STRING, desc: device address} + DEVICE_NAME: {type: STRING, desc: device name} VOLUME_CHANGE: __BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: audio input device} @@ -53,3 +55,110 @@ BACKGROUND_SILENT_PLAYBACK: __BASE: {type: STATISTIC, level: MINOR, tag: PowerStats, desc: application play silently background} APP_NAME: {type: STRING, desc: application name} APP_VERSION_CODE: {type: UINT32, desc: application version code} + TIMES: {type: UINT32, desc: how many times when this event happens} + +LOAD_CONFIG_ERROR: + __BASE: {type: FAULT, level: CRITICAL, desc: load configuration failed on audio policy service startup} + CATEGORY: {type: UINT16, desc: category of audio policy configuration in uint16} + ERROR_CODE: {type: INT32, desc: error code} + +AUDIO_SERVICE_STARTUP_ERROR: + __BASE: {type: FAULT, level: CRITICAL, desc: audio service start up failed} + SERVICE_ID: {type: UINT8, desc: audio service id} + ERROR_CODE: {type: INT32, desc: error code} + +AUDIO_STREAM_EXHAUSTED_ERROR_STATISTIC: + __BASE: {type: STATISTIC, level: MINOR, desc: audio stream for playback is exhausted} + DUBIOUS_APP: {type: STRING, desc: dubious application name which used most resources when this error happens} + TIMES: {type: UINT32, desc: how many times when this error happens} + +AUDIO_STREAM_CREATE_ERROR_STATISTIC: + __BASE: {type: STATISTIC, level: MINOR, desc: audio stream create error} + APP_NAME: {type: STRING, desc: application name who created audio stream error} + IS_PLAYBACK: {type: BOOL, desc: created stream is used for playback or capture} + STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} + ERROR_CODE: {type: INT32, desc: error code} + TIMES: {type: UINT32, desc: how many times when this error happen} + +AUDIO_STREAM_UTILIZATION_STATISTIC: + __BASE: {type: STATISTIC, level: MINOR, desc: audio stream utilization statistic} + IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture} + STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} + PIPE_TYPE: {type: UINT8, desc: pipe type, e.g. normal, lowlatency, offload, multichannel, e.t.c.} + APP_NAME: {type: STRING, desc: Application name which is using this stream} + DURATION: {type: UINT32, desc: duration of this stream} + +AUDIO_DEVICE_UTILIZATION_STATISTIC: + __BASE: {type: STATISTIC, level: MINOR, desc: audio device utilization statistic} + DEVICE_TYPE: {type: UINT16, desc: audio device type} + STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} + DURATION: {type: UINT32, desc: duration of using this devices} + +BT_UTILIZATION_STATISTIC: + __BASE: {type: STATISTIC, level: MINOR, desc: blue tooth device utilization statistic} + BT_TYPE: {type: UINT16, desc: blue tooth type} + STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} + DURATION: {type: UINT32, desc: duration of using this devices} + +PERFORMANCE_UNDER_OVERRUN_STATISTIC: + __BASE: {type: STATISTIC, level: MINOR, desc: underrun or overrun statistic} + APP_NAME: {type: STRING, desc: Application name whose audio stream has underrun or overrun} + STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} + PIPE_TYPE: {type: UINT8, desc: pipe type, e.g. normal, lowlatency, offload, multichannel, e.t.c.} + IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture} + TIMES: {type: UINT32, desc: how many times when this event happend} + +PLAYBACK_VOLUME_STATISTIC: + __BASE: {type: STATISTIC, level: MINOR, desc: playback volume statistic} + STREAM_TYPE: {type: UINT8, desc: StreamUsage of playback stream} + LEVEL: {type: INT32, desc: volume level} + DEVICE_TYPE: {type: UINT16, desc: audio device type} + DURATION: {type: UINT32, desc: duration of this volume level} + +MUTED_CAPTURE_STATISTIC: + __BASE: {type: STATISTIC, level: MINOR, desc: muted audio capture statistic} + STREAM_TYPE: {type: UINT8, desc: SourceType of audio capture stream} + DEVICE_TYPE: {type: UINT16, desc: audio device type} + DURATION: {type: UINT32, desc: duration of muted capture} + +AUDIO_SAMPLE_RATE_STATISTIC: + __BASE: {type: STATISTIC, level: MINOR, desc: muted audio capture statistic} + APP_NAME: {type: STRING, desc: application name} + STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} + PIPE_TYPE: {type: UINT8, desc: pipe type, e.g. normal, lowlatency, offload, multichannel, e.t.c.} + IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture} + SAMPLE_RATE: {type: UINT32, desc: sample rate of this stream} + +AUDIO_ROUTE_CHANGE: + __BASE: {type: BEHAVIOR, level: MINOR, desc: audio route change} + TIMESTAMP: {type: UINT64, desc: when does this change happens} + REASON: {type: UINT8, desc: route change reason} + DEVICE_TYPE_BEFORE_CHANGE: {type: UINT16, desc: audio device type before change} + DEVICE_TYPE_AFTER_CHANGE: {type: UINT16, desc: audio device type after change} + +AUDIO_PIPE_CHANGE: + __BASE: {type: BEHAVIOR, level: MINOR, desc: audio pipe change} + APP_NAME: {type: STRING, desc: application name} + STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} + IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture} + PIPE_TYPE_BEFORE_CHANGE: {type: UINT8, desc: pipe type, e.g. normal, lowlatency, offload, multichannel, e.t.c.} + PIPE_TYPE_AFTER_CHANGE: {type: UINT8, desc: pipe type, e.g. normal, lowlatency, offload, multichannel, e.t.c.} + REASON: {type: UINT8, desc: audio pipe change reason} + +AUDIO_FOCUS_MIGRATE: + __BASE: {type: BEHAVIOR, level: MINOR, desc: audio force migrate between loacal device and remote device} + REMOTE_DEVICE_NAME: {type: STRING, desc: remote device name} + APP_NAME: {type: STRING, desc: application whose focus is migrated} + MIGRATE_DIRECTION: {type: UINT8, desc: migrate direction} + +SET_FORCE_USE_PLAYBACK_DEVICE: + __BASE: {type: BEHAVIOR, level: MINOR, desc: Forcibly select an audio playback device} + APP_NAME: {type: STRING, desc: application name who has forcibly select an audio playback device} + DEVICE_TYPE: {type: UINT16, desc: audio device type which is set force used} + STREAM_TYPE: {type: UINT8, desc: StreamUsage in playback} + +SET_FORCE_USE_CAPTURE_DEVICE: + __BASE: {type: BEHAVIOR, level: MINOR, desc: Forcibly select an audio capture device} + APP_NAME: {type: STRING, desc: application name who has forcibly select an audio capture device} + DEVICE_TYPE: {type: UINT16, desc: audio device type which is set force used} + STREAM_TYPE: {type: UINT8, desc: SourceType in capture} \ No newline at end of file -- Gitee From a3b20c35c510a7d5caafd702d8c6b5cd20a49180 Mon Sep 17 00:00:00 2001 From: huchang Date: Tue, 9 Apr 2024 14:34:54 +0800 Subject: [PATCH 2/3] correct yaml Change-Id: I7269e70cf4e1ac1b0e2922e728a93fce40e682f0 --- hisysevent.yaml | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/hisysevent.yaml b/hisysevent.yaml index e769d7695..de9a141d0 100644 --- a/hisysevent.yaml +++ b/hisysevent.yaml @@ -60,7 +60,6 @@ BACKGROUND_SILENT_PLAYBACK: LOAD_CONFIG_ERROR: __BASE: {type: FAULT, level: CRITICAL, desc: load configuration failed on audio policy service startup} CATEGORY: {type: UINT16, desc: category of audio policy configuration in uint16} - ERROR_CODE: {type: INT32, desc: error code} AUDIO_SERVICE_STARTUP_ERROR: __BASE: {type: FAULT, level: CRITICAL, desc: audio service start up failed} @@ -86,17 +85,20 @@ AUDIO_STREAM_UTILIZATION_STATISTIC: STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} PIPE_TYPE: {type: UINT8, desc: pipe type, e.g. normal, lowlatency, offload, multichannel, e.t.c.} APP_NAME: {type: STRING, desc: Application name which is using this stream} + SAMPLE_RATE: {type: UINT32, desc: sample rate of this stream} DURATION: {type: UINT32, desc: duration of this stream} AUDIO_DEVICE_UTILIZATION_STATISTIC: __BASE: {type: STATISTIC, level: MINOR, desc: audio device utilization statistic} - DEVICE_TYPE: {type: UINT16, desc: audio device type} + DEVICE_TYPE: {type: UINT8, desc: audio device type} + IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture} STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} DURATION: {type: UINT32, desc: duration of using this devices} BT_UTILIZATION_STATISTIC: __BASE: {type: STATISTIC, level: MINOR, desc: blue tooth device utilization statistic} - BT_TYPE: {type: UINT16, desc: blue tooth type} + BT_TYPE: {type: UINT8, desc: blue tooth type} + IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture} STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} DURATION: {type: UINT32, desc: duration of using this devices} @@ -112,29 +114,21 @@ PLAYBACK_VOLUME_STATISTIC: __BASE: {type: STATISTIC, level: MINOR, desc: playback volume statistic} STREAM_TYPE: {type: UINT8, desc: StreamUsage of playback stream} LEVEL: {type: INT32, desc: volume level} - DEVICE_TYPE: {type: UINT16, desc: audio device type} + DEVICE_TYPE: {type: UINT8, desc: audio device type} DURATION: {type: UINT32, desc: duration of this volume level} MUTED_CAPTURE_STATISTIC: __BASE: {type: STATISTIC, level: MINOR, desc: muted audio capture statistic} STREAM_TYPE: {type: UINT8, desc: SourceType of audio capture stream} - DEVICE_TYPE: {type: UINT16, desc: audio device type} + DEVICE_TYPE: {type: UINT8, desc: audio device type} DURATION: {type: UINT32, desc: duration of muted capture} -AUDIO_SAMPLE_RATE_STATISTIC: - __BASE: {type: STATISTIC, level: MINOR, desc: muted audio capture statistic} - APP_NAME: {type: STRING, desc: application name} - STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} - PIPE_TYPE: {type: UINT8, desc: pipe type, e.g. normal, lowlatency, offload, multichannel, e.t.c.} - IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture} - SAMPLE_RATE: {type: UINT32, desc: sample rate of this stream} - AUDIO_ROUTE_CHANGE: __BASE: {type: BEHAVIOR, level: MINOR, desc: audio route change} TIMESTAMP: {type: UINT64, desc: when does this change happens} REASON: {type: UINT8, desc: route change reason} - DEVICE_TYPE_BEFORE_CHANGE: {type: UINT16, desc: audio device type before change} - DEVICE_TYPE_AFTER_CHANGE: {type: UINT16, desc: audio device type after change} + DEVICE_TYPE_BEFORE_CHANGE: {type: UINT8, desc: audio device type before change} + DEVICE_TYPE_AFTER_CHANGE: {type: UINT8, desc: audio device type after change} AUDIO_PIPE_CHANGE: __BASE: {type: BEHAVIOR, level: MINOR, desc: audio pipe change} @@ -151,14 +145,9 @@ AUDIO_FOCUS_MIGRATE: APP_NAME: {type: STRING, desc: application whose focus is migrated} MIGRATE_DIRECTION: {type: UINT8, desc: migrate direction} -SET_FORCE_USE_PLAYBACK_DEVICE: +SET_FORCE_USE_AUDIO_DEVICE: __BASE: {type: BEHAVIOR, level: MINOR, desc: Forcibly select an audio playback device} APP_NAME: {type: STRING, desc: application name who has forcibly select an audio playback device} - DEVICE_TYPE: {type: UINT16, desc: audio device type which is set force used} - STREAM_TYPE: {type: UINT8, desc: StreamUsage in playback} - -SET_FORCE_USE_CAPTURE_DEVICE: - __BASE: {type: BEHAVIOR, level: MINOR, desc: Forcibly select an audio capture device} - APP_NAME: {type: STRING, desc: application name who has forcibly select an audio capture device} - DEVICE_TYPE: {type: UINT16, desc: audio device type which is set force used} - STREAM_TYPE: {type: UINT8, desc: SourceType in capture} \ No newline at end of file + DEVICE_TYPE: {type: UINT8, desc: audio device type which is set force used} + IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture} + STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} -- Gitee From dcf3582fa39f7261074bccdb247a9448782ab64e Mon Sep 17 00:00:00 2001 From: huchang Date: Wed, 10 Apr 2024 19:47:25 +0800 Subject: [PATCH 3/3] rename Change-Id: Ica4e189f6d53ed9d27944582d36fa0bf9d815da2 --- hisysevent.yaml | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/hisysevent.yaml b/hisysevent.yaml index de9a141d0..9ff3bacf7 100644 --- a/hisysevent.yaml +++ b/hisysevent.yaml @@ -20,7 +20,7 @@ DEVICE_CHANGE: STREAMTYPE: {type: INT32, desc: stream type} DEVICETYPE: {type: INT32, desc: device type} ADDRESS: {type: STRING, desc: device address} - DEVICE_NAME: {type: STRING, desc: device name} + DEVICE_DETAILED_CATEGORY: {type: STRING, desc: device detailed category} VOLUME_CHANGE: __BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: audio input device} @@ -66,58 +66,58 @@ AUDIO_SERVICE_STARTUP_ERROR: SERVICE_ID: {type: UINT8, desc: audio service id} ERROR_CODE: {type: INT32, desc: error code} -AUDIO_STREAM_EXHAUSTED_ERROR_STATISTIC: +AUDIO_STREAM_EXHAUSTED_STATS: __BASE: {type: STATISTIC, level: MINOR, desc: audio stream for playback is exhausted} DUBIOUS_APP: {type: STRING, desc: dubious application name which used most resources when this error happens} TIMES: {type: UINT32, desc: how many times when this error happens} -AUDIO_STREAM_CREATE_ERROR_STATISTIC: +AUDIO_STREAM_CREATE_ERROR_STATS: __BASE: {type: STATISTIC, level: MINOR, desc: audio stream create error} APP_NAME: {type: STRING, desc: application name who created audio stream error} IS_PLAYBACK: {type: BOOL, desc: created stream is used for playback or capture} - STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} + STREAM_TYPE: {type: UINT8, desc: stream type which can be either StreamUsage in playback or SourceType in capture} ERROR_CODE: {type: INT32, desc: error code} TIMES: {type: UINT32, desc: how many times when this error happen} -AUDIO_STREAM_UTILIZATION_STATISTIC: +AUDIO_STREAM_UTILIZATION_STATS: __BASE: {type: STATISTIC, level: MINOR, desc: audio stream utilization statistic} IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture} - STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} - PIPE_TYPE: {type: UINT8, desc: pipe type, e.g. normal, lowlatency, offload, multichannel, e.t.c.} + STREAM_TYPE: {type: UINT8, desc: stream type which can be either StreamUsage in playback or SourceType in capture} + PIPE_TYPE: {type: UINT8, desc: pipe type e.g. normal/lowlatency/offload/multichannel e.t.c.} APP_NAME: {type: STRING, desc: Application name which is using this stream} SAMPLE_RATE: {type: UINT32, desc: sample rate of this stream} DURATION: {type: UINT32, desc: duration of this stream} -AUDIO_DEVICE_UTILIZATION_STATISTIC: +AUDIO_DEVICE_UTILIZATION_STATS: __BASE: {type: STATISTIC, level: MINOR, desc: audio device utilization statistic} DEVICE_TYPE: {type: UINT8, desc: audio device type} IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture} - STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} + STREAM_TYPE: {type: UINT8, desc: stream type which can be either StreamUsage in playback or SourceType in capture} DURATION: {type: UINT32, desc: duration of using this devices} -BT_UTILIZATION_STATISTIC: +BT_UTILIZATION_STATS: __BASE: {type: STATISTIC, level: MINOR, desc: blue tooth device utilization statistic} BT_TYPE: {type: UINT8, desc: blue tooth type} IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture} - STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} + STREAM_TYPE: {type: UINT8, desc: stream type which can be either StreamUsage in playback or SourceType in capture} DURATION: {type: UINT32, desc: duration of using this devices} -PERFORMANCE_UNDER_OVERRUN_STATISTIC: +PERFORMANCE_UNDER_OVERRUN_STATS: __BASE: {type: STATISTIC, level: MINOR, desc: underrun or overrun statistic} APP_NAME: {type: STRING, desc: Application name whose audio stream has underrun or overrun} - STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} - PIPE_TYPE: {type: UINT8, desc: pipe type, e.g. normal, lowlatency, offload, multichannel, e.t.c.} + STREAM_TYPE: {type: UINT8, desc: stream type which can be either StreamUsage in playback or SourceType in capture} + PIPE_TYPE: {type: UINT8, desc: pipe type e.g. normal/lowlatency/offload/multichannel e.t.c.} IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture} TIMES: {type: UINT32, desc: how many times when this event happend} -PLAYBACK_VOLUME_STATISTIC: +PLAYBACK_VOLUME_STATS: __BASE: {type: STATISTIC, level: MINOR, desc: playback volume statistic} STREAM_TYPE: {type: UINT8, desc: StreamUsage of playback stream} LEVEL: {type: INT32, desc: volume level} DEVICE_TYPE: {type: UINT8, desc: audio device type} DURATION: {type: UINT32, desc: duration of this volume level} -MUTED_CAPTURE_STATISTIC: +MUTED_CAPTURE_STATS: __BASE: {type: STATISTIC, level: MINOR, desc: muted audio capture statistic} STREAM_TYPE: {type: UINT8, desc: SourceType of audio capture stream} DEVICE_TYPE: {type: UINT8, desc: audio device type} @@ -133,15 +133,15 @@ AUDIO_ROUTE_CHANGE: AUDIO_PIPE_CHANGE: __BASE: {type: BEHAVIOR, level: MINOR, desc: audio pipe change} APP_NAME: {type: STRING, desc: application name} - STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} + STREAM_TYPE: {type: UINT8, desc: stream type which can be either StreamUsage in playback or SourceType in capture} IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture} - PIPE_TYPE_BEFORE_CHANGE: {type: UINT8, desc: pipe type, e.g. normal, lowlatency, offload, multichannel, e.t.c.} - PIPE_TYPE_AFTER_CHANGE: {type: UINT8, desc: pipe type, e.g. normal, lowlatency, offload, multichannel, e.t.c.} + PIPE_TYPE_BEFORE_CHANGE: {type: UINT8, desc: pipe type e.g. normal/lowlatency/offload/multichannel e.t.c.} + PIPE_TYPE_AFTER_CHANGE: {type: UINT8, desc: pipe type e.g. normal/lowlatency/offload/multichannel e.t.c.} REASON: {type: UINT8, desc: audio pipe change reason} AUDIO_FOCUS_MIGRATE: __BASE: {type: BEHAVIOR, level: MINOR, desc: audio force migrate between loacal device and remote device} - REMOTE_DEVICE_NAME: {type: STRING, desc: remote device name} + DEVICE_DESC: {type: STRING, desc: device desc} APP_NAME: {type: STRING, desc: application whose focus is migrated} MIGRATE_DIRECTION: {type: UINT8, desc: migrate direction} @@ -150,4 +150,4 @@ SET_FORCE_USE_AUDIO_DEVICE: APP_NAME: {type: STRING, desc: application name who has forcibly select an audio playback device} DEVICE_TYPE: {type: UINT8, desc: audio device type which is set force used} IS_PLAYBACK: {type: BOOL, desc: this stream is used for playback or capture} - STREAM_TYPE: {type: UINT8, desc: stream type, can be either StreamUsage in playback or SourceType in capture} + STREAM_TYPE: {type: UINT8, desc: stream type which can be either StreamUsage in playback or SourceType in capture} -- Gitee