alsa: return 0 from successful resume

Don't return the value of the last snd_pcm_resume() call because that
might be -ENOSYS when resume is not implemented for the card and then
the non-error (because we used drop/prepare later) propagates and
logs an error.
This commit is contained in:
Wim Taymans 2023-11-15 10:10:56 +01:00
parent 0da4ea3b30
commit 179fbb51fc

View file

@ -2423,7 +2423,7 @@ recover:
if (follower != driver && follower->linked)
do_start(follower);
}
return res;
return 0;
}
static inline snd_pcm_sframes_t alsa_avail(struct state *state)
@ -2705,7 +2705,7 @@ static int alsa_write_sync(struct state *state, uint64_t current_time)
return res;
if (SPA_UNLIKELY((res = get_status(state, current_time, &avail, &delay, &target)) < 0)) {
spa_log_error(state->log, "get_status error");
spa_log_error(state->log, "get_status error: %s", spa_strerror(res));
state->next_time += state->threshold * 1e9 / state->rate;
return res;
}
@ -2966,7 +2966,7 @@ static int alsa_read_sync(struct state *state, uint64_t current_time)
return res;
if (SPA_UNLIKELY((res = get_status(state, current_time, &avail, &delay, &target)) < 0)) {
spa_log_error(state->log, "get_status error");
spa_log_error(state->log, "get_status error: %s", spa_strerror(res));
state->next_time += state->threshold * 1e9 / state->rate;
return res;
}