mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-15 08:56:38 -05:00
alsa: set_timeout is only called when tsched is enabled.
We don't need to do an extra check.
This commit is contained in:
parent
4ffa7860bc
commit
3c5da11706
1 changed files with 8 additions and 11 deletions
|
|
@ -1850,10 +1850,6 @@ static int set_swparams(struct state *state)
|
|||
static int set_timeout(struct state *state, uint64_t time)
|
||||
{
|
||||
struct itimerspec ts;
|
||||
|
||||
if (state->disable_tsched)
|
||||
return 0;
|
||||
|
||||
ts.it_value.tv_sec = time / SPA_NSEC_PER_SEC;
|
||||
ts.it_value.tv_nsec = time % SPA_NSEC_PER_SEC;
|
||||
ts.it_interval.tv_sec = 0;
|
||||
|
|
@ -2773,9 +2769,9 @@ static void alsa_wakeup_event(struct spa_source *source)
|
|||
handle_capture(state, current_time, avail, delay, target);
|
||||
|
||||
done:
|
||||
if (!state->disable_tsched &&
|
||||
(state->next_time > current_time + SPA_NSEC_PER_SEC ||
|
||||
current_time > state->next_time + SPA_NSEC_PER_SEC)) {
|
||||
if (!state->disable_tsched) {
|
||||
if (state->next_time > current_time + SPA_NSEC_PER_SEC ||
|
||||
current_time > state->next_time + SPA_NSEC_PER_SEC) {
|
||||
if ((suppressed = spa_ratelimit_test(&state->rate_limit, current_time)) >= 0) {
|
||||
spa_log_error(state->log, "%s: impossible timeout %lu %lu %lu %"
|
||||
PRIu64" %"PRIu64" %"PRIi64" %d %"PRIi64" (%d suppressed)",
|
||||
|
|
@ -2787,6 +2783,7 @@ done:
|
|||
}
|
||||
set_timeout(state, state->next_time);
|
||||
}
|
||||
}
|
||||
|
||||
static void reset_buffers(struct state *this)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue