[media][audio] Rename REP(x) macro to REPORT(x)

Test: Rename only
Change-Id: I11068afb26e8e4d10ef1de9c7b4de2740ad6ce7e
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/377785
Commit-Queue: Adam MacBeth <amacbeth@google.com>
Reviewed-by: Dale Sather <dalesat@google.com>
Reviewed-by: Tim Detwiler <tjdetwiler@google.com>
Testability-Review: Tim Detwiler <tjdetwiler@google.com>
diff --git a/src/media/audio/audio_core/audio_capturer.cc b/src/media/audio/audio_core/audio_capturer.cc
index 37b7053..ad81920 100644
--- a/src/media/audio/audio_core/audio_capturer.cc
+++ b/src/media/audio/audio_core/audio_capturer.cc
@@ -110,7 +110,7 @@
     return;
   }
 
-  REP(SettingCapturerStreamType(*this, stream_type));
+  REPORT(SettingCapturerStreamType(*this, stream_type));
 
   // Success, record our new format.
   UpdateFormat(format_result.take_value());
@@ -195,7 +195,7 @@
     return;
   }
 
-  REP(SettingCapturerGain(*this, gain_db));
+  REPORT(SettingCapturerGain(*this, gain_db));
 
   stream_gain_db_.store(gain_db);
   if (!loopback_) {
@@ -212,7 +212,7 @@
     return;
   }
 
-  REP(SettingCapturerMute(*this, mute));
+  REPORT(SettingCapturerMute(*this, mute));
 
   mute_ = mute;
 
diff --git a/src/media/audio/audio_core/audio_device_manager.cc b/src/media/audio/audio_core/audio_device_manager.cc
index 4bd2069..ff6b2c9 100644
--- a/src/media/audio/audio_core/audio_device_manager.cc
+++ b/src/media/audio/audio_core/audio_device_manager.cc
@@ -95,7 +95,7 @@
           })
           .or_else([device](zx_status_t& error) {
             FX_PLOGS(ERROR, error) << "AddDevice failed";
-            REP(DeviceStartupFailed(*device));
+            REPORT(DeviceStartupFailed(*device));
             device->Shutdown();
           }));
 }
@@ -119,7 +119,7 @@
 
   devices_.insert(std::move(dev));
 
-  REP(ActivatingDevice(*device));
+  REPORT(ActivatingDevice(*device));
   device->SetActivated();
 
   // Notify interested users of the new device. If it will become the new default, set 'is_default'
@@ -142,7 +142,7 @@
   TRACE_DURATION("audio", "AudioDeviceManager::RemoveDevice");
   FX_DCHECK(device != nullptr);
 
-  REP(RemovingDevice(*device));
+  REPORT(RemovingDevice(*device));
 
   // If device was active: reset the default (based on most-recently-plugged).
   if (device->activated()) {
@@ -232,7 +232,7 @@
   dev->system_gain_dirty = true;
 
   // Change the gain and then report the new settings to our clients.
-  REP(SettingDeviceGainInfo(*dev, gain_info, set_flags));
+  REPORT(SettingDeviceGainInfo(*dev, gain_info, set_flags));
   dev->SetGainInfo(gain_info, set_flags);
   NotifyDeviceGainChanged(*dev);
 }
@@ -341,7 +341,7 @@
                    << device_name << "'";
   }
 
-  REP(AddingDevice(device_name, *new_device));
+  REPORT(AddingDevice(device_name, *new_device));
   AddDevice(std::move(new_device));
 }
 
diff --git a/src/media/audio/audio_core/audio_renderer.cc b/src/media/audio/audio_core/audio_renderer.cc
index 609e047..4d25704 100644
--- a/src/media/audio/audio_core/audio_renderer.cc
+++ b/src/media/audio/audio_core/audio_renderer.cc
@@ -89,7 +89,7 @@
   }
   format_ = {format_result.take_value()};
 
-  REP(SettingRendererStreamType(*this, stream_type));
+  REPORT(SettingRendererStreamType(*this, stream_type));
 
   context().route_graph().SetRendererRoutingProfile(
       *this, {.routable = true, .usage = StreamUsage::WithRenderUsage(usage_)});
