[alsa-devel] [PATCH] ALSA: add support for disabling period irq

Jaroslav Kysela perex at perex.cz
Mon Nov 8 22:04:09 CET 2010


On Mon, 8 Nov 2010, pl bossart wrote:

>>>>>>> I feel that some bottom-line check is needed if we keep the linear
>>>>>>> position over the buffer size even without the period irq.
>>>>>>> If the app doesn't care, OK fine, the driver shouldn't care, too.
>>>>>>> But then it doesn't make sense to keep the linear position, either.
>>>>>>
>>>>>> But if we can keep the linear position using the light-weight jiffies
>>>>>> check, it's probably OK to keep it rather than changing the hw_ptr
>>>>>> behaviour.
>>>>>
>>>>> Well, but the point of the patch is to avoid wakeups as much as
>>>>> possible.  The jiffies-check adds an unconditional wakeup for each
>>>>> buffer size, thus it's against the purpose of the patch.
>>>>
>>>> I don't see any wakeup.
>>>
>>> The CPU is woken up.  This is to be avoided.
>>
>> Nope. No timers are used. The jiffies check and hw_ptr correction should be
>> done from the avail_update call invoked from an application.
>
> ok, so I re-implemented all the points found in the reviews except for
> this thread. There's already some code to see if we go beyond the
> buffer boundaries, so I am not sure what the 'linear position' means.

Linear means that new hw_ptr must be always behind the previous hw_ptr.

 					Jaroslav

-----
Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.


More information about the Alsa-devel mailing list