[pulseaudio-discuss] Why tsched disabled when I use module-alsa-sink with 'mmap=0 tsched=1' parameters?

Raymond Yau superquad.vortex2 at gmail.com
Wed Dec 17 06:44:27 PST 2014


>
>
> I have question something about selecting logic between timer-based and
IRQ scheduling.
>
> When I tried to load 'module-alsa-sink' with 'mmap=0 tsched=1'
parameters, tsched(timer-based scheduling) becomes disabled by below codes.
>
> It seems tsched is allowed only mmap supported ALSA devices. Why tsched
disabled while use non-mmap driven ALSA?
>
> So, I found able to use tsched with 'mmap=0' option with below workaround
code.
>
> I think it seems possible to use 'mmap=0 tsched=1' together. There are
any reasons for that?
>

Do you mean your sound card does not support mmap but you want to try timer
scheduling ?

} else if ((ret = snd_pcm_hw_params_set_access(pcm_handle, hwparams,
SND_PCM_ACCESS_RW_INTERLEAVED)) < 0) {
        pa_log_debug("snd_pcm_hw_params_set_access() failed: %s",
pa_alsa_strerror(ret));
        goto finish;
    }

    if (!_use_mmap)
        _use_tsched = false;

Seem pulseaudio disable timer scheduling when driver does not support
SND_PCM_ACCESS_RW_INTERLEAVED (e.g. surround40 or surround51 of those
creative sound cards emu10k1 and ca0106 use multi plugin but pulseaudio
does not support SND_PCM_ACCESS_MMAP_COMPLEXā€ˇ )

    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;
    }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20141217/d4510ed6/attachment.html>


More information about the pulseaudio-discuss mailing list