<div dir="ltr"><p dir="ltr">Dear developers,</p><p dir="ltr"><br></p><p dir="ltr">I have question something about selecting logic between timer-based and IRQ scheduling.</p><p dir="ltr">When I tried to load 'module-alsa-sink' with 'mmap=0 tsched=1' parameters, tsched(timer-based scheduling) becomes disabled by below codes.</p><p dir="ltr">It seems tsched is allowed only mmap supported ALSA devices. Why tsched disabled while use non-mmap driven ALSA?</p><p dir="ltr">So, I found able to use tsched with 'mmap=0' option with below workaround code.</p><p dir="ltr">I think it seems possible to use 'mmap=0 tsched=1' together. There are any reasons for that?</p>
<p dir="ltr"><br></p><p dir="ltr">==========<br></p><p dir="ltr">diff -uNr ./a/alsa-sink.c ./b/alsa-sink.c</p><p dir="ltr">--- ./a/alsa-sink.c 2014-12-11 21:41:13.680373375 +0900</p><p dir="ltr">+++ ./b/alsa-sink.c 2014-12-11 21:45:50.032371336 +0900</p><p dir="ltr">@@ -2210,11 +2210,6 @@</p><p dir="ltr"> u->use_mmap = use_mmap = false;</p><p dir="ltr"> }</p><p dir="ltr"><br></p><p dir="ltr">- if (use_tsched && (!b || !d)) {</p><p dir="ltr">- pa_log_info("Cannot enable timer-based scheduling, falling back to sound IRQ scheduling.");</p><p dir="ltr">- u->use_tsched = use_tsched = false;</p><p dir="ltr">- }</p><p dir="ltr">-</p><p dir="ltr"> if (u->use_mmap)</p><p dir="ltr"> pa_log_info("Successfully enabled mmap() mode.");</p><p dir="ltr"><br></p><p dir="ltr">diff -uNr ./a/alsa-util.c ./b/alsa-util.c</p><p dir="ltr">--- ./a/alsa-util.c 2014-12-11 21:41:13.680373375 +0900</p><p dir="ltr">+++ ./b/alsa-util.c 2014-12-11 21:46:46.228370922 +0900</p><p dir="ltr">@@ -240,9 +240,6 @@</p><p dir="ltr"> goto finish;</p><p dir="ltr"> }</p><p dir="ltr"><br></p><p dir="ltr">- if (!_use_mmap)</p><p dir="ltr">- _use_tsched = false;</p><p dir="ltr">-</p><p dir="ltr"> if (!pa_alsa_pcm_is_hw(pcm_handle))</p><p dir="ltr"> _use_tsched = false;</p><p dir="ltr">==========</p><p dir="ltr"><br></p><p dir="ltr">Thanks in advance,</p><p dir="ltr">KimJeongYeon</p>
</div>