statsd: implement Speech DSP stat report

Bug: 122719904
Test: manual stats_client test and check the statsd logs
Change-Id: I3dac9f31f59e6f10393c97c6bd9ca0d0ccb11e23
Signed-off-by: Carter Hsu <carterhsu@google.com>
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 60b2e25..5a6c08d 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -206,6 +206,7 @@
         BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported = 142;
         AttentionManagerServiceResultReported attention_manager_service_result_reported = 143;
         AdbConnectionChanged adb_connection_changed = 144;
+        SpeechDspStatReported speech_dsp_stat_reported = 145;
     }
 
     // Pulled events will start at field 10000.
@@ -4521,3 +4522,18 @@
     // True if the 'always allow' option was selected for this system.
     optional bool always_allow = 4;
 }
+
+/*
+ * Logs the reported speech DSP status.
+ *
+ * Logged from:
+ *  Vendor audio implementation.
+ */
+message SpeechDspStatReported {
+    // The total Speech DSP uptime in milliseconds.
+    optional int32 total_uptime_millis = 1;
+    // The total Speech DSP downtime in milliseconds.
+    optional int32 total_downtime_millis = 2;
+    optional int32 total_crash_count = 3;
+    optional int32 total_recover_count = 4;
+}