Re: Interrupts and kmalloc in alsa modules

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

 



Hi Lee,
Your guess is correct. The buffers are allocated in
the trigger callback, I attached the module source to
the my email but it got lost...?!?

Sorry for that, maybe this time it's better:
http://www.pecore.ch/test/ep93xx-i2s.c.txt

Thanks again
Andrea

--- Lee Revell <rlrevell@xxxxxxxxxxx> wrote:

> On 4/10/07, Ciaccia <ciacciax@xxxxxxxxx> wrote:
> > Could someone of you explain to me why I have to
> > enable the interrupts before calling kmalloc? The
> > strange thing is that the module never explicitly
> > turns them off (I attached the file to the mail)
> >
> 
> I guess you're allocating memory in the trigger
> callback which is
> atomic meaning that the ALSA middle layer always
> calls it with
> interrupts disabled.  It's a bug to call a function
> that can sleep
> with interrupts disabled.
> 
> The standard way to do it is to allocate your
> buffers in a callback
> that can sleep like prepare.  See numerous examples
> in other ALSA
> drivers.
> 
> Of course without seeing your code, this is all
> guesswork...
> 
> Lee
> 



       
____________________________________________________________________________________
It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/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