src/media/audio/audio_core/audio_driver_v1.cc
// Currently we ignore driver-reported position, using the system-internal clock instead. This is
// benign and can be safely ignored. However, we did not request it, so this may indicate some other
// problem in the driver state machine. Issue a (debug-only) warning, eat the msg, and continue.
Currently we ignore driver-reported position, using the system-internal clock instead. This is
benign and can be safely ignored. However, we did not request it, so this may indicate some other
problem in the driver state machine. Issue a (debug-only) warning, eat the msg, and continue.
Currently we ignore driver - reported position using the system - internal clock instead . This is benign and can be safely ignored . However we did not request it so this may indicate some other problem in the driver state machine . Issue a ( debug - only ) warning eat the msg and continue .
zx_status_t AudioDriverV1::ProcessPositionNotify(const audio_rb_position_notify_t& notify) {
  TRACE_DURATION("audio", "AudioDriverV1::ProcessPositionNotify");
  if constexpr (kLogPositionNotifications) {
    if ((kPositionNotificationInfoInterval > 0) &&
        (position_notification_count_ % kPositionNotificationInfoInterval == 0)) {
      AUDIO_LOG_OBJ(INFO, this) << (kEnablePositionNotifications ? "Notification"
                                                                 : "Unsolicited notification")
                                << " (1/" << kPositionNotificationInfoInterval
                                << ") Time:" << notify.monotonic_time << ", Pos:" << std::setw(6)
                                << notify.ring_buffer_pos;
    } else if ((kPositionNotificationTraceInterval > 0) &&
               (position_notification_count_ % kPositionNotificationTraceInterval == 0)) {
      AUDIO_LOG_OBJ(DEBUG, this) << (kEnablePositionNotifications ? "Notification"
                                                                  : "Unsolicited notification")
                                 << " (1/" << kPositionNotificationTraceInterval
                                 << ") Time:" << notify.monotonic_time << ",  Pos:" << std::setw(6)
                                 << notify.ring_buffer_pos;
    } else if ((kPositionNotificationSpewInterval > 0) &&
               (position_notification_count_ % kPositionNotificationSpewInterval == 0)) {
      AUDIO_LOG_OBJ(TRACE, this) << (kEnablePositionNotifications ? "Notification"
                                                                  : "Unsolicited notification")
                                 << " (1/" << kPositionNotificationSpewInterval
                                 << ") Time:" << notify.monotonic_time << ", Pos:" << std::setw(6)
                                 << notify.ring_buffer_pos;
    }
  }
  ++position_notification_count_;
  return ZX_OK;
}
zx_status_t AudioDriverV1 :: ProcessPositionNotify ( const audio_rb_position_notify_t & notify ) { TRACE_DURATION ( " " , " " ) ; if constexpr ( kLogPositionNotifications ) { if ( ( kPositionNotificationInfoInterval > 0 ) && ( position_notification_count_ % kPositionNotificationInfoInterval == 0 ) ) { AUDIO_LOG_OBJ ( INFO , this ) << ( kEnablePositionNotifications ? " " : " " ) << " " << kPositionNotificationInfoInterval << " " << notify . monotonic_time << " " << std :: setw ( 6 ) << notify . ring_buffer_pos ; } else if ( ( kPositionNotificationTraceInterval > 0 ) && ( position_notification_count_ % kPositionNotificationTraceInterval == 0 ) ) { AUDIO_LOG_OBJ ( DEBUG , this ) << ( kEnablePositionNotifications ? " " : " " ) << " " << kPositionNotificationTraceInterval << " " << notify . monotonic_time << " " << std :: setw ( 6 ) << notify . ring_buffer_pos ; } else if ( ( kPositionNotificationSpewInterval > 0 ) && ( position_notification_count_ % kPositionNotificationSpewInterval == 0 ) ) { AUDIO_LOG_OBJ ( TRACE , this ) << ( kEnablePositionNotifications ? " " : " " ) << " " << kPositionNotificationSpewInterval << " " << notify . monotonic_time << " " << std :: setw ( 6 ) << notify . ring_buffer_pos ; } } ++ position_notification_count_ ; return ZX_OK ; }
Currently we ignore driver-reported position, using the system-internal clock instead.
Currently we ignore driver - reported position using the system - internal clock instead .
// Even if we don't log them, keep a running count of position notifications since START.