xref: /aosp_15_r20/external/webrtc/modules/audio_processing/debug.proto (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1*d9f75844SAndroid Build Coastguard Workersyntax = "proto2";
2*d9f75844SAndroid Build Coastguard Workeroption optimize_for = LITE_RUNTIME;
3*d9f75844SAndroid Build Coastguard Workerpackage webrtc.audioproc;
4*d9f75844SAndroid Build Coastguard Worker
5*d9f75844SAndroid Build Coastguard Worker// Contains the format of input/output/reverse audio. An Init message is added
6*d9f75844SAndroid Build Coastguard Worker// when any of the fields are changed.
7*d9f75844SAndroid Build Coastguard Workermessage Init {
8*d9f75844SAndroid Build Coastguard Worker  optional int32 sample_rate = 1;
9*d9f75844SAndroid Build Coastguard Worker  optional int32 device_sample_rate = 2 [deprecated=true];
10*d9f75844SAndroid Build Coastguard Worker  optional int32 num_input_channels = 3;
11*d9f75844SAndroid Build Coastguard Worker  optional int32 num_output_channels = 4;
12*d9f75844SAndroid Build Coastguard Worker  optional int32 num_reverse_channels = 5;
13*d9f75844SAndroid Build Coastguard Worker  optional int32 reverse_sample_rate = 6;
14*d9f75844SAndroid Build Coastguard Worker  optional int32 output_sample_rate = 7;
15*d9f75844SAndroid Build Coastguard Worker  optional int32 reverse_output_sample_rate = 8;
16*d9f75844SAndroid Build Coastguard Worker  optional int32 num_reverse_output_channels = 9;
17*d9f75844SAndroid Build Coastguard Worker  optional int64 timestamp_ms = 10;
18*d9f75844SAndroid Build Coastguard Worker}
19*d9f75844SAndroid Build Coastguard Worker
20*d9f75844SAndroid Build Coastguard Worker// May contain interleaved or deinterleaved data, but don't store both formats.
21*d9f75844SAndroid Build Coastguard Workermessage ReverseStream {
22*d9f75844SAndroid Build Coastguard Worker  // int16 interleaved data.
23*d9f75844SAndroid Build Coastguard Worker  optional bytes data = 1;
24*d9f75844SAndroid Build Coastguard Worker
25*d9f75844SAndroid Build Coastguard Worker  // float deinterleaved data, where each repeated element points to a single
26*d9f75844SAndroid Build Coastguard Worker  // channel buffer of data.
27*d9f75844SAndroid Build Coastguard Worker  repeated bytes channel = 2;
28*d9f75844SAndroid Build Coastguard Worker}
29*d9f75844SAndroid Build Coastguard Worker
30*d9f75844SAndroid Build Coastguard Worker// May contain interleaved or deinterleaved data, but don't store both formats.
31*d9f75844SAndroid Build Coastguard Workermessage Stream {
32*d9f75844SAndroid Build Coastguard Worker  // int16 interleaved data.
33*d9f75844SAndroid Build Coastguard Worker  optional bytes input_data = 1;
34*d9f75844SAndroid Build Coastguard Worker  optional bytes output_data = 2;
35*d9f75844SAndroid Build Coastguard Worker
36*d9f75844SAndroid Build Coastguard Worker  optional int32 delay = 3;
37*d9f75844SAndroid Build Coastguard Worker  optional sint32 drift = 4;
38*d9f75844SAndroid Build Coastguard Worker  optional int32 applied_input_volume = 5;
39*d9f75844SAndroid Build Coastguard Worker  optional bool keypress = 6;
40*d9f75844SAndroid Build Coastguard Worker
41*d9f75844SAndroid Build Coastguard Worker  // float deinterleaved data, where each repeated element points to a single
42*d9f75844SAndroid Build Coastguard Worker  // channel buffer of data.
43*d9f75844SAndroid Build Coastguard Worker  repeated bytes input_channel = 7;
44*d9f75844SAndroid Build Coastguard Worker  repeated bytes output_channel = 8;
45*d9f75844SAndroid Build Coastguard Worker}
46*d9f75844SAndroid Build Coastguard Worker
47*d9f75844SAndroid Build Coastguard Worker// Contains the configurations of various APM component. A Config message is
48*d9f75844SAndroid Build Coastguard Worker// added when any of the fields are changed.
49*d9f75844SAndroid Build Coastguard Workermessage Config {
50*d9f75844SAndroid Build Coastguard Worker  // Acoustic echo canceler.
51*d9f75844SAndroid Build Coastguard Worker  optional bool aec_enabled = 1;
52*d9f75844SAndroid Build Coastguard Worker  optional bool aec_delay_agnostic_enabled = 2;
53*d9f75844SAndroid Build Coastguard Worker  optional bool aec_drift_compensation_enabled = 3;
54*d9f75844SAndroid Build Coastguard Worker  optional bool aec_extended_filter_enabled = 4;
55*d9f75844SAndroid Build Coastguard Worker  optional int32 aec_suppression_level = 5;
56*d9f75844SAndroid Build Coastguard Worker  // Mobile AEC.
57*d9f75844SAndroid Build Coastguard Worker  optional bool aecm_enabled = 6;
58*d9f75844SAndroid Build Coastguard Worker  optional bool aecm_comfort_noise_enabled = 7 [deprecated = true];
59*d9f75844SAndroid Build Coastguard Worker  optional int32 aecm_routing_mode = 8 [deprecated = true];
60*d9f75844SAndroid Build Coastguard Worker  // Automatic gain controller.
61*d9f75844SAndroid Build Coastguard Worker  optional bool agc_enabled = 9;
62*d9f75844SAndroid Build Coastguard Worker  optional int32 agc_mode = 10;
63*d9f75844SAndroid Build Coastguard Worker  optional bool agc_limiter_enabled = 11;
64*d9f75844SAndroid Build Coastguard Worker  optional bool noise_robust_agc_enabled = 12;
65*d9f75844SAndroid Build Coastguard Worker  // High pass filter.
66*d9f75844SAndroid Build Coastguard Worker  optional bool hpf_enabled = 13;
67*d9f75844SAndroid Build Coastguard Worker  // Noise suppression.
68*d9f75844SAndroid Build Coastguard Worker  optional bool ns_enabled = 14;
69*d9f75844SAndroid Build Coastguard Worker  optional int32 ns_level = 15;
70*d9f75844SAndroid Build Coastguard Worker  // Transient suppression.
71*d9f75844SAndroid Build Coastguard Worker  optional bool transient_suppression_enabled = 16;
72*d9f75844SAndroid Build Coastguard Worker  // Semicolon-separated string containing experimental feature
73*d9f75844SAndroid Build Coastguard Worker  // descriptions.
74*d9f75844SAndroid Build Coastguard Worker  optional string experiments_description = 17;
75*d9f75844SAndroid Build Coastguard Worker  reserved 18;  // Intelligibility enhancer enabled (deprecated).
76*d9f75844SAndroid Build Coastguard Worker  // Pre amplifier.
77*d9f75844SAndroid Build Coastguard Worker  optional bool pre_amplifier_enabled = 19;
78*d9f75844SAndroid Build Coastguard Worker  optional float pre_amplifier_fixed_gain_factor = 20;
79*d9f75844SAndroid Build Coastguard Worker
80*d9f75844SAndroid Build Coastguard Worker  // Next field number 21.
81*d9f75844SAndroid Build Coastguard Worker}
82*d9f75844SAndroid Build Coastguard Worker
83*d9f75844SAndroid Build Coastguard Workermessage PlayoutAudioDeviceInfo {
84*d9f75844SAndroid Build Coastguard Worker  optional int32 id = 1;
85*d9f75844SAndroid Build Coastguard Worker  optional int32 max_volume = 2;
86*d9f75844SAndroid Build Coastguard Worker}
87*d9f75844SAndroid Build Coastguard Worker
88*d9f75844SAndroid Build Coastguard Workermessage RuntimeSetting {
89*d9f75844SAndroid Build Coastguard Worker  optional float capture_pre_gain = 1;
90*d9f75844SAndroid Build Coastguard Worker  optional float custom_render_processing_setting = 2;
91*d9f75844SAndroid Build Coastguard Worker  optional float capture_fixed_post_gain = 3;
92*d9f75844SAndroid Build Coastguard Worker  optional int32 playout_volume_change = 4;
93*d9f75844SAndroid Build Coastguard Worker  optional PlayoutAudioDeviceInfo playout_audio_device_change = 5;
94*d9f75844SAndroid Build Coastguard Worker  optional bool capture_output_used = 6;
95*d9f75844SAndroid Build Coastguard Worker  optional float capture_post_gain = 7;
96*d9f75844SAndroid Build Coastguard Worker}
97*d9f75844SAndroid Build Coastguard Worker
98*d9f75844SAndroid Build Coastguard Workermessage Event {
99*d9f75844SAndroid Build Coastguard Worker  enum Type {
100*d9f75844SAndroid Build Coastguard Worker    INIT = 0;
101*d9f75844SAndroid Build Coastguard Worker    REVERSE_STREAM = 1;
102*d9f75844SAndroid Build Coastguard Worker    STREAM = 2;
103*d9f75844SAndroid Build Coastguard Worker    CONFIG = 3;
104*d9f75844SAndroid Build Coastguard Worker    UNKNOWN_EVENT = 4;
105*d9f75844SAndroid Build Coastguard Worker    RUNTIME_SETTING = 5;
106*d9f75844SAndroid Build Coastguard Worker  }
107*d9f75844SAndroid Build Coastguard Worker
108*d9f75844SAndroid Build Coastguard Worker  required Type type = 1;
109*d9f75844SAndroid Build Coastguard Worker
110*d9f75844SAndroid Build Coastguard Worker  optional Init init = 2;
111*d9f75844SAndroid Build Coastguard Worker  optional ReverseStream reverse_stream = 3;
112*d9f75844SAndroid Build Coastguard Worker  optional Stream stream = 4;
113*d9f75844SAndroid Build Coastguard Worker  optional Config config = 5;
114*d9f75844SAndroid Build Coastguard Worker  optional RuntimeSetting runtime_setting = 6;
115*d9f75844SAndroid Build Coastguard Worker}
116