Skip to content

Commit

Permalink
cras_trace: fix floop related traces
Browse files Browse the repository at this point in the history
It's for debugging floop overrun issue.
It only support logs for One pair of floop device.

BUG=b:362679648
TEST=Record perfetto trace and ensure block size matches input/output
side

Change-Id: Ie6ae49346d530979a872db0e392a9ef1268ec421
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/5901364
Reviewed-by: Judy Hsiao <judyhsiao@google.com>
Commit-Queue: Judy Hsiao <judyhsiao@google.com>
Tested-by: chromeos-cop-builder@chromeos-cop.iam.gserviceaccount.com <chromeos-cop-builder@chromeos-cop.iam.gserviceaccount.com>
Auto-Submit: Terry Cheong <htcheong@chromium.org>
Tested-by: Terry Cheong <htcheong@chromium.org>
  • Loading branch information
terry182 authored and Chromeos LUCI committed Oct 1, 2024
1 parent 4c6288c commit 1ad06aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cras/server/cras_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ void cras_trace_frames(enum CRAS_NODE_TYPE type, unsigned int nframes) {
TRACE_COUNTER(audio, CRAS_SPK_WRITE_FRAMES, nframes);
break;
case CRAS_NODE_TYPE_FLOOP:
TRACE_COUNTER(audio, CRAS_FLOOP_OUT_WRITE_FRAMES, nframes);
TRACE_COUNTER(audio, CRAS_FLOOP_IN_READ_FRAMES, nframes);
break;
case CRAS_NODE_TYPE_MIC:
TRACE_COUNTER(audio, CRAS_INTERNAL_MIC_READ_FRAMES, nframes);
break;
case CRAS_NODE_TYPE_FLOOP_INTERNAL:
TRACE_COUNTER(audio, CRAS_FLOOP_IN_READ_FRAMES, nframes);
TRACE_COUNTER(audio, CRAS_FLOOP_OUT_WRITE_FRAMES, nframes);
break;
default:
break;
Expand All @@ -80,4 +80,4 @@ void cras_trace_overrun(enum CRAS_NODE_TYPE type,
char event[50];
snprintf(event, 50, "%s_UNDERRUN", cras_node_type_to_str(type, position));
TRACE_INSTANT(audio, event);
}
}

0 comments on commit 1ad06aa

Please sign in to comment.