if (!pa_alsa_pcm_is_hw(pcm_handle))
_use_tsched = false;
+ /* The PCM pointer is only updated with period granularity */
+ if (snd_pcm_hw_params_is_batch(hwparams)) {
+ pa_log_info("Disabling tsched mode since BATCH flag is set");
+ _use_tsched = false;
+ }
+
#if (SND_LIB_VERSION >= ((1<<16)|(0<<8)|24)) /* API additions in 1.0.24 */
if (_use_tsched) {
goto success;
}
+ snd_pcm_hw_params_copy(hwparams_copy, hwparams);
/* Second try: set period size first, followed by buffer size */
if (set_period_size(pcm_handle, hwparams_copy, _period_size) >= 0 &&
set_buffer_size(pcm_handle, hwparams_copy, _buffer_size) >= 0 &&
}
}
-bool pa_alsa_init_description(pa_proplist *p) {
+bool pa_alsa_init_description(pa_proplist *p, pa_card *card) {
const char *d, *k;
pa_assert(p);
- if (pa_device_init_description(p))
+ if (pa_device_init_description(p, card))
return true;
if (!(d = pa_proplist_gets(p, "alsa.card_name")))