All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Russell King <rmk+alsa@arm.linux.org.uk>
Cc: Jaroslav Kysela <perex@suse.cz>, Roc Wu <cooloney@yahoo.com.cn>,
	Clemens Ladisch <clemens@ladisch.de>,
	Alsa-devel@lists.sourceforge.net
Subject: Re: An driver error when I using aplay!
Date: Tue, 08 Jun 2004 18:48:08 +0200	[thread overview]
Message-ID: <s5h3c562dyv.wl@alsa2.suse.de> (raw)
In-Reply-To: <20040608174057.A24431@flint.arm.linux.org.uk>

At Tue, 8 Jun 2004 17:40:58 +0100,
Russell King wrote:
> 
> On Tue, Jun 08, 2004 at 05:48:45PM +0200, Takashi Iwai wrote:
> > At Mon, 7 Jun 2004 19:04:16 +0100,
> > Russell King wrote:
> > > > > They also _may_ only affect the userspace mapping of
> > > > > that memory and not kernel space, so this doesn't help the control
> > > > > or status mmaped pages.
> > > > 
> > > > Oh yes, then how about to use a DMA page for the control/status mmap,
> > > > too?
> > > 
> > > Oddly that's what I did on VIVT caches to get Alsa working a few months
> > > ago, but its very unclean and the way I did it, it exposes the "dma"
> > > address in the actual page - which would be a major security problem
> > > if I let the code out.  As I said back then, I didn't have a clean
> > > solution for this.
> > 
> > Well, i386 and x86-64 provide a function change_page_attr() for this
> > purpose.  But it's also a horrible arch-spec hack.
> > 
> > How about to introduce a function like alloc_pages_noncached()?
> 
> Just a quick response on this point while I wait for a rebuild (because
> I don't have time to think about the rest of your reply at the moment -
> and then I'll probably forget about it by the end of tonight, sorry...)

Hehe, I have also a quite limited FIFO queue ;)

> I think you'll find that alloc_pages_noncached() is unimplementable on
> x86 and other architectures.  Some architectures are unable to turn the
> cache on and off on a per-page basis, while others can.  Some need to
> ensure that the relative mappings of two pages fall on the same cache
> colour.  Some need reprogramming of some hardware depending on where
> stuff is mapped.  The list goes on and on...

Yes.

> Basically, I think you'll find that this part of the ALSA API isn't
> universally implementable across all kernel architectures.

Right.  Remember that now the control/status mmap isn't mandatory any
more.  We can live without it safely.  But still it's nicer to use it
as much as possible.

That is, the scenario is:  alloc_pages_noncached() may fail - we
accept it.  Then the mmap returns the error, and alsa-lib tries
non-mmap behavior.

--
Takashi Iwai <tiwai@suse.de>		ALSA Developer - www.alsa-project.org


-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org

  reply	other threads:[~2004-06-08 16:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-04  9:13 An driver error when I using aplay! Roc Wu
2004-06-07  3:04 ` Roc Wu
2004-06-07  7:24   ` Clemens Ladisch
2004-06-07  9:25     ` Roc Wu
2004-06-07 10:17       ` Russell King
2004-06-07 10:43         ` Jaroslav Kysela
2004-06-07 12:45           ` Takashi Iwai
2004-06-07 13:08             ` Russell King
2004-06-07 13:40               ` Takashi Iwai
2004-06-07 13:51                 ` Russell King
2004-06-07 14:18                   ` Takashi Iwai
2004-06-07 15:04                     ` Russell King
2004-06-07 15:13                       ` Takashi Iwai
2004-06-07 15:18                         ` Russell King
2004-06-07 15:32                           ` Takashi Iwai
2004-06-07 15:44                             ` Russell King
2004-06-07 16:25                               ` Takashi Iwai
2004-06-07 18:04                                 ` Russell King
2004-06-08 15:48                                   ` Takashi Iwai
2004-06-08 16:40                                     ` Russell King
2004-06-08 16:48                                       ` Takashi Iwai [this message]
2004-06-07 14:24                   ` James Courtier-Dutton
2004-06-07 15:08                     ` Russell King
2004-06-08  4:01               ` Roc Wu
2004-06-07 10:44       ` Developer docs missing from ALSA web server - was:Re: [Alsa-devel] " James Courtier-Dutton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h3c562dyv.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=Alsa-devel@lists.sourceforge.net \
    --cc=clemens@ladisch.de \
    --cc=cooloney@yahoo.com.cn \
    --cc=perex@suse.cz \
    --cc=rmk+alsa@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.