pa_log_debug("setting avail_min=%lu", (unsigned long) avail_min);
- if ((err = pa_alsa_set_sw_params(u->pcm_handle, avail_min)) < 0) {
+ if ((err = pa_alsa_set_sw_params(u->pcm_handle, avail_min, !u->use_tsched)) < 0) {
pa_log("Failed to set software parameters: %s", pa_alsa_strerror(err));
return err;
}
pa_log_debug("setting avail_min=%lu", (unsigned long) avail_min);
- if ((err = pa_alsa_set_sw_params(u->pcm_handle, avail_min)) < 0) {
+ if ((err = pa_alsa_set_sw_params(u->pcm_handle, avail_min, !u->use_tsched)) < 0) {
pa_log("Failed to set software parameters: %s", pa_alsa_strerror(err));
return err;
}
return ret;
}
-int pa_alsa_set_sw_params(snd_pcm_t *pcm, snd_pcm_uframes_t avail_min) {
+int pa_alsa_set_sw_params(snd_pcm_t *pcm, snd_pcm_uframes_t avail_min, pa_bool_t period_event) {
snd_pcm_sw_params_t *swparams;
snd_pcm_uframes_t boundary;
int err;
return err;
}
- if ((err = snd_pcm_sw_params_set_period_event(pcm, swparams, 0)) < 0) {
+ if ((err = snd_pcm_sw_params_set_period_event(pcm, swparams, period_event)) < 0) {
pa_log_warn("Unable to disable period event: %s\n", pa_alsa_strerror(err));
return err;
}
int pa_alsa_set_sw_params(
snd_pcm_t *pcm,
- snd_pcm_uframes_t avail_min);
+ snd_pcm_uframes_t avail_min,
+ pa_bool_t period_event);
/* Picks a working mapping from the profile set based on the specified ss/map */
snd_pcm_t *pa_alsa_open_by_device_id_auto(