mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
improve debug
Log device name and stream direction Don't log xrun errors in alsa, we signal the xrun signal, which should take care of logging if any. Log quantum in xrun. ratelimit xrun messages.
This commit is contained in:
parent
be8263208d
commit
b53cc6feb8
2 changed files with 13 additions and 8 deletions
|
|
@ -470,9 +470,11 @@ int spa_alsa_set_format(struct state *state, struct spa_audio_info *fmt, uint32_
|
|||
state->period_frames = period_size;
|
||||
periods = state->buffer_frames / state->period_frames;
|
||||
|
||||
spa_log_info(state->log, NAME" %p: format:%s rate:%d channels:%d "
|
||||
spa_log_info(state->log, NAME" %s (%s): format:%s rate:%d channels:%d "
|
||||
"buffer frames %lu, period frames %lu, periods %u, frame_size %zd",
|
||||
state, snd_pcm_format_name(state->format), state->rate, state->channels,
|
||||
state->props.device,
|
||||
state->stream == SND_PCM_STREAM_CAPTURE ? "capture" : "playback",
|
||||
snd_pcm_format_name(state->format), state->rate, state->channels,
|
||||
state->buffer_frames, state->period_frames, periods, state->frame_size);
|
||||
|
||||
/* write the parameters to device */
|
||||
|
|
@ -566,7 +568,7 @@ static int alsa_recover(struct state *state, int err)
|
|||
delay = SPA_TIMEVAL_TO_USEC(&diff);
|
||||
missing = delay * state->rate / SPA_USEC_PER_SEC;
|
||||
|
||||
spa_log_error(state->log, NAME" %p: xrun of %"PRIu64" usec %"PRIu64" %f",
|
||||
spa_log_trace(state->log, NAME" %p: xrun of %"PRIu64" usec %"PRIu64" %f",
|
||||
state, delay, missing, state->safety);
|
||||
|
||||
spa_node_call_xrun(&state->callbacks,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue