Thread (32 messages) flat view 32 messages, 3 authors, 2006-06-07

Re: [Alsa-devel] [RFC 4/8] snd-aoa: add i2sbus

From: Takashi Iwai <hidden>
Date: 2006-06-07 12:58:39

At Wed, 07 Jun 2006 14:52:25 +0200,
Johannes Berg wrote:
On Wed, 2006-06-07 at 14:49 +0200, Takashi Iwai wrote:
quoted
Sorry, s/pci_to_dev/snd_dma_pci_data/
So then you're saying that indeed, snd_pcm_lib_preallocate_pages_for_all
has the side effect of setting a pointer somewhere else?
Well, I don't understand what you mean "side-effect" here.

The device pointer is passed to the memory allocator, so if you pass a
bogus value there, it'll cause surely oops.
I just don't understand why it all blows up when I leave off the
preallocate call. From the function name that says 'preallocate pages'
it seemed to me that I should be allowed to just leave it off, risking
that later an open() or prepare() fails because no pages could be
allocated.
IIF you use snd_pcm_lib_malloc_pages(), the pre-allocation is
mandatory.  That's the definition.
(And, as mentioned, snd_pcm_lib_malloc_pages() checks the
pre-allocation when debug option is set.  If you don't set the debug
option, it assumes that the pre-allocation was already executed.)

You're free to use dma_alloc_coherent() or whatever in hw_params
callback.


Takashi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help