[linux-cirrus] Re: 2.6.20-rcX kernel status

Lennert Buytenhek wrote:
> On Fri, Dec 22, 2006 at 10:04:32AM -0500, Cory T. Tusar wrote:
> 
>>> * dma
>>>
>>> -Lennert have done a dma patch
>>> -which drivers should use it, is addional work necessary
>>> -how to use it ?
>> I2S would probably benefit.  IIRC, the original Cirrus driver did use
>> DMA for I2S, however there were DMA channel issues with underrun. (?)
> 
> (My AC97 driver does handle underrun correctly :-)

Out of curiosity, what kind of data rates are involved with AC97?  I've never
played around with it, and have only a cursory understanding of the format.
For example, 6 channels of 48 kHz 16-bit I2S works out to ~4.6 Mbps.

>>> * sound i2s
>>>
>>> ???
>> I've been working on this recently in conjunction with a new project.
>> Given some of the requirements, it was easier for me to start from
>> scratch in this instance than attempt to port the older Cirrus I2S
>> driver.  I would like to go back at some point and either a) forward
>> port the older Cirrus driver, or b) use what I've started on as a
>> basis for an ALSA driver going forward.
>>
>> To do this right will probably require DMA, SSP, and FIQ support.
> 
> Why FIQ support?

Because I've run into instances where I've been unable to service a regular
(RX-only for now) IRQ in an adequate amount of time.  This includes setting
the FIFO to interrupt at "half-full" rather than "full", (note that at "full"
the first L/R data sample must be read within ~21 usec to avoid overflow).
This also includes using just the barest of ISRs (i.e. twiddle a GPIO line for
timing measurement, read and toss data until the FIFO is empty, and finally
re-twiddle the GPIO line).  This results in CPU utilization of ~3.5% for 2
channels of 48 kHz 16-bit I2S.  Watching the GPIO output on a 'scope shows an
interrupt every 167 usec, with occasional much longer excursions (which
generally lead to an overflow).  Either IRQs are disabled at that point, or
something higher priority is running.

-Cory


-- 
Cory T. Tusar
Embedded Systems Engineer
Videon Central, Inc.
2171 Sandy Drive
State College, PA 16801
(814) 235-1111 x316
(814) 235-1118 fax


"Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
    by definition, not smart enough to debug it."  --Brian W. Kernighan

Other related posts: