[alsa-devel] ALSA on MIPS platform

Takashi Iwai tiwai at suse.de
Tue Aug 7 20:41:10 CEST 2007


At Tue, 7 Aug 2007 18:54:02 +0100,
Ralf Baechle wrote:
> 
> On Tue, Aug 07, 2007 at 11:01:57PM +0900, Atsushi Nemoto wrote:
> 
> > On Tue, 7 Aug 2007 10:18:04 +0400, "Dajie Tan" <jiankemeng at gmail.com> wrote:
> > >  static inline unsigned long virt_to_phys(volatile const void *address)
> > >  {
> > > -       return (unsigned long)address - PAGE_OFFSET + PHYS_OFFSET;
> > > +       return ((unsigned long)address & 0x1fffffff) + PHYS_OFFSET;
> > >  }
> > 
> > This makes virt_to_phys() a bit slower, and more importantly, breaks
> > 64-bit kernel.
> 
> It's ALSA that is doing funny things here so there is no point in fixing
> the arch code to work for ALSA.

Yep, but OTOH, the arch code doesn't provide a proper standard way to
mmap the pages allocated via dma_alloc_coherent().  That's the missing
piece, especially on mips and sparc.  ARM has already one.

My wish is implementing dma_mmap_coherent() on all architectures, so
that the driver can use it safely without messy ifdefs.


Takashi


More information about the Alsa-devel mailing list