[alsa-devel] [RFC] disabling ALSA period interrupts

Jassi Brar jassisinghbrar at gmail.com
Fri May 14 07:27:51 CEST 2010


On Fri, May 14, 2010 at 1:39 PM, pl bossart <bossart.nospam at gmail.com> wrote:
>> AFAIU, the only issue is lack of ability to fine-tune period size of
>> DMA runtime.
>> Otherwise, for the requirement, having period-size almost equal
>> to ring-buffer serves better than disabling interrupts and using timer
>> based updating, more so for VMs with inaccurate timer source.
>>
>> Then I think, rather then providing a way to disable hw-intr, we'd
>> better provide
>> a way to modify runtime period-size at DMA Driver level, and
>> snd_pcm_period_elapsed seems already capable to handle that.
>> That way, disabled interrupts would just be a special case with
>> period-size := ULONG_MAX.
>
> Is this a realistic option?
We have to see as it is certainly a more desirable solution.

> With the majority of existing hardware
> period interrupts are programmed with a flag set in a descriptor when
> the DMA linked list is created. That includes HDAudio and numerous
> others. I am skeptical that one could reliably modify these
> descriptors at run-time, specifically in the case where the controller
> caches the descriptors.
As we all understand, the requirement is expected to be met only by
some h/w that has the capability.
Among those candidates, cards that don't support period resize may
respond only to "period-size := ULONG_MAX" (i.e interrupt disabling),
while more flexible cards can exploit the period-resize feature.

Also, let us not forget that almost every embedded device
use general purpose DMA that can be re-programmed for different
period-size without much trouble.


More information about the Alsa-devel mailing list