@@ -126,7 +126,7 @@
 
         auto& gain = link.mixer->bookkeeping().gain;
 
-        REP(SettingRendererFinalGain(*this, gain_db));
+        REPORT(SettingRendererFinalGain(*this, gain_db));
 
         if (volume_command.ramp.has_value()) {
           gain.SetSourceGainWithRamp(gain_db, volume_command.ramp->duration,
@@ -156,7 +156,7 @@
     return;
   }
 
-  REP(SettingRendererGain(*this, gain_db));
+  REPORT(SettingRendererGain(*this, gain_db));
 
   stream_gain_db_ = gain_db;
   context().volume_manager().NotifyStreamChanged(this);
@@ -179,7 +179,7 @@
     return;
   }
 
-  REP(SettingRendererGainWithRamp(*this, gain_db, duration, ramp_type));
+  REPORT(SettingRendererGainWithRamp(*this, gain_db, duration, ramp_type));
 
   context().volume_manager().NotifyStreamChanged(this, Ramp{duration, ramp_type});
 
@@ -197,7 +197,7 @@
   }
   AUD_VLOG_OBJ(TRACE, this) << " (mute: " << mute << ")";
 
-  REP(SettingRendererMute(*this, mute));
+  REPORT(SettingRendererMute(*this, mute));
   mute_ = mute;
 
   context().volume_manager().NotifyStreamChanged(this);
diff --git a/src/media/audio/audio_core/base_capturer.cc b/src/media/audio/audio_core/base_capturer.cc
index 56883eb..4b5fc78 100644
--- a/src/media/audio/audio_core/base_capturer.cc
+++ b/src/media/audio/audio_core/base_capturer.cc
@@ -67,7 +67,7 @@
       overflow_count_(0u),
       partial_overflow_count_(0u) {
   FX_DCHECK(mix_domain_);
-  REP(AddingCapturer(*this));
+  REPORT(AddingCapturer(*this));
 
   binding_.set_error_handler([this](zx_status_t status) { BeginShutdown(); });
   source_links_.reserve(16u);
@@ -91,7 +91,7 @@
 
 BaseCapturer::~BaseCapturer() {
   TRACE_DURATION("audio.debug", "BaseCapturer::~BaseCapturer");
-  REP(RemovingCapturer(*this));
+  REPORT(RemovingCapturer(*this));
 }
 
 void BaseCapturer::OnLinkAdded() { RecomputeMinFenceTime(); }
@@ -226,7 +226,7 @@
     return;
   }
 
-  REP(AddingCapturerPayloadBuffer(*this, id, payload_buf_size));
+  REPORT(AddingCapturerPayloadBuffer(*this, id, payload_buf_size));
 
   payload_buf_frames_ = static_cast<uint32_t>(payload_buf_size / format_.bytes_per_frame());
   AUD_VLOG_OBJ(TRACE, this) << "payload buf -- size:" << payload_buf_size
@@ -495,7 +495,7 @@
     FX_VLOGS(TRACE) << "Changing min_fence_time_ (ns) from " << min_fence_time_.get() << " to "
                     << cur_min_fence_time.get();
 
-    REP(SettingCapturerMinFenceTime(*this, cur_min_fence_time));
+    REPORT(SettingCapturerMinFenceTime(*this, cur_min_fence_time));
     min_fence_time_ = cur_min_fence_time;
   }
 }
@@ -963,7 +963,7 @@
     pkt.payload_offset = finished_buffer.offset_frames * format_.bytes_per_frame();
     pkt.payload_size = finished_buffer.filled_frames * format_.bytes_per_frame();
 
-    REP(SendingCapturerPacket(*this, pkt));
+    REPORT(SendingCapturerPacket(*this, pkt));
 
     if (finished_buffer.cbk != nullptr) {
       AUD_VLOG_OBJ(SPEW, this) << "Sync -mode -- payload size:" << pkt.payload_size
diff --git a/src/media/audio/audio_core/base_renderer.cc b/src/media/audio/audio_core/base_renderer.cc
index b1821a3..c8281bc 100644
--- a/src/media/audio/audio_core/base_renderer.cc
+++ b/src/media/audio/audio_core/base_renderer.cc
@@ -34,7 +34,7 @@
       packet_allocator_(kMaxPacketAllocatorSlabs, true) {
   TRACE_DURATION("audio", "BaseRenderer::BaseRenderer");
   FX_DCHECK(context);
-  REP(AddingRenderer(*this));
+  REPORT(AddingRenderer(*this));
   AUD_VLOG_OBJ(TRACE, this);
 
   // For now, optimal clock is set as a clone of MONOTONIC. Ultimately this will be the clock of the
@@ -55,7 +55,7 @@
 
   wav_writer_.Close();
   payload_buffers_.clear();
-  REP(RemovingRenderer(*this));
+  REPORT(RemovingRenderer(*this));
 }
 
 void BaseRenderer::Shutdown() {
@@ -94,7 +94,7 @@
   });
 
   if (min_lead_time_ != cur_lead_time) {
-    REP(SettingRendererMinLeadTime(*this, cur_lead_time));
+    REPORT(SettingRendererMinLeadTime(*this, cur_lead_time));
     min_lead_time_ = cur_lead_time;
     ReportNewMinLeadTime();
   }
@@ -201,7 +201,7 @@
     return;
   }
 
-  REP(AddingRendererPayloadBuffer(*this, id, vmo_mapper->size()));
+  REPORT(AddingRendererPayloadBuffer(*this, id, vmo_mapper->size()));
 
   // Things went well, cancel the cleanup hook. If our config had been validated previously, it will
   // have to be revalidated as we move into the operational phase of our life.
@@ -226,7 +226,7 @@
     return;
   }
 
-  REP(RemovingRendererPayloadBuffer(*this, id));
+  REPORT(RemovingRendererPayloadBuffer(*this, id));
   cleanup.cancel();
 }
 
@@ -273,7 +273,7 @@
     return;
   }
 
-  REP(SettingRendererPtsContinuityThreshold(*this, threshold_seconds));
+  REPORT(SettingRendererPtsContinuityThreshold(*this, threshold_seconds));
 
   pts_continuity_threshold_ = threshold_seconds;
   pts_continuity_threshold_set_ = true;
@@ -333,7 +333,7 @@
     return;
   }
 
-  REP(SendingRendererPacket(*this, packet));
+  REPORT(SendingRendererPacket(*this, packet));
 
   // Compute the PTS values for this packet applying our interpolation and continuity thresholds as
   // we go. Start by checking to see if this our PTS to frames transformation needs to be computed
diff --git a/src/media/audio/audio_core/driver_output.cc b/src/media/audio/audio_core/driver_output.cc
index 96ae7fa..b4ac861 100644
--- a/src/media/audio/audio_core/driver_output.cc
+++ b/src/media/audio/audio_core/driver_output.cc
@@ -154,7 +154,7 @@
                      << " milliseconds.";
 
       // Use our Reporter to log this to Cobalt, if enabled.
-      REP(OutputUnderflow(output_underflow_duration, uptime));
+      REPORT(OutputUnderflow(output_underflow_duration, uptime));
 
       underflow_start_time_ = uptime;
       output_producer_->FillWithSilence(rb.virt(), rb.frames());
diff --git a/src/media/audio/audio_core/main.cc b/src/media/audio/audio_core/main.cc
index 16b4fa8..fda2efe 100644
--- a/src/media/audio/audio_core/main.cc
+++ b/src/media/audio/audio_core/main.cc
@@ -37,7 +37,7 @@
 
   // Initialize our telemetry reporter (which optimizes to nothing if ENABLE_REPORTER is set to 0).
   auto component_context = sys::ComponentContext::Create();
-  REP(Init(component_context.get()));
+  REPORT(Init(component_context.get()));
 
   auto process_config = ProcessConfigLoader::LoadProcessConfig(kProcessConfigPath);
   if (!process_config) {
diff --git a/src/media/audio/audio_core/plug_detector.cc b/src/media/audio/audio_core/plug_detector.cc
index 48d4188..d6e372b 100644
--- a/src/media/audio/audio_core/plug_detector.cc
+++ b/src/media/audio/audio_core/plug_detector.cc
@@ -89,7 +89,7 @@
     // handles instead of file descriptors.
     fbl::unique_fd dev_node(openat(dir_fd, name.c_str(), O_RDONLY));
     if (!dev_node.is_valid()) {
-      REP(FailedToOpenDevice(name, is_input, errno));
+      REPORT(FailedToOpenDevice(name, is_input, errno));
       FX_LOGS(ERROR) << "PlugDetectorImpl failed to open device node at \"" << name << "\". ("
                      << strerror(errno) << " : " << errno << ")";
       return;
@@ -100,7 +100,7 @@
     zx::channel dev_channel;
     res = fdio_get_service_handle(dev_node.release(), dev_channel.reset_and_get_address());
     if (res != ZX_OK) {
-      REP(FailedToObtainFdioServiceChannel(name, is_input, res));
+      REPORT(FailedToObtainFdioServiceChannel(name, is_input, res));
       FX_PLOGS(ERROR, res) << "Failed to obtain FDIO service channel to audio "
                            << (is_input ? "input" : "output");
       return;
@@ -110,7 +110,7 @@
     auto device =
         fidl::InterfaceHandle<fuchsia::hardware::audio::Device>(std::move(dev_channel)).Bind();
     device.set_error_handler([name, is_input](zx_status_t res) {
-      REP(FailedToObtainStreamChannel(name, is_input, res));
+      REPORT(FailedToObtainStreamChannel(name, is_input, res));
       FX_PLOGS(ERROR, res) << "Failed to open channel to audio " << (is_input ? "input" : "output");
     });
     device->GetChannel([d = std::move(device), this, is_input, name](
diff --git a/src/media/audio/audio_core/reporter.h b/src/media/audio/audio_core/reporter.h
index 827f542..ce83d5c 100644
--- a/src/media/audio/audio_core/reporter.h
+++ b/src/media/audio/audio_core/reporter.h
@@ -26,17 +26,17 @@
 // The idea is to make instrumentation as simple as possible for the code that
 // does the real work. This class implements methods corresponding to the
 // events that need to be reported in terms that make the most sense for the
-// caller. Calls to those methods are made using the |REP| macro, which is
+// caller. Calls to those methods are made using the |REPORT| macro, which is
 // notationally simple:
 //
-//     REP(ThatThingHappened(details, more_details));
+//     REPORT(ThatThingHappened(details, more_details));
 //
 // Use of the macro also allows instrumentation to be dropped from the build
 // using a simple gn argument, if desired (by setting ENABLE_REPORTER to 0).
 // The reporter is provisioned by calling its |Init| method, also using the
-// |REP| macro. This is done in main.cc:
+// |REPORT| macro. This is done in main.cc:
 //
-//    REP(Init(component_context));
+//    REPORT(Init(component_context));
 //
 // Note that calls to methods such as |AddingDevice| allocate resources, which
 // should be deallocated by e.g. |RemovingDevice|. For the time being, this
@@ -59,7 +59,7 @@
   ////////////////////////////////////////////////////////////////////////////
   // The following methods are intended to be called using REP. For example:
   //
-  //     REP(Init(component_context));
+  //     REPORT(Init(component_context));
   //
   void Init(sys::ComponentContext* component_context);
 
@@ -228,9 +228,9 @@
   fuchsia::cobalt::LoggerPtr cobalt_logger_;
 };
 
-#define REP(x) media::audio::Reporter::Singleton().x
+#define REPORT(x) media::audio::Reporter::Singleton().x
 #else  // ENABLE_REPORTER
-#define REP(x) (void)0
+#define REPORT(x) (void)0
 #endif  // ENABLE_REPORTER
 
 }  // namespace media::audio