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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Wed, 07 Jun 2006 14:52:25 +0200,
Johannes Berg wrote:
> 
> On Wed, 2006-06-07 at 14:49 +0200, Takashi Iwai wrote:
> 
> > 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


_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux