All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylvain Munaut <tnt@246tNt.com>
To: "Joachim Förster" <mls.JOFT@gmx.de>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: [Fwd: [alsa-devel] embedded sound architecture question]
Date: Wed, 16 May 2007 09:11:24 +0200	[thread overview]
Message-ID: <464AAE9C.9040707@246tNt.com> (raw)
In-Reply-To: <1179246479.3587.2.camel@localhost>

Joachim Förster wrote:
> Hi Sylvain,
>
> thank you very much for your mail,
>
> On Tue, 2007-05-15 at 09:09 +0200, Sylvain Munaut wrote:
>   
>> I'm not an alsa expert but I'm working on a driver right now. And alsa
>> provide you a hook so you can allocate your memory buffer your self.
>> So as long as your control maps it's memory somewhere in the
>> cpu address space you should be fine.
>>     
>
> By "hook", do you mean the prepare()/hw_params() callbacks?
>   
hw_params and hw_free yes.

I personally use snd_pcm_lib_malloc_pages to allocate the buffer, but
you'll have to write your own, and in the same call back configure the
period rate for you hw to generate interrupt.

> I noticed that there is an (undocumented?) mmap() callback, too, so I
> think, I have to implement that one and call something like
> io_remap_pfn_range() to "connect" the device's memory to the VMA
> (virtual memory area) which is provided as an argument to the mmap()
> callback, right?
>   
Sorry, no idea ... but it's likely that you need to handle the mapping
of this
zone in userspace by yourself ...
> In our case, we are not going to allocate any memory like a typical ALSA
> driver does (with DMA) (in prepare()/hw_params() callback), because the
> device's IO memory will "be there" - we just have to "announce"/map it
> into kernel space, right? Or is this interpretation wrong?
>   
No I think that should work.

You need a quite a few BRAMs though ... buffers are often 128k at the
minimum, so that's 64 brams ....

Sylvain

  reply	other threads:[~2007-05-16  7:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-14  5:02 [Fwd: [alsa-devel] embedded sound architecture question] Lorenz Kolb
2007-05-15  7:09 ` Sylvain Munaut
2007-05-15 16:28   ` Joachim Förster
2007-05-16  7:11     ` Sylvain Munaut [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-05-13 15:15 Joachim Förster
2007-05-14  0:50 ` Leonid

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=464AAE9C.9040707@246tNt.com \
    --to=tnt@246tnt.com \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=mls.JOFT@gmx.de \
    /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.