[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-arm
Subject:    Re: Broken SA11xx-UDA1341 Driver
From:       Russell King - ARM Linux <linux () arm ! linux ! org ! uk>
Date:       2004-04-25 7:28:35
Message-ID: 20040425082835.B18034 () flint ! arm ! linux ! org ! uk
[Download RAW message or body]

PLEASE do not add random people to this thread - these lists are
member posting only and you're only going to overload the list
admins by doing this.

On Sun, Apr 25, 2004 at 12:26:35AM -0400, Len Moskowitz wrote:
> Russell King wrote:
> > ALSA is fundamentally broken for ARM platforms - their APIs as they
> > currently exist do not work with the way ARM CPUs implement their
> > caches.
> >
> > I was intending fixing ALSA, but after various mainstream people got
> > uppity at the changes, I dropped that project.
> 
> Here's what Jaroslav Kysela (the PDAudio-CF ALSA driver developer at SuSE)
> has to say:
> 
> [Begin]
> 
> Not really. The ALSA kernel<->user API is not broken, but the kernel
> midlevel code needs some changes to work on the ARM platform
> correctly (DMA cache coherency problems for sharing pages between kernel
> and user space). It's the same problem as we discovered with Erik in the
> debugging process.

I don't think Jaroslav really understands the issue.  It is broken
because it assumes a cache coherent architecture.  Some Linux
architectures _can not_ implement what ALSA wants, period.  Others
can implement it with some changes but with a performance penalty,
and others can implement it with little performance penalty.

What this means is that the API is not well thought out, and as
such is buggy.

> Might someone suggest how we can proceed to fix this?  The ALSA folks say
> it's a kernel problem.  The ARM Linux folks say that it's an ALSA problem.

I don't think it is going to get solved for 2.6 - no one in the
mainstream kernel is the least bit interested in solving it.
Basically, we could not come up with a suitable DMA API extension
and get an agreement that it was implementable on all architecures -
which is a pre-requisit to it going into the kernel.

However, the DMA API problem is just one _small_ piece of the problem.
The major problem which did not get addressed back then is the
coherent mapping of ALSA control and status structures between kernel
and user space.  That is something which only _fully_ cache coherent
architectures support, and ARM is not a fully coherent architecture.

So basically ALSA assumes that you can do stuff for which there is no
guarantee on all architectures.

-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ/Etiquette:       http://www.arm.linux.org.uk/armlinux/mailinglists.php
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic