[lkml]   [2001]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Andris Pavenis wrote:
> On Thursday 23 August 2001 17:00, Doug Ledford wrote:
>>Andris Pavenis wrote:
>>>Got incremental diffs between ac versions since 2.4.5.
>>>Applied all diffs to 2.4.5 version of i810_audio.c except one between
>>>2.4.6-ac1 and 2.4.6-ac2 As result i810 audio seems to work
>>Can you send me that incremental patch you left out. I would like to
>>look at it to see what's going on.
> i810_audio.c works for me if all patches except following is aplied (it's a part of update
> from 2.4.6-ac1 to 2.4.6-ac2)


OK, now I know what is going on. The change you reference was added to
the i810 driver because some software (mpg123) could fall behind to the
point that they drained the buffer, then when they refilled it
(according to the value sent by the GETOSPACE ioctl), it would cause the
LVI == CVI and the i810 chipset would essentially stop playing. This
made it so that we would wait for the LVI != CVI before we wrote all the
data into the buffer. Unfortunately, because artsd in particular opens
the file in non-blocking mode, we only write as much data as is allowed
before we hit the simplistic "always write actual space - fragsize bytes
to avoid the LVI == CVI lockup" issue. Therefore, artsd would check the
GETOSPACE ioctl, try to write that amount of data, the write routine
doesn't write the full amount because of the workaround, we return less
than a full write, artsd immediately tries to write more, we get in an
endless loop that wastes lots of CPU cycles. I'll improve the free
space calculation and then implement it in both the write and GETOSPACE
areas so that the return from GETOSPACE is in fact the amount of data we
will allow to be written. That will solve the problem for both the
artsd and the mpg123 cases. (I'll likewise have to do something similar
with read and GETISPACE, and I'll have to verify that GETOPTR and
GETIPTR are going to work properly with the new scheme as well). Once
that's done, I'll send a 0.05 version of the driver to Alan.


Doug Ledford <>
Please check my web site for aic7xxx updates/answers before
e-mailing me about problems

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:58    [W:0.084 / U:1.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